Bug 832217 - mount(8) does not support the nofail fstab entry
mount(8) does not support the nofail fstab entry
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: util-linux (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Karel Zak
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-14 17:52 EDT by Thomas Spear
Modified: 2012-06-15 13:35 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-15 07:54:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Thomas Spear 2012-06-14 17:52:26 EDT
Description of problem:
Reading the man page for fstab(5) you see the following:

"The fourth field (fs_mntops).
  This field describes the mount options associated with the filesystem.
[-snip-]
   nofail do not report errors for this device if it does not exist."

Reading the man page for mount(8) you see the following:

FILESYSTEM INDEPENDENT MOUNT OPTIONS
[-snip-]
 _netdev
  The  filesystem  resides  on  a  device that requires network access (used to prevent the system from attempting to mount these filesystems until the network has been enabled on the system).

 nofail Do not report errors for this device if it does not exist.

This (nofail) works properly when booting the system, as I do not get dropped into maintenance mode due to an inaccessible VirtualBox share when this option is present but the VirtualBox extensions have not been recompiled for the newly-installed kernels.

However, when I login, fix the extensions, reboot, login again, and run 'sudo mount -a' or 'sudo mount /media/sf_Shared' I get the following:

[root@ProductionVM ~]# mount /media/sf_Shared/
unknown mount option `nofail'
valid options:
[-snip-]

I remove the nofail option and the share will then mount with either of the above commands.

For reference, my fstab is as follows:

/dev/mapper/vg_productionvm-lv_root             /                       ext4    defaults        1 1
UUID=552c9369-ded7-41e8-9bd8-95c0fd6c3384       /boot                   ext4    defaults        1 2
/dev/mapper/vg_productionvm-lv_swap             swap                    swap    defaults        0 0
Shared                                          /media/sf_Shared        vboxsf  defaults        0 0

My mtab when the share is mounted is as follows:

rootfs / rootfs rw 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
sysfs /sys sysfs rw,seclabel,nosuid,nodev,noexec,relatime 0 0
devtmpfs /dev devtmpfs rw,seclabel,nosuid,size=2014276k,nr_inodes=503569,mode=755 0 0
devpts /dev/pts devpts rw,seclabel,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /dev/shm tmpfs rw,seclabel,nosuid,nodev 0 0
tmpfs /run tmpfs rw,seclabel,nosuid,nodev,mode=755 0 0
/dev/mapper/vg_productionvm-lv_root / ext4 rw,seclabel,relatime,data=ordered 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
tmpfs /sys/fs/cgroup tmpfs rw,seclabel,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct,cpu 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/net_cls cgroup rw,nosuid,nodev,noexec,relatime,net_cls 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=23,pgrp=1,timeout=300,minproto=5,maxproto=5,direct 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,seclabel,relatime 0 0
tmpfs /media tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,mode=755 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
configfs /sys/kernel/config configfs rw,relatime 0 0
mqueue /dev/mqueue mqueue rw,seclabel,relatime 0 0
/dev/sda2 /boot ext4 rw,seclabel,relatime,data=ordered 0 0
gvfs-fuse-daemon /run/user/speeddy/gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,relatime,user_id=1000,group_id=1000 0 0
/dev/sr0 /run/media/speeddy/VBOXADDITIONS_4.1.16_78094 iso9660 ro,nosuid,nodev,relatime,uid=1000,gid=1000,iocharset=utf8,mode=0400,dmode=0500 0 0
none /media/sf_Shared vboxsf rw,nodev,relatime 0 0

Version-Release number of selected component (if applicable):
[root@ProductionVM ~]# yum list installed util-linux
Loaded plugins: langpacks, presto, refresh-packagekit
Installed Packages
util-linux.x86_64                                                           2.21.2-1.fc17                                                            @updates

How reproducible:
100%

Steps to Reproduce:

Long version:
1. Install Fedora 17 on a VirtualBox VM (DO NOT PERFORM UPDATES YET)
2. Install VirtualBox Extensions, and any dependencies needed to get the extensions compiled and installed
3. Power off the VM and create a share within VirtualBox
4. Power the VM on and setup fstab to mount the share on boot
5. Reboot and verify that the share mounts at boot without using the nofail option
6. Umount and remount the share without using the nofail option
7. Perform 'yum update'
8. Reboot and see VM go into maintenance mode
9. Add nofail option to fstab and reboot again
10. See VM boot properly
11. Reinstall VirtualBox extensions, and reboot yet again
12. See VM boot properly
13. Attempt to mount the share (with nofail option)
14. Get error from mount

Short version:
1. Create a mount point anywhere and add it to fstab with nofail option
2. Attempt to mount mount point and receive error

Actual results:
Mount point should mount unless not present or not working

Expected results:
Get error listed above

Additional info:
I can use _netdev to accomplish the same thing (prevention of being dumped into maintenance mode since the driver is not configured for the new kernel), but if two manpages mention an option, it should be working in all cases.
Comment 1 Sjoerd Mullender 2012-06-15 05:05:08 EDT
I'm experiencing the same problem.
It's actually a bit worse.  If I don't have the nofail option, booting stops early on and asks for the root password for maintenance.  If I just type Control-D, booting continues without any further problem and the shared file systems get mounted.  If I add a nofail option to fstab, booting completes, but the shared file systems don't get mounted since mount doesn't recognize the option.
It seems, I cannot win.
(These tests with an up-to-date VirtualBox driver in the client.)
Comment 2 Karel Zak 2012-06-15 07:54:02 EDT
I guess that there is /sbin/mount.vboxsf and the command mount(8) works as a
wrapper for "vboxsf" filesystem. 

The mount helpers (including /sbin/mount.vboxsf) have to support generic userspace mount options.

VirtualBox is 3rd party package; I don't see a way how I can help you, closing. Sorry.
Comment 3 Thomas Spear 2012-06-15 13:35:50 EDT
https://www.virtualbox.org/ticket/10676

Note You need to log in before you can comment on or make changes to this bug.