nfs modules won't load on boot

Issues related to configuring your network
Post Reply
User avatar
KernelOops
Posts: 428
Joined: 2013/12/18 15:04:03
Location: xfs file system

nfs modules won't load on boot

Post by KernelOops » 2019/01/06 00:39:07

Hello everyone,

I would like to mount a single NFS share on a CentOS 7 server. At first I noticed that the mount command failed with the following error:

Code: Select all

mount.nfs: No such device
This is mostly due to the nfs modules not being loaded or if they are not available (kernel not compiled with nfs, etc). At first I tried to modprobe nfs but the module did not load... strange. Eventually, I could only load the required modules by running instmod directly on the module files:

Code: Select all

# insmod /lib/modules/3.10.0-957.1.3.el7.x86_64/kernel/fs/nfs/nfs.ko.xz 
# insmod /lib/modules/3.10.0-957.1.3.el7.x86_64/kernel/fs/nfs/nfsv4.ko.xz 
Now my mount command works fine. But, loading shares from the /etc/fstab fails because those modules don't load on boot, so how would I force the nfs modules to load on boot?

Thank you.
--
R.I.P. CentOS :cry:
--

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: nfs modules won't load on boot

Post by TrevorH » 2019/01/06 00:44:52

What's the output from rpm -V kernel-3.10.0-957.1.3.el7.x86_64 ?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
KernelOops
Posts: 428
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: nfs modules won't load on boot

Post by KernelOops » 2019/01/06 00:48:47

thanks for the quick reply, here is the output:

Code: Select all

# rpm -V kernel-3.10.0-957.1.3.el7.x86_64
.M.......  g /boot/initramfs-3.10.0-957.1.3.el7.x86_64.img
seems like only the initramfs is slightly modified, should be logical.

*edit*

this is a CentOS 7.6.1810 minimal installation, SELinux is enabled and in enforcing mode.
--
R.I.P. CentOS :cry:
--

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: nfs modules won't load on boot

Post by TrevorH » 2019/01/06 02:52:03

Is nfs-utils installed?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

User avatar
KernelOops
Posts: 428
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: nfs modules won't load on boot

Post by KernelOops » 2019/01/06 10:22:09

Yes it is. Its one of the packages that I've set to be installed via my ansible playbook:

Code: Select all

# rpm -q nfs-utils
nfs-utils-1.3.0-0.61.el7.x86_64
--
R.I.P. CentOS :cry:
--

User avatar
KernelOops
Posts: 428
Joined: 2013/12/18 15:04:03
Location: xfs file system

Re: nfs modules won't load on boot

Post by KernelOops » 2019/01/13 12:43:32

*update*

I've found the cause of the problem. Apparently, *something* installed a blacklist file under /etc/modprobe.d/ which prevented nfs from loading automatically.
--
R.I.P. CentOS :cry:
--

Post Reply