whiteout 概念存在于聯(lián)合文件系統(tǒng)(UnionFS)中,代表某一類占位符形態(tài)的特殊文件,當(dāng)用戶文件夾與系統(tǒng)文件夾的共通部分聯(lián)合到一個目錄時(例如 bin 目錄),用戶可刪除歸屬于自己的某些系統(tǒng)文件副本,但歸屬于系統(tǒng)級的原件仍存留于同一個聯(lián)合目錄中,此時系統(tǒng)將產(chǎn)生一份 whiteout 文件,表示該文件在當(dāng)前用戶目錄中已刪除,但系統(tǒng)目錄中仍然保留。
It is how the union file system supports deleting from a union where the underlying file to be deleted resides on a read-only file system.
Say you have
/bin (read-only)
/usr/bin (read-only)
/home/USERNAME/bin (read-write)
all union mounted together in /bin (read-write).
And you do rm /bin/ls.
It would place a whiteout for ls in /home/USERNAME/bin, which makes it look like /bin/ls has been deleted.
See State of the unionfs for a good read and a full explanation.