SOLVED: NFS entries in /etc/fstab not mounting on boot in LM 18.3 MATE

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
PJO3
Level 1
Level 1
Posts: 23
Joined: Sat Nov 19, 2016 8:24 am

SOLVED: NFS entries in /etc/fstab not mounting on boot in LM 18.3 MATE

Post by PJO3 » Wed Jan 17, 2018 2:02 pm

I have set up a new laptop for my wife running Linux Mint MATE (I use Cinnamon). Both 18.3.

The FSTAB file for both laptops includes identical NFS mounts. On my machine the mounts are available when the machine has booted, on my wife's they are not, but are available after "sudo mount -a".

I found this discussion from 2009 which appears to address the issue:

https://www.linuxquestions.org/question ... ot-546512/

However, I do not know enough about runlevels to make the appropriate adjustments and don't want to risk breaking anything and assume that the problem, if there is one, is best fixed for everyone. I will look for other solutions but thought I'd report the issue here anyway.

I tried to put a launcher icon on the desktop to mount the NFS shares via a bash script. That didn't go well. I found the following discussion which seems relevant:

viewtopic.php?t=231043

but was unable to get the solution indicated in the last message to work. I also tried adding a timeout to the NFS mount command (up to a 600 tenths of a second); that didn't work.

Code: Select all

sudo umount -a 
works, but sometimes yields "target is busy" for each of

Code: Select all

/run/user/1000
/home
/sys/fs/cgroup/systemd
/sys/fs/cgroup
/dev/shm
/
/run
/dev
Is there something I should do before umount?

I'm using the latest kernel (4.13.0-26) on this machine--and tried 4.4.0-109 with similar results.

Thanks for any suggestions.
Last edited by PJO3 on Fri Jan 19, 2018 3:31 pm, edited 1 time in total.

PJO3
Level 1
Level 1
Posts: 23
Joined: Sat Nov 19, 2016 8:24 am

Re: NFS entries in /etc/fstab not mounting on boot in LM 18.3 MATE

Post by PJO3 » Thu Jan 18, 2018 6:36 am

Update:

I set up an old PC an installed LM 18.3 MATE on it and found that NFS shares mounted correctly on boot. The only thing different is that it's a 32bit version whereas the laptop is 64bit, so I'm guessing that something else is wrong and I'll just reinstall Mint and see if that resolves it. The only non-default thing I did in setting up the laptop was putting the home folder on a separate partition.

However, I'd still like to know what I need to do get a desktop launcher to work :-) but that can wait a little if I can avoid needing to manually mount the NFS shares.

PJO3
Level 1
Level 1
Posts: 23
Joined: Sat Nov 19, 2016 8:24 am

Re: NFS entries in /etc/fstab not mounting on boot in LM 18.3 MATE

Post by PJO3 » Thu Jan 18, 2018 9:50 pm

Update:

I've reinstalled Mint 18.3 MATE 64bit on the laptop and applied updates up to and including level 2, then installed nfs-common and added the NFS share to /etc/fstab/

Result (on restart): the NFS share is not loaded. It loads ok after sudo mount -a , but as before gives some warnings when unmounted.

The failure to automount seems to be a difference between the 32bit and 64bit versions of Mint 18.3 MATE.

Innz
Level 1
Level 1
Posts: 3
Joined: Fri Jan 19, 2018 2:30 am

Re: NFS entries in /etc/fstab not mounting on boot in LM 18.3 MATE

Post by Innz » Fri Jan 19, 2018 2:37 am

I have a similar issue. Being new to linux I am not sure how to go about trouble shooting the issue. I have a Synology NAS that I store my movies etc on and then mount the share on my Linux mint box. The linux box runs plex and is unable to mount the share after recent updates. I have been scratching my head for a couple of days now. Any Ideals or guidance on how to start figuring this out would be greatly appreciated. Here is what I have in my fstab to mount the shares.
//192.168.1.254/movies /media/movies cifs username=username,password=mypassword,iocharset=utf8,sec=ntlm 0 0
//192.168.1.254/tv_series /media/tv cifs username=username,password=mypassword,iocharset=utf8,sec=ntlm 0 0
//192.168.1.254/workout /media/workout cifs username=username,password=mypassword,iocharset=utf8,sec=ntlm 0 0

brandon@PLEX ~ $ sudo mount -a
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
mount error(95): Operation not supported
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

PJO3
Level 1
Level 1
Posts: 23
Joined: Sat Nov 19, 2016 8:24 am

