Bugzilla – Bug 104405
mount -a doesn't work with hotpluggable devices
Last modified: 2005-12-18 18:45:59 UTC
We're trying to make fsck & mount work with hotpluggable devices, ie devices which might or might not be existing at the time boot.localfs runs. What boot.localfs does is: fsck $FSCK_PROGRESSBAR -R -A -a $FSCK_FORCE and later on: mount -av -t nonfs,noproc,nodevpts,nosmbfs -O no_netdev So. What we want to achieve is the following: - If the device exists and is present in /etc/fstab, it should be checked and mouted according to fstab - If the device does not exist the booting should continue without errors. With the current status 'fsck' will return an error, causing boot.localfs to barf and drop into a maintenance shell. When adding '-t noopts=nofail' to fsck and add the options 'nofail' to those devices in /etc/fstab fsck proceeds, but now mount will fail due to the unknown option 'nofail'. Personally I would like to have the 'nofail' option (or 'hotplug' or whatever), which would allow the user to have control about which device is allowed to fail during boot and for which device it should be considered an error. Mads, you had a patch for mount which would allow parsing of 'nofail'. It seems we will need it after all.
And simply setting to fsck frequency to '0' in /etc/fstab is not going to help as we want to have the device checked ...
A) If we add this option to fstab and also -t noopts=... to fsck then the device will not be checked at boottime, even if present. B) I vote very much to name the option 'hotplug' or similar, because this gives an idea of the use of this option. Since this option does not change anything at mounts failure behavior 'nofail' is a bit wrong.
Does mount complain about unknown options? I cannot reproduce that here. So for now over to fsck maintainer.
Yes, it does: g204:~ # mount | grep sda6 g204:~ # grep sda6 /etc/fstab /dev/sda6 /data2 auto hotplug,auto,user 0 0 g204:~ # mount /dev/sda6 mount: wrong fs type, bad option, bad superblock on /dev/sda6, missing codepage or other error In some cases useful info is found in syslog - try dmesg | tail or so g204:~ # mount | grep sda6 g204:~ # We have to change 1) mount 2) boot.localfs
And of course after changing fstab: g204:~ # grep sda6 /etc/fstab /dev/sda6 /data2 auto auto,user 0 0 g204:~ # mount /dev/sda6 g204:~ # mount | grep sda6 /dev/sda6 on /data2 type ext3 (rw,noexec,nosuid,nodev) g204:~ # Just for completeness.
Hannes, I've sent you the patch that needs 10 minutes more work to add documentation about the flag. I'm on vacation right now, so I'm reassigning to you. Feel free to assign it back to me, if you cannot add it.
Updated package submitted to autobuild for Beta3.
closed.