Mount nfs shares from fstab

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Mount nfs shares from fstab

Post by johnvick »

This fstab line works fine in Odroid XU4 but stops BananaPi from booting - both on v 156 DietPi and both on wired LAN.

192.168.1.14:/home/john/completed /mnt/completed nfs rsize=8192,wsize=8192,timeo=14,intr,nofail 0 0

I assume it is due to the networking not being up as I can mount the share from the command line.

I have spent hours on this today to no avail - I have tried the _netdev option in fstab. I tried autofs. No luck with either.

Any ideas?
beethoven

Re: Mount nfs shares from fstab

Post by beethoven »

Hi johnvick I had the same trouble, it was simply not mounting, the share, looking into log I found something like rpcbind was not yet started.
I used as workaround to put last line in /etc/rc.local the command to mount the share , before the last line "exit 0".
This worked for me, I wasted a day on it but no way to let it start at boot time by fstab only.
Bye
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Mount nfs shares from fstab

Post by johnvick »

Thanks but no luck with this here - I put a sleep 20 before the mount command but again no difference.

I tried crontab -e

and added

@reboot mount -t nfs 192.168.1.14:/home/john/completed /mnt/completed

to the end of the file, but no luck with this either!
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Mount nfs shares from fstab

Post by johnvick »

Solved:

Editing the line in fstab to:

192.168.1.14:/home/john/completed /mnt/completed nfs rsize=8192,wsize=8192,timeo=14,intr,nofail,noauto,x-systemd.automount 0 0

noauto,x-systemd.automount - this was the key.
User avatar
Sciamano
Posts: 264
Joined: Sat Oct 15, 2016 12:18 pm
Location: Italy

Re: Mount nfs shares from fstab

Post by Sciamano »

Sorry for arriving late... I had the same problem before and had solved it by adding noauto,x-systemd.automount to the fstab line.
I think I've written about this somewhere on the board, but can't find where. :)
Post Reply