Re: NFS entries in /etc/fstab not mounting on boot in LM 18.3 MATE

Post by PJO3 » Fri Jan 19, 2018 8:39 am

I'm also using a Synology NAS (and a FreeNAS box of my own*).

I have no problem with Samba (cifs) mounts, only NFS and only on 64bit MATE (not on Cinammon, which seems odd). I inquired on the IRC channel about making a bug report -- wasn't sure what package, if any, on github was relevant. The answer was "That's an Ubuntu bug, so go to launchpad" (of course, forgot). Meanwhile, I've found this: https://askubuntu.com/questions/981080/ ... 550#997550, which might suggest the problem is new -- since 16.04, and therefore shouldn't exist in Mint (AFAIK), but I'm not persuaded yet that it's a new issue. I need to so some searching using "ubuntu" instead of "linux mint".

The latest kernel broke cifs mounts for some people so you may be affected by that -- there's some discussion of that here if you look for it. I think it's easily fixed. Your other option may be to use webDAV. Have you added a user in /etc/samba/smbusers like so

innz = innz

or whatever the username is? My recollection may be wrong but I seem to recall that the smb support now defaults to v4 and you may need to make an adjustment on the Synology (ticking the box for v4 support) if that's the case.

*for what it's worth I no longer think Synology is worthwhile and I'll likely switch which is my primary and which is my secondary NAS at some point.

Update: see this thread viewtopic.php?f=157&t=261306 and this one viewtopic.php?f=157&t=261424

PJO3
Level 1
Level 1
Posts: 23
Joined: Sat Nov 19, 2016 8:24 am

Re: NFS entries in /etc/fstab not mounting on boot in LM 18.3 MATE

Post by PJO3 » Fri Jan 19, 2018 9:31 am

This seems relevant to the NFS mounting problem: https://askubuntu.com/questions/979058/ ... -boot-time.

Will see if I can figure this out.

Update:

I made the first two of the three edits indicated here
So, to solve this situation what I made is:

First, I edited the file /lib/systemd/system/remote-fs-pre.target and added:

Wants=network-online.target
After=network-online.target


Then, in /etc/fstab I indicated to the NFS mountpoint the next options:

X.X.X.X:/nfs_share /mnt/nas nfs _netdev,noauto,x-systemd.automount,nolock,soft,intr,nfsvers=3,tcp,bg,rw 0 0

And finally, we indicate to systemd that rbinds are network device (so, systemd will put them on remote-fs.target) and also I indicated that /mnt/nas has to be mounted strictly.

/mnt/nas/config/php /etc/php none noauto,_netdev,x-systemd.automount,x-systemd.requires=/mnt/nas,rbind,defaults 0 0

I think the last refers to what one might call a mount within a mount, which I don't have or need.

And... this resolves the problem. My NFS shares now mount on boot.

Innz
Level 1
Level 1
Posts: 3
Joined: Fri Jan 19, 2018 2:30 am

Re: SOLVED: NFS entries in /etc/fstab not mounting on boot in LM 18.3 MATE

Post by Innz » Sat Jan 20, 2018 8:41 am

I have two ways to resolve mine and hope this helps someone else.
1st was to add vers=1.0 to the end of the fstab statements. Like shown below.
//192.168.1.254/movies /media/movies cifs username=username,password=mypassword,iocharset=utf8,sec=ntlm,vers=1.0 0 0
//192.168.1.254/tv_series /media/tv cifs username=username,password=mypassword,iocharset=utf8,sec=ntlm,vers=1.0 0 0
//192.168.1.254/workout /media/workout cifs username=username,password=mypassword,iocharset=utf8,sec=ntlm,vers=1.0 0 0

The 2nd and preferred method was to go to the NAS and enable SMB 3 leaving the fstab statements without the version.
//192.168.1.254/movies /media/movies cifs username=username,password=mypassword,iocharset=utf8,sec=ntlm 0 0
//192.168.1.254/tv_series /media/tv cifs username=username,password=mypassword,iocharset=utf8,sec=ntlm 0 0
//192.168.1.254/workout /media/workout cifs username=username,password=mypassword,iocharset=utf8,sec=ntlm 0 0

For Synology DSM 6.1.4-15217 Update 5
Files Services>SMB/AFP/NFS Tab>Advanced Settings and then Maximum SMB Protocol to SMB3

Post Reply

Return to “Other networking topics”