From: Matthias Schniedermeyer <ms@citd.de>
To: Olaf =?unknown-8bit?Q?Fr=B1czyk?= <olaf@cbk.poznan.pl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: How to umount a busy filesystem?
Date: Sun, 10 Oct 2004 23:12:08 +0200 [thread overview]
Message-ID: <20041010211208.GA6986@citd.de> (raw)
In-Reply-To: <1097441558.2235.9.camel@venus>
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.
iow. If a programs want to open a file with an absolute path (including
the "<path_to_mountpoint>") then it will fail (or see the other
mountpoint). A program whose working dir is "inside" the mountpoint
(e.g. if it was started from a path "inside" the mountpoint) can still
open file if they use relative paths. Also when you have a bash whose
working dir is "inside" the mountpoint, you can still start programs
that can access the files within that mountpoint.
If you have luck then the program(s) can't open new files (or "see" the
new mountpint). But many (maybe most) programs don't have problems with
a lazy-unmounted mountpoint. Personally i have only encountered one
program that (failed/saw the "other"), which was "acroread" (xpdf on the
other side still can open files in a lazy unmounted mountpoint)
Seems this is the best you can do.
Bis denn
--
Real Programmers consider "what you see is what you get" to be just as
bad a concept in Text Editors as it is in women. No, the Real Programmer
wants a "you asked for it, you got it" text editor -- complicated,
cryptic, powerful, unforgiving, dangerous.
next prev parent reply other threads:[~2004-10-10 21:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-10 20:52 How to umount a busy filesystem? Olaf Frączyk
2004-10-10 21:12 ` Matthias Schniedermeyer [this message]
2004-10-10 22:00 ` Olaf Frączyk
2004-10-12 0:24 ` Jon Masters
2004-10-12 8:48 ` Matthias Schniedermeyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041010211208.GA6986@citd.de \
--to=ms@citd.de \
--cc=linux-kernel@vger.kernel.org \
--cc=olaf@cbk.poznan.pl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox