Red Hat Bugzilla – Bug 177704
Lack of symmetry - no equivalent of "mount -f" for umount
Last modified: 2007-11-30 17:11:20 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; MSIE 6.0; Windows; U; AIIEEEE!; Win98; Windows 98; en-US; Gecko masquerading as IE; should it matter?; rv:1.8b) Gecko/20050217
Description of problem:
Although there is a very convenient "-f" option for mount, there is nothing equivalent for umount. The "-f" option is used in rc.sysinit but it isn't possible to just adjust the mtab entry in a similar way in init.d/halt. This is particularly significant when manipulating filesystems on cd-only systems.
For example, when booting off cdrom, and after pivot_root'ing to ramdisk root filesystem, the mounted cdrom will still be mounted somewhere on the old root hierarchy. To get the cdrom listed in /etc/mtab an instance of "mount -f ..." is invoked (otherwise cdrom remains mounted but invisible to mount, df, etc). This cdrom will always be busy (because of instances of sh and .so's), so when a shutdown occurs init.d/halt will (unnecessarily) attempt to umount the cdrom. If there was a suitable option to umount (unfortunately the -f is already assigned to forced umount) then the mtab entry could be undone in init.d/halt.
There is quite a but of adhocery in rc.sysinit and init.d/halt with regards to mounted filesystems (eg. proc, loopfs, autofs, devfs, etc) so wouldn't it be nice to add something to the mount options which identifies the general operational mode of the filesystem. To indicate, perhaps, that umounting is not particularly important. There is a mechanism with the -O option, but there is no suitable -o option.
Interestingly there is a special "nodev" qualifier in /etc/filesystems and /proc/filesystems but that seems to be an irregular kludge. If a filesystem has a type and type-specific properties, then shouldn't one of those type-specific properties be "nodev" which should therefore appears in /proc/mounts and /etc/mtab?
Alternatively, perhaps readonly filesystems shouldn't be umounted in init.d/halt.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Actual Results: No option to match "mount -f".
Expected Results: Should have an option to match "mount -f".
This is probably good idea, but your request should be send to upstream
developer. (Adrian Bunk <bunk(at)stusta(dot)de>). I don't want to add to the
mount command any Red Hat specific option.
Err ... couldn't you just do that at the same time as you close the bug. Like
put the Adrian Bunk's email address on the CC list for this bug. It amounts to
roughly the same thing as me sending an email but then I would have to
regurgitate everything on this bug report.
In fact shouldn't RedHat have an established database of pertinent upstream
developers so that the appropriate channels of communication work properly.
I did "rpm -qi util-linux" and "man mount" and that didn't help me discover that
Adrian Bunk was the "upstream" person (ironic naming because the "stream" seems
to have an abrupt discontinuity at the RedHat tributary). But then I looked at
/usr/share/doc/util-linux-2.12p/MAINTAINER but it mentions Andries Brouwer and a
couple of other names, none of which are Adrian Bunk.
Sorry, but CC list is possible use only for people who have bugzilla account. To
be honest I don't expect any feedback from Adrian -- from my point of view he
has minimal time and minimal effort to work on util-linux.... :-(