whiteout 概念存在于联合文件系统(UnionFS)中,代表某一类占位符形态的特殊文件,当用户文件夹与系统文件夹的共通部分联合到一个目录时(例如 bin 目录),用户可删除归属于自己的某些系统文件副本,但归属于系统级的原件仍存留于同一个联合目录中,此时系统将产生一份 whiteout 文件,表示该文件在当前用户目录中已删除,但系统目录中仍然保留。
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.
网友评论