Subject: Re: union whiteouts persistence intentional?
To: None <tech-kern@NetBSD.org>
From: Bill Studenmund <firstname.lastname@example.org>
Date: 06/06/2006 19:28:03
Content-Type: text/plain; charset=us-ascii
On Wed, Jun 07, 2006 at 02:23:50AM +0200, theo borm wrote:
> Chapman Flack wrote:
> >theo borm wrote:
> >>Whiteouts seem to be persistent entries in the overlaying directory,
> >>surviving the union being unmounted again, and I'm not quite sure
They are supposed to do that.
> >I can't think of a good way to make them nonpersistent and still have
> >them be useful ... if you have a union set up in /etc/fstab you probably
> >want it to look the same way after your next reboot.
Indeed. I've done this before.
> I hadn't thought of it that way. And I'm not quite sure if it works
> that way. In fstab you can give -o union to mounts, but this doesn't
As noted, -o union is different from unionfs.
-o union does an aggregation of all the files in both the "upper" and=20
"lower" directories. It's a quick&simple feature to let you mount fdesc=20
(mount_fdesc) file systems over /dev and yet keep all your existing=20
> >But would rm -W be a faster way to get rid of them when you don't
> >want them?
> Then I should still know their names. I cant just do rm -W * can I?
find . -type w
should give you the whiteouts.
> I don't like the idea of directory entries that I can't see and can't del=
> unless I know their full path name.
As above, you can see them, you just have to use the correct tools. The=20
fact that they can (and do) disappear is part of their point. :-)
> Most usefull behaviour to me would be something like a mount option
> "-o non-persistent-whiteouts", but I guess this would require one to
> actively clean up behind one during unmount (and what if a union is
> not properly unmounted?)
Yes. I think the most appropriate way to handle this is "find /mount/point
-type w -print0 | xargs -0 rm -Wf". There's both no need for this in the
fs code, nor is this really something the kernel should be doing.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)
-----END PGP SIGNATURE-----