Re: How to umount a busy filesystem?

From: Olaf Frączyk
Date: Sun Oct 10 2004 - 17:02:07 EST


On Sun, 2004-10-10 at 23:12, Matthias Schniedermeyer wrote:
> On 10.10.2004 22:52, Olaf Fr?czyk wrote:
> > Hi,
> >
> > Why I cannot umount filesystem if it is being accessed?
> > I tried MNT_FORCE option but it doesn't work.
> >
> > Killing all processes that access a filesystem is not an option. They
> > should just get an error when accessing filesystem that is umounted.
> >
> > Any idea how to do it?
>
> umount -l
>
> removes the mount in "lazy"-mode, this way the mount-point "vanishes"
> for all programs whose working-dirs aren't "within" that mount-point.
> After all files are closed the filesystem is unmounted totally.
> You can "reuse" the mount-point immediatly.
>
Thank you.
But this:
1. Does not let the user to remove the media (eg. cdrom).
2. Does not flush buffers etc. so the media cannot be safely removed
even if it were physically possible (eg. cdrom with unlocked tray or
USB-key).

I have read that the MNT_FORCE is currently limited to NFS mounts.
Does somebody have any idea why it is limited?
Or is the functionality planned for other filesystems too?

Regards,

Olaf

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/