Re: Unable to umount union-parts after umounting unionfs

From: Philip Paeps <philip_at_freebsd.org>
Date: Thu, 30 Jun 2005 13:07:26 +0200
On 2005-06-27 15:45:19 (+0200), Jeremie Le Hen <jeremie_at_le-hen.org> wrote:
> On Sat, Jun 25, 2005 at 04:13:20PM +0200, Philip Paeps wrote:
> > Note that the problem is not in unmounting the union filesystem, that
> > works fine, it's unmounting the top layer.  Unmounting the bottom layer is
> > not a problem either.
> 
> Ah, I misread.  This is the expected behaviour : the top layer is obviously
> busy while the unionfs mount is active.  Here is the same setup that you
> first described :
> %%%
>     /dev/md0 on /root/tests/mnt0 (ufs, local)
>     /dev/md1 on /root/tests/mnt1 (ufs, local)
>     <above>:/root/tests/mnt1 on /root/tests/mnt0 (unionfs, local, noclusterw)
> %%%
> 
> Imagine what would happen to the unionfs mount if /root/tests/mnt1 was
> unmounted.  This is nonsense.

Indeed.  But after the unionfs has been unmounted (umount /root/tests/mnt0 in
your example), it should also be possible to unmount the top layer after it's
had some time to sync up any changes that happened.  Something must be keeping
the top layer 'busy' for some reason.  It would be nice to be able to find out
what. :-)

> > %%%
> > vflush: busy vnode
> > 0xc2578bb0: tag ufs, type VDIR
> >     usecount 1, writecount 0, refcount 4 mountedhere 0
> >     flags (VV_ROOT)
> >  VI_LOCKed    v_object 0xc256c630 ref 0 pages 1
> >      lock type ufs: EXCL (count 1) by thread 0xc2547900 (pid 687)
> >         ino 2, on dev md1
> > %%%
> 
> This is a bug, I can reproduce it here.  I am not enough skilled to correct
> this filesystem.  It has been known to be broken for a long time and I
> expect things goes bader with time, as the second thermothynamics principle
> states :-).

I'm willing to try to fix it, but I'm getting a little lost in all the twisty
passages of the filesystem code. :-)

> PS: I'm willing to try to foreport FiST [1] to FreeBSD 6, it is known 
> to have, among others, a very good union filesystem implementation,

Ooh!  I'll try that out.  Thanks!

 - Philip

-- 
Philip Paeps                                    Please don't Cc me, I am
philip_at_freebsd.org                               subscribed to the list.

  BOFH Excuse #325:
    Your processor does not develop enough heat.
Received on Thu Jun 30 2005 - 09:07:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:37 UTC