ZFS Union

Kirk McKusick mckusick at mckusick.com
Fri Jun 14 18:51:51 UTC 2013


The union filesystem uses "whiteout" to remove files that appear
in a lower layer. In your example, when you `rm /vm/unit1/foo'
what happens is that a whiteout entry gets created for /vm/unit1/foo.
(Whiteout is implemented by creating a name with inode number 1;
Inode 1 is the "anti-inode" which when combined with any other inode
disappears in a cloud of greasy smoke.) Thus /vm/master/foo continues
to exist and is visible as /vm/unit2/foo and /vm/unit3/foo. You can
"recover" /vm/unit1/foo using `rm -W /vm/unit1/foo' which will remove
the whiteout entry causing /vm/master/foo to once again be visible
as /vm/unit1/foo. In short, I believe that the existing union filesystem
will do what you want to do.

	Kirk McKusick


More information about the freebsd-fs mailing list