Jump to content
Forums in Read-Only Mode - Please use Reddit ×
  • 0

NFS not mounting on boot


dkg

Question

My NFS4 mount in /etc/fstab is not mounting on boot.  I made the switch from nfsmount to nfsclient as recommended when I updated the system.  Both nfsmount and netmount are in the default runlevel.  If, after booting, I restart netmount, the NFS mount starts up.  Was there something else I'm supposed to do?

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

  • 0

Also, if the NFS export is mounted on shutdown, netmount hangs with 'Unmounting network filesystems...'.  The logs have this:

Feb  2 09:58:44 nymph kdm[4582]: :0[4582]: pam_unix(kde:session): session closed for user dave
Feb  2 10:01:08 nymph kernel: nfs: server wolfie not responding, still trying
Feb  2 10:01:57 nymph kernel: nfs: server wolfie not responding, timed out
Feb  2 10:04:57 nymph kernel: nfs: server wolfie not responding, timed out
Feb  2 10:05:02 nymph kernel: nfs: server wolfie not responding, timed out

Seems like the network is going down before netmount does it's thing?

Link to comment
Share on other sites

  • 0

I configured as the post-install text recommended.  It worked after installation, but not after subsequent reboots.  I had to revert to the previous version and revert to the previous startup scripts.
 
With nfs-utils-1.3.2-r6 installed, nfsmount disabled and nfsclient and netmount enable, fstab specified mounts (only two) fail.
 

# rc-status
Runlevel: default
 netif.eth0                                                        [  started  ]
 netif.tap0                                                        [  started  ]
 netif.tap1                                                        [  started  ]
 netif.br0                                                         [  started  ]
 sysklogd                                                          [  started  ]
 ntp-client                                                        [  stopped  ]
 ntpd                                                              [  started  ]
 netif.eth1                                                        [  started  ]
 numlock                                                           [  started  ]
 acpid                                                             [  started  ]
 dbus                                                              [  started  ]
 nfsclient                                                         [  started  ]
 netmount                                                          [  stopped  ]
 xdm                                                               [  started  ]
 cupsd                                                             [  started  ]
 shorewall                                                         [  started  ]
 postfix                                                           [  started  ]
 sshd                                                              [  started  ]
 apcupsd                                                           [  started  ]
 udev-postmount                                                    [  started  ]
 vixie-cron                                                        [  started  ]
 local                                                             [  started  ]
Dynamic Runlevel: hotplugged
Dynamic Runlevel: needed
 rpc.pipefs                                                        [  started  ]
 lvmetad                                                           [  started  ]
 rpcbind                                                           [  started  ]
 rpc.statd                                                         [  started  ]
 rpc.idmapd                                                        [  started  ]
 xdm-setup                                                         [  started  ]
Dynamic Runlevel: manual
 openrc-settingsd                                                  [  started  ]

 
netmount is stopped - trying to restart it manually yields:
 

# /etc/init.d/netmount start
 * Mounting network filesystems ...
mount.nfs: an incorrect mount option was specified
mount.nfs: an incorrect mount option was specified
mount.nfs: an incorrect mount option was specified
mount.nfs: an incorrect mount option was specified
 * Could not mount all network filesystems                                [ !! ]
 * ERROR: netmount failed to start

 
Rolling back to nfs-utils-1.2.9-r4 and reverting back to only using nfsmount and everything works perfectly.  The NFS shares are on a Synology Disk Station using nfs v3 shares.

Link to comment
Share on other sites

  • 0

After studying the related gentoo bug, I found a workaround by changing /etc/conf.d/netmount like so:

rc_need="netif.eth0 nfsclient"

This fixed both my boot/mount and shutdown/unmount problems.  I think nfsclient+netmount in default runlevel is supposed to work though (based on statements by the gentoo dev).  I'll probably create a bug from the notes I put together.  I just wanted to make sure I wasn't doing something stupid first. :)

Link to comment
Share on other sites

  • 0

The nfsmount startup from nfs-utils is deprecated.   Make sure that you have the netmount startup configured.

 

Sorry, my initial post had a typo.  It was supposed to say "Both nfsclient and netmount are in the default runlevel."

Link to comment
Share on other sites

  • 0

I also changed my fstab mount options, which were not an issue with the previous versions(s) of nfs-utils, adding _netdev.  Works with the 1.2.9-r4 but I still cannot mount the remote shares with >nfs-utils-1.2.9-r.  Heres the error when running netmount manually:

