Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jun 2013 11:51:46 -0700
From:      Kirk McKusick <mckusick@mckusick.com>
To:        Devin Teske <dteske@freebsd.org>, "Teske, Devin" <Devin.Teske@fisglobal.com>
Cc:        "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
Subject:   Re: ZFS Union 
Message-ID:  <201306141851.r5EIpkl2054401@chez.mckusick.com>
In-Reply-To: <13CA24D6AB415D428143D44749F57D7201F81804@ltcfiswmsgmb21> 

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306141851.r5EIpkl2054401>