Bug 104405

Summary: mount -a doesn't work with hotpluggable devices
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Hannes Reinecke <hare>
Component: BasesystemAssignee: Hannes Reinecke <hare>
Status: VERIFIED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: dkukawka, ihno, ro
Version: Beta 1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Hannes Reinecke 2005-08-12 14:06:55 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.
Comment 1 Hannes Reinecke 2005-08-12 14:07:53 UTC
And simply setting to fsck frequency to '0' in /etc/fstab is not going to help
as we want to have the device checked ...
Comment 2 Christian Zoz 2005-08-12 14:36:58 UTC
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.
Comment 3 Mads Martin Joergensen 2005-08-16 09:47:06 UTC
Does mount complain about unknown options? I cannot reproduce that here. So for
now over to fsck maintainer.
Comment 4 Christian Zoz 2005-08-16 10:46:30 UTC
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
Comment 5 Christian Zoz 2005-08-16 10:50:48 UTC
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.
Comment 6 Mads Martin Joergensen 2005-08-16 11:00:33 UTC
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.
Comment 7 Hannes Reinecke 2005-08-17 11:01:48 UTC
Updated package submitted to autobuild for Beta3.
Comment 8 Ihno Krumreich 2005-12-18 18:45:59 UTC
closed.