Need to modprobe nfs module before mounting nfs4 export

Bug #117957 reported by Laurent Bigonville
66
This bug affects 12 people
Affects Status Importance Assigned to Milestone
nfs-utils (Debian)
Fix Released
Unknown
nfs-utils (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Gutsy by Noel J. Bergman
Nominated for Hardy by Noel J. Bergman
Nominated for Intrepid by Noel J. Bergman
Nominated for Jaunty by Noel J. Bergman
util-linux (Ubuntu)
Invalid
Undecided
Unassigned
Nominated for Gutsy by Noel J. Bergman
Nominated for Hardy by Noel J. Bergman
Nominated for Intrepid by Noel J. Bergman
Nominated for Jaunty by Noel J. Bergman

Bug Description

In order to mount an nfs4 export, it is necessary to modprobe the nfs module manually, unless an nfs mount has already taken place.

$ sudo mount -t nfs4 router:/ /mnt
mount: unknown filesystem type 'nfs4'
$ sudo modprobe nfs
$ sudo mount -t nfs4 router:/ /mnt

This effects gutsy (original report), hardy, intrepid and jaunty.

Revision history for this message
William Shotts (bshotts) wrote :

I'll confirm that this problem still exists in Gutsy as of this date.

Changed in util-linux:
status: New → Confirmed
Revision history for this message
Marcel Hild (urandom) wrote :

Also true for me.
I added nfs to /etc/modules as a workaround

Revision history for this message
Laurent Bigonville (bigon) wrote :

I don't have this problem anymore

Revision history for this message
Ernst Kloppenburg (ernst-kloppenburg) wrote :

the same problem the original reporter had is still present in hardy.
(the nfs module is automatically loaded only with nfsv3 mounts, not with nfsv4 mounts)

Revision history for this message
Noel J. Bergman (noeljb) wrote :

This problem is present in Hardy, Intrepid and Jaunty. I've just gone and checked them all, along with Fedora 10. Ernst is correct about the differential behavior between mounting nfs and nfs4.

The upstream debian bug is #451782.

Revision history for this message
Noel J. Bergman (noeljb) wrote :

Debian claims to have fixed it. Please note the following, which suggests otherwise:

root@noel-intrepid:~# /etc/init.d/nfs-common restart
 * Stopping NFS common utilities [ OK ]
 * Starting NFS common utilities [ OK ]
root@noel-intrepid:~# lsmod | grep nfs
root@noel-intrepid:~# mkdir /tmp/AMITOWER
root@noel-intrepid:~# mount -t nfs4 -orsize=32768,wsize=32768 amitower.local:/ /tmp/AMITOWER
mount.nfs4: No such device
root@noel-intrepid:~# lsmod | grep nfs
root@noel-intrepid:~# mount -t nfs -orsize=32768,wsize=32768 amitower.local:/ /tmp/AMITOWER
root@noel-intrepid:~# lsmod | grep nfs
nfs 308272 1
lockd 81232 1 nfs
nfs_acl 11776 1 nfs
sunrpc 229608 11 nfs,lockd,nfs_acl
root@noel-intrepid:~# umount /tmp/AMITOWER/
root@noel-intrepid:~# mount -t nfs4 -orsize=32768,wsize=32768 amitower.local:/ /tmp/AMITOWER
root@noel-intrepid:~#

I believe that is sufficient to document that the bug is either back or still present.

description: updated
Changed in nfs-utils:
status: Unknown → Fix Released
Steve Langasek (vorlon)
Changed in nfs-utils (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Ernst Kloppenburg (ernst-kloppenburg) wrote :

for me, the problem is gone in jaunty (the module gets loaded by /etc/init.d/nfs-common)

Revision history for this message
Steve Langasek (vorlon) wrote :

The module is only loaded by nfs-common if the system is configured to use gssd or idmapd. I think there are still some (relatively rare) cases where you could use an nfs4 mount without needing either of these daemons, so mount.nfs4 should know to handle this itself as well.

Revision history for this message
Noel J. Bergman (noeljb) wrote :

Still present in Lucid beta.

Revision history for this message
William Shotts (bshotts) wrote :

Agreed. Lucid still has this problem.

Revision history for this message
Hark (ubuntu-komkommerkom) wrote :

I also confirm the problem in Lucid.

Revision history for this message
Ben Beasley (ben-musicinmybrain) wrote :

Still seeing this on Maverick 64-bit exactly as originally described.

Fresh install, install nfs-common, try "sudo mount -t nfs4 myserver.local:/mymount /mylocalmount", get "mount.nfs4: No such device". Do "sudo modprobe nfs", try again, works perfectly.

Revision history for this message
Kenny R (kenny-r) wrote :

Also have this problem in Maverick 64-bit

Revision history for this message
Leonardo Borda (lborda) wrote :

Hi

Have you guys tested adding nfs module to the /etc/modules on Maverick?

Leonardo

Revision history for this message
Ernst Kloppenburg (ernst-kloppenburg) wrote :

see comment #2: adding the module to /etc/modules is just a workaround to have it loaded at boot (==modprobe)

But the module should be loaded automatically when nfs4 is used. For nfs it already works like that. That is what this bug is about.

Revision history for this message
Stefan Bader (smb) wrote :

This is now worked around in Precise (12.04) by always starting idmapd (because mount does negotiate an nfs4 mount anyway, even when fstype is nfs) and having a modprobe for nfs in the startup script. So after installing nfs-common, the nfs module is practically always present (see bug #662711). Therefor marking this as fix released for trunk.

Changed in nfs-utils (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Stefan Bader (smb) wrote :

Probably does not make sense to keep that open. Feel free to change back when I am wrong.

Changed in util-linux (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.