Linux whiteout文件

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.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容