美文网首页
Linux whiteout文件

Linux whiteout文件

作者: Wavky | 来源:发表于2016-12-01 17:57 被阅读0次

    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.

    相关文章

      网友评论

          本文标题:Linux whiteout文件

          本文链接:https://www.haomeiwen.com/subject/hhtfmttx.html