NFS remote folder won't mount at startup

New to Debian (Or Linux in general)? Ask your questions here!

NFS remote folder won't mount at startup

Postby memory_channel » 2018-12-25 20:23

Hi

I have an NFS folder on freenas and I'm trying to access it with Debian 9

Using the "mount" command on a terminal works but only with root

But once put on /etc/fstab it doesn't mount on startup, once the system started I have to be on root on terminal and type "mount -a" for it to work

So there seems no way to get to the folder to mount without root privilege, but then what do I have to modify?

Am I missing something?

Thanks
memory_channel
 
Posts: 3
Joined: 2018-12-25 20:17

Re: NFS remote folder won't mount at startup

Postby memory_channel » 2018-12-25 20:57

applologises :)

As I confirmed the enttry does work after system started and logged and typed mout -a as root, I assumed the entry is fine and should be something else

here is the entry :

Code: Select all
192.167.1.23:/mnt/file/video /mnt/video nfs rw,async,hard,intr,noexec 0 0


Again the entry works fine once I type mount -a as root

Thanks a lot!
memory_channel
 
Posts: 3
Joined: 2018-12-25 20:17

Re: NFS remote folder won't mount at startup

Postby memory_channel » 2018-12-25 21:38

wizard10000 wrote:This ought to do you - the _netdev tells the system it has to wait for the network.

Code: Select all
192.167.1.23:/mnt/file/video /mnt/video nfs _netdev,rw,async,hard,intr,noexec 0 0


Hope this helps -



unfortunately it doesnt seem to work

I was told I might have to set up a systemd mount unit , never done that before
memory_channel
 
Posts: 3
Joined: 2018-12-25 20:17

Re: NFS remote folder won't mount at startup

Postby kevinthefixer » 2018-12-26 00:15

Ran into similar problems myself. Not sure why _netdev isn't working for you, but what I did was pass the "users" option in fstab, then run a script as my normal user after logon. It allows normal users to mount the volume. If you're using NetworkManager you can also put the script in its folder to run after the network is up (forget exactly where but look in man networkmanager). Always end such scripts with "exit 0" (that's a zero) so the whole system doesn't end up waiting for your NFS share to mount.
kevinthefixer
 
Posts: 188
Joined: 2018-05-05 22:30


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable