0

[CentOS7, Western Digital myBook NAS]

I need to mount a NFS from an NAS. I am able to do this manually from the console with this command that doesn't require me to add a password on the command line.

sudo mount 192.168.1.222:/DataVolume/MyShare /home/westhamster/myshare

I needed to add the username (westhamster) and password to the NAS to allow access though.

However I need to mount the NFS automatically on boot. I am testing my fstab in both /etc/fstab and a local file /home/westhamster/myfstab with this entry:

192.168.1.222:/DataVolume/MyShare /home/westhamster/myshare nfs defaults 0 0

Either booting or giving this command:

sudo mount -a --fstab /home/westhamster/myfstab

But this does nothing and times out after a couple of minutes with this:

mount.nfs: Connection timed out

Do I need to somehow give the password to mount in this case, does it need the root password rather than the user password? If so what is the username? Would it be root? I would have to add this to the NAS users. It doesn't seem right to me.

WestHamster
  • 101
  • 1
  • 1
  • `mount -a` tries to mount all things; are there any other NFS mounts in fstab? Try just `mount /home/westhamster/myshare`. Connect timeout doesn't sound like an auth issue. – Jason Martin Jun 04 '17 at 19:13
  • No there are no username/password involved with nfs and AUTH_SYS. Did you try it directly after each other? mount ; unmount; mount -a ? To see if not the network/dns changed – eckes Jun 04 '17 at 19:29
  • `sudo mount /home/westhamster/myshare` also times out. – WestHamster Jun 05 '17 at 17:36
  • `sudo mount 192.168.1.222:/DataVolume/MyShare /home/westhamster/myshare` Mounts correctly
    `sudo umount /home/westhamster/myshare` unmounts correctly
    `sudo mount /home/westhamster/myshare` fails to mount & gives `mount.nfs: Connection timed out` error
    `sudo mount 192.168.1.222:/DataVolume/MyShare /home/westhamster/myshare` remounts correctly.
    – WestHamster Jun 05 '17 at 17:37

0 Answers0