Stephen Samuel (gmail)
darkonc at gmail.com
Mon Jun 15 19:58:26 UTC 2009
If you want to keep people from unmounting, create a file:
then unlink that file, but *do not close your open file descriptor.*
The name will disappear but the inode will continue to exist. As long as
your program keeps the file descriptor for the unlinked file open, users
will be unable to unmount the filesystem
A simple example:
tail -f /media/disk-1/nothing&
# (both the last two commands should fail)..
# kill the background 'tail' process
# that last 'eject' should work
On Sun, Jun 14, 2009 at 11:46 AM, Christian Kujau <lists at nerdbynature.de>wrote:
> [Cc'ing ext3-users again]
> On Sun, 14 Jun 2009, Donato Capitella wrote:
> > Well, that's not it.
> > I modified the ext3 fs and added a kernel thread that performs deferred
> > operations. As long as this thread is working, I would like the file
> > system not to be unmounted.
> I still don't understand the reasoning here: "not to be unmounted" as in
> a permission-bound issue ("is not allowed to unmount") or a technical
> issue? For the latter: simply keep an open file on the filesystem, unmount
> will fail with -EBUSY. Or it's a matter of "because we can", as in
> "because I want to be able to disallow mounting on the filesystem level".
> But then again, I did not have my coffee yet and my brain keeps asking
> why, why, why? :)
> BOFH excuse #202:
> kernel panic: write-only-memory (/dev/wom0) capacity exceeded.
> Ext3-users mailing list
> Ext3-users at redhat.com
Stephen Samuel http://www.bcgreen.com Software, like love,
778-861-7641 grows when you give it away
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ext3-users