[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.
`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