# /etc/init.d/netmount start
 * Mounting network filesystems ...
mount.nfs: an incorrect mount option was specified
mount.nfs: an incorrect mount option was specified
mount.nfs: an incorrect mount option was specified
mount.nfs: an incorrect mount option was specified
 * Could not mount all network filesystems                                [ !! ]
 * ERROR: netmount failed to start
 

Ran mount.nfs manually with my fstab mount info, with the verbose flag:

# mount.nfs -v 192.168.16.244:/volume1/homes/blah /mnt/blah
mount.nfs: timeout set for Thu Feb  4 12:14:20 2016
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.16.244,clientaddr=192.168.16.191'
mount.nfs: mount(2): Invalid argument
mount.nfs: an incorrect mount option was specified
 

Looks like mount.nfs is only trying NFS version 4.2, and not trying any other versions after failing.  According to the docs, NFS should keep trying earlier versions after failure.  No evidence that is occuring here.

 

Specifiying "vers=3" and the share is mounted successfully.

# mount.nfs -o vers=3 -v 192.168.16.244:/volume1/homes/blah /mnt/blah
mount.nfs: timeout set for Thu Feb  4 12:18:13 2016
mount.nfs: trying text-based options 'vers=3,addr=192.168.16.244'
mount.nfs: prog 100003, trying vers=3, prot=6
mount.nfs: trying 192.168.16.244 prog 100003 vers 3 prot TCP port 2049
mount.nfs: prog 100005, trying vers=3, prot=17
mount.nfs: trying 192.168.16.244 prog 100005 vers 3 prot UDP port 892
 

It seems that the version fallback feature of NFS it not working for some reason.  I'd say it's a bug.

 

Straight from 'man nfs':

 

  Options supported by all versions
       These options are valid to use with any NFS version.
 
       nfsvers=n      The  NFS  protocol  version  number  used to contact the
                      server's NFS service.  If the server  does  not  support
                      the requested version, the mount request fails.  If this
                      option is not specified, the client negotiates  a  suit?
                      able  version  with  the server, trying version 4 first,
                      version 3 second, and version 2 last.
 
       vers=n         This option is an alternative to the nfsvers option.  It
                      is  included for compatibility with other operating sys?
                      tems
Adding 'vers=3' to my /etc/fstab nfs mount options solved the problem.
Link to comment
Share on other sites

  • 0

I also changed my fstab mount options, which were not an issue with the previous versions(s) of nfs-utils, adding _netdev.

 

Previously, nfsmount would mount your NFS shares.  nfsclient from the new nfs-utils will not.  netmount will not mount nfs shares unless _netdev is specified (I think partly to avoid mounting NFS shares twice, in case both nfsmount and netmount were started on boot).

 

 

mount.nfs: trying text-based options 'vers=4.2,addr=192.168.16.244,clientaddr=192.168.16.191'

mount.nfs: mount(2): Invalid argument

mount.nfs: an incorrect mount option was specified

 

It looks to me you aren't allowed to specify a point version for this option, so it's aborting.  The issue isn't that the server doesn't support 4.2, which would be cause for a fallback, it's that you have an invalid argument value.

Link to comment
Share on other sites

  • 0

The point is, I'm not specifying vers-4.2, the new nfs-utils is doing that by default.  I only exposed the default common by running mount.nfs with the -v (verbose) switch to aid in troubleshooting my issue.  As per the man page info I posted above - If a version is specified and fails, it's a permanent failure, where as if no version is specified, it will try 4, then 3 then 2.  Apparently it is not doing that.  It try's 4.2 and if it fails, no fall back versions are tried.

 

As far as _netdev option is concerned, I tried both with and without _netdev in my fstab.  As long as I specified vers=3, mounting with or without _netdev worked.

Link to comment
Share on other sites

  • 0

Sorry, I thought you had vers=4.2 as a mount option in your fstab file.  I tried this on my my system:

# mount.nfs -v wolfie:/share /share
mount.nfs: timeout set for Fri Feb  5 21:00:46 2016
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.0.3,clientaddr=192.168.0.50'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.1,addr=192.168.0.3,clientaddr=192.168.0.50'

Do you have NFSv4.2 support enabled in your kernel?  I do.

Link to comment
Share on other sites

×
×
  • Create New...