What does "whiteout" mean in a copy-on-write filesystem?
Solution 1:
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.