Re: Unable to umount union-parts after umounting unionfs

From: Philip Paeps <philip_at_freebsd.org>
Date: Sat, 25 Jun 2005 16:13:20 +0200
On 2005-06-23 16:21:17 (+0200), Jeremie Le Hen <jeremie_at_le-hen.org> wrote:
> > > Could you show us the locked vnodes for these two cases please ?
> >
> > Is there any way I can either try to unmount the filesystem manually from
> > the debugger or make the unmounting code more chatting about what it's
> > waiting for?
> 
> I don't think that having a snapshot of locked vnode when union_unmount() is
> called would inform us further.  However, I you want to try, you just have
> to drop to DDB, set a breakpoint on union_unmount() (typing "break
> union_unmount") and then try the unmount (you can delete the breakpoint by
> simply using "delete union_unmount").

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.

> One thing you can do is compiling your kernel with DIAGNOSTIC enabled
> and set the sysctl debug.busyprt to 1.  This will print informations on
> each busy vnode when you will be trying to unmount the filesystem :

Aha:

%%%
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
%%%

 - Philip

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

  BOFH Excuse #242:
    Software uses US measurements, but the OS is in metric...
Received on Sat Jun 25 2005 - 12:13:26 UTC

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