Description of problem:
Using the -t nfs4 mount option on NFS mount fails with ENODEV
because the nfs kernel module is not being loaded.
Doing a modprobe nfs before the mount -t nfs4 causes
the mount to succeed.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. mount -t nfs4 server:/export /mnt
At this point its not clear whether this is a kernel, kmod or nfs-utils bug.
So since kmod is the new kid on the block lets start with it.
Seeing this with:
*** Bug 815829 has been marked as a duplicate of this bug. ***
This seems to basically boil down to a lack of an alias for 'nfs4' to 'nfs' because the kmod package doesn't ship /etc/modprobe.d/dist.conf.
Mount eventually calls /sbin/mount.nfs4, which does some wicked awesome socket-fu and then just calls the mount(2) syscall with "nfs4" as the fs_type parameter. The kernel goes off and tries to find said filesystem and can't because it's not loaded yet. So it eventually boils down to request_module with "nfs4" being the module name. That gets handled by modprobe.
On F16, module-init-tools ships /etc/modprobe.d/dist.conf which includes:
alias nfs4 nfs
so modprobe happily goes off and does all the wonderful things it does to load that, including processing any and all dependencies for the nfs module. It gets loaded, the kernel can find the filesystem now, and you're off running into other proverbial problems with NFS that have nothing to do with mounting it.
On F17, we ship kmod instead of module-init-tools. This is actually really cool, but I won't digress that much into why. However, despite the coolness of it, kmod can't read minds. Since there actually _isn't_ a real module named 'nfs4.ko' and the package isn't shipping the dist.conf file with a crap-load of aliases, it gets called with 'nfs4' and basically looks at you sideways and says "whatchu talkin' bout, Willis?" No NFS for you.
There are a couple of different solutions here.
1) Ship something with the alias again. Simplest, though I don't know why kmod isn't shipping dist.conf at all.
2) Somehow use MODULE_ALIAS in nfs.ko to alias it to nfs4.ko so the depmod magic happens and it works. That's untested but seems viable.
3) Make nfs-utils/util-linux magically know that 'nfs4' means 'nfs' and load the module. Honestly, that's a crappy solution but I listed it for completeness.
OK, so 725841 is why dist.conf isn't shipped in kmod (via being dropped in module-init-tools).
So either kmod or nfs-utils needs to ship a nfs.conf file that has the alias for nfs4->nfs, or option #2 above needs to happen.
Maybe option 1 as a stop gap, with option #2 being long term.
Created attachment 580534 [details]
Patch to have nfs-utils install the appropriate nfs4 modalias file
OK, since kmod isn't really specific to a single module, I decided to fix this in nfs-utils.
Steve, how's this look to you? If you approve, I can commit and build it for F17 and rawhide.
(In reply to comment #5)
> Created attachment 580534 [details]
> Patch to have nfs-utils install the appropriate nfs4 modalias file
> OK, since kmod isn't really specific to a single module, I decided to fix this
> in nfs-utils.
> Steve, how's this look to you? If you approve, I can commit and build it for
> F17 and rawhide.
Small correction needed to the patch, which is to mkdir -p the directory the alias file is installed in in the %install section.
I tested this too, and it works as well:
if upstream is quick about it, maybe the nfs-utils patch won't be needed.
(In reply to comment #7)
> I tested this too, and it works as well:
> if upstream is quick about it, maybe the nfs-utils patch won't be needed.
Upstream disliked the kernel patch.
I've committed the patch to nfs-utils to F17 and master and started a build for each.
Can we get an F17 update ASAP please? 1.2.5-15.fc17 works for me.
nfs-utils-1.2.5-15.fc17 has been submitted as an update for Fedora 17.
Proposing as NTH, this seems like something we ought to fix for final.
Fedora Bugzappers volunteer triage team
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing nfs-utils-1.2.5-15.fc17'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
I *strongly* support the NTH effort here. We mount nfs directories in %post and this is failing currently with TC4. I'm sure we could setup the module aliases there too, but this would be a nasty surprise for a lot of people I suspect. Having it in updates won't help the installer (at least it didn't for me), it needs to be in the installer image.
we have +3 NTH votes above (me, Orion, Dennis) so accepting as NTH.
Fedora Bugzappers volunteer triage team
+1 NTH as this seems like it could cause install issues in some cases.
nfs-utils-1.2.5-15.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.