Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 227903 - mount -f does not work with NFS-mounted file system (such as / on diskless boot system); workaround included
Summary: mount -f does not work with NFS-mounted file system (such as / on diskless bo...
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux
Version: 6
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2007-02-08 20:54 UTC by Alexander Aminoff
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2007-04-06 09:38:26 UTC

Attachments (Terms of Use)

Description Alexander Aminoff 2007-02-08 20:54:36 UTC
Description of problem:

mount -f does not work as intended (doing nothing but writing an /etc/mtab 
entry) with an NFS-mounted file system.

It appears that this may be a problem where /sbin/mount.nfs does not honor the -
f flag. You can obtain the correct behavior by using -f -i (-i being ignore the 
per-fstype helper).

For an NFS-mounted root FS, this causes problems because line 716 of /etc/rc.d/
rc.sysinit is "mount -f /", for the purpose of writing info about the already 
mounted root FS into /etc/mtab. The workaround is to change that line to "mount 
-f -i /".

Version-Release number of selected component (if applicable):

mount (util-linux 2.13-pre7)

How reproducible:


Steps to Reproduce:
1. mount -n nfs-server:/exported /mnt
2. mount -f /mnt

Actual results:

[root@perlw2 /]# mount -n store2:/vol/vol0 /mnt
[root@perlw2 /]# grep /mnt /etc/mtab 
[root@perlw2 /]# cat /proc/mounts | grep vol0
store2:/vol/vol0 /mnt nfs 
 0 0
[root@perlw2 /]# mount -f store2:/vol/vol0 /mnt
mount.nfs: /mnt is already mounted or busy
[root@perlw2 /]# grep /mnt /etc/mtab 
[root@perlw2 /]# mount -f -i store2:/vol/vol0 /mnt
[root@perlw2 /]# grep /mnt /etc/mtab 
store2:/vol/vol0 /mnt nfs rw 0 0

Expected results:

Additional info:

I am not sure whether to classify this as a bug with mount, mount.nfs, or 
rc.sysinit. I guess from my perspective the important thing was figuring out 
the workaround in rc.sysinit, but the real bug is the misbehavior of mount -f.

Comment 1 Karel Zak 2007-02-09 10:41:16 UTC
It's bug in the mount command and also in mount.nfs:

  - the mount calls mount.nfs without the "-f" option.
  - the mount.nfs doesn't work with "-f" correctly (it doesn't update mtab)

I'm not sure if "-i" is the best solution, maybe some mount.<xxx> needs to write
to the mtab an extra information which is specific for the helper. For example:

  knedlo:/mnt/store /mnt/store nfs rw,addr= 0 0

Comment 2 Karel Zak 2007-04-06 09:38:26 UTC
The problem has been fixed in util-linux-2.13-0.46 and nfs-utils-1.0.10-6

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