In message <[EMAIL PROTECTED]>, Dave Miller writes:
> Luiz Fernando N. Capitulino wrote on 1/29/08 10:05 AM:
> 
> > https://bugzilla.filesystems.org/show_bug.cgi?id=604
> > 
> >  Something I've realized now is that it seems the bug depends on the
> > right timing to be triggered. I've put those commands to reproduce it
> > in a script and I can't reproduce that bug, but I get a different OOPS
> > when rebooting...
> 
> I've been experiencing the reboot issue myself...  what appears to 
> happen is that the initscript for the nfs client tries to unmount all of 
> the NFS mounts during shutdown, however, since the NFS mount is a branch 
> of a unionfs, unionfs gets confused when it disappears.  If I unmount 
> the unionfs mount first before rebooting then there's no OOPS.
>    In thinking about it, I'm not really sure what a good way to fix it 
> would be.  unionfs could mark something on the NFS partition as "in use" 
> so it won't unmount (and it might do that already) but that would only 
> confuse things during shutdown.  I was sort of planning on writing up an 
> initscript to umount any unionfs partitions and getting that in position 
> to run prior to the equivalent NFS one during shutdown.

Unionfs holds a vfsmount reference on every lower branch, which is released
when unionfs is unmounted; this is needed for normal operations, so the
lower branches don't disappear unexpectedly.  Therefore, it should be
impossible for one to unmount a lower branch directly -- you should get an
EBUSY.  So I'm curious what happens during shutdown that causes the lower
branch (nfs or any) to be unmounted?  Does your shutdown code try to force
the unmount ("umount -f" or "umount -l")?  If so, I'll have to figure out a
way to detect when the "rug has been pulled from underneath me" and deal
with it somehow.

Also, does anyone know if there's a way to make linux reorder the entries in
/proc/mounts so stackable file systems show up first?  That way most
shutdown scripts will try to unmount the upper layers first.

If there is no such way, then we may have to resort to our own /etc/init.d
shutdown script that understands stackable file systems.  In that case, if
you or anyone develops such a script, I don't mind distributing it on the
Web site.

Thanks,
Erez.
_______________________________________________
unionfs mailing list: http://unionfs.filesystems.org/
unionfs@mail.fsl.cs.sunysb.edu
http://www.fsl.cs.sunysb.edu/mailman/listinfo/unionfs

Reply via email to