NFS share doesn't work in Mint 18 [Solved?]

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
timmn1
Level 2
Level 2
Posts: 65
Joined: Mon Jun 08, 2009 12:34 pm
Location: Near intersection of I-80 and I-57 in US

NFS share doesn't work in Mint 18 [Solved?]

Postby timmn1 » Sat Aug 06, 2016 3:46 pm

I have an NFS share on an old server. This particular setup worked fine under Mint 17.X, Under 18, it won't work at all.

This is what I did to install NFS on Mint 18:
sudo apt-get install nfs-common
This installed without a hitch.

Added the following line to /etc/fstab:
mediaserver1:/export/Music /home/napravnt/NFS_Music nfs rsize=8192,wsize=8192,timeo=14,intr
And made the /home/napravnt/NFS_Music directory.

Do I have to do anything different because it's Mint 18?
Last edited by timmn1 on Fri Aug 12, 2016 9:33 pm, edited 1 time in total.
Someday, maybe I'll figure out exactly what the hell I'm doing.

zanvd
Level 1
Level 1
Posts: 11
Joined: Mon Aug 08, 2016 5:18 am

Re: NFS share doesn't work in Mint 18

Postby zanvd » Mon Aug 08, 2016 8:56 am

Does mount show your NFS?

(have you mounted it?)

timmn1
Level 2
Level 2
Posts: 65
Joined: Mon Jun 08, 2009 12:34 pm
Location: Near intersection of I-80 and I-57 in US

Re: NFS share doesn't work in Mint 18

Postby timmn1 » Mon Aug 08, 2016 11:31 am

zanvd wrote:Does mount show your NFS?

(have you mounted it?)


Mount show doesn't show it, but the line added to /etc/fstab is supposed to mount it.

mediaserver1:/export/Music /home/napravnt/NFS_Music nfs rsize=8192,wsize=8192,timeo=14,intr
Someday, maybe I'll figure out exactly what the hell I'm doing.

timmn1
Level 2
Level 2
Posts: 65
Joined: Mon Jun 08, 2009 12:34 pm
Location: Near intersection of I-80 and I-57 in US

Re: NFS share doesn't work in Mint 18

Postby timmn1 » Mon Aug 08, 2016 1:35 pm

One thing that is interesting is that if I click on the Home icon on the Desktop NFS_Music is listed under Network on the lower left side of the window. If I click on it, I get the message "mount: only root can mount mediaserver1:/export/Music on /home/napravnt/NFS_Music"

It's been a while since I set this up, but it was working fine under Mint 17.X, have I forgotten something?
Someday, maybe I'll figure out exactly what the hell I'm doing.

zanvd
Level 1
Level 1
Posts: 11
Joined: Mon Aug 08, 2016 5:18 am

Re: NFS share doesn't work in Mint 18

Postby zanvd » Mon Aug 08, 2016 5:08 pm

If I recall correctly, you have to execute mount command after adding a line to fstab file.

http://blog.zwiegnet.com/linux-server/m ... inux-mint/

Try executing

Code: Select all

mount -a

timmn1
Level 2
Level 2
Posts: 65
Joined: Mon Jun 08, 2009 12:34 pm
Location: Near intersection of I-80 and I-57 in US

Re: NFS share doesn't work in Mint 18

Postby timmn1 » Mon Aug 08, 2016 11:20 pm

zanvd wrote:If I recall correctly, you have to execute mount command after adding a line to fstab file.

http://blog.zwiegnet.com/linux-server/m ... inux-mint/

Try executing

Code: Select all

mount -a


sudo mount -a works, but the information I have says that it should automount with the line added to /etc/fstab:
Mount using /etc/fstab

Using fstab is useful for a server which is always on, and the NFS shares are available whenever the client boots up. Edit /etc/fstab file, and add an appropriate line reflecting the setup. Again, the server's NFS export root is omitted.

https://wiki.archlinux.org/index.php/NFS

The problem is that this setup works under Mint 17.X
Someday, maybe I'll figure out exactly what the hell I'm doing.

altair4
Level 18
Level 18
Posts: 8784
Joined: Tue Feb 03, 2009 10:27 am

Re: NFS share doesn't work in Mint 18

Postby altair4 » Tue Aug 09, 2016 8:43 am

sudo mount -a works,

I haven't used NFS in more than 20 years but what you could try is something that is sometimes used with a cifs ( samba ) fstab mount:

Create a file:

Code: Select all

gksu xed /etc/network/if-up.d/fstab

Add this to it:

Code: Select all

#!/bin/sh
mount -a

Make the file executable:

Code: Select all

sudo chmod +x /etc/network/if-up.d/fstab


It's possible that the line in fstab that tries to connect to the server is executed before the network is "up". Scripts in if-up.d will only run after the network is functional.

systemd ( just like upstart before it ) is supposed to take care of this automatically making this workaround unnecessary but ... erm ... it doesn't seem to always work.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

timmn1
Level 2
Level 2
Posts: 65
Joined: Mon Jun 08, 2009 12:34 pm
Location: Near intersection of I-80 and I-57 in US

Re: NFS share doesn't work in Mint 18

Postby timmn1 » Fri Aug 12, 2016 9:29 pm

altair4 wrote:
sudo mount -a works,

I haven't used NFS in more than 20 years but what you could try is something that is sometimes used with a cifs ( samba ) fstab mount:

Create a file:

Code: Select all

gksu xed /etc/network/if-up.d/fstab

Add this to it:

Code: Select all

#!/bin/sh
mount -a

Make the file executable:

Code: Select all

sudo chmod +x /etc/network/if-up.d/fstab


It's possible that the line in fstab that tries to connect to the server is executed before the network is "up". Scripts in if-up.d will only run after the network is functional.

systemd ( just like upstart before it ) is supposed to take care of this automatically making this workaround unnecessary but ... erm ... it doesn't seem to always work.


Well, that seems to work, but I think maybe I'll reinstall Mint 17.3 until they come out with Mint 18.1 I'm having intermittent boot and shutdown problems also.
Someday, maybe I'll figure out exactly what the hell I'm doing.

mhenatsch
Level 1
Level 1
Posts: 4
Joined: Sun Aug 14, 2016 12:21 pm

Re: NFS share doesn't work in Mint 18 [Solved?]

Postby mhenatsch » Mon Aug 15, 2016 10:03 am

The line in /etc/fstab, as you quoted it, is missing the option "users". This option is required to allow 'ordinary' users to mount the share. Without it only root can mount it.

timmn1
Level 2
Level 2
Posts: 65
Joined: Mon Jun 08, 2009 12:34 pm
Location: Near intersection of I-80 and I-57 in US

Re: NFS share doesn't work in Mint 18 [Solved?]

Postby timmn1 » Wed Aug 17, 2016 1:07 am

mhenatsch wrote:The line in /etc/fstab, as you quoted it, is missing the option "users". This option is required to allow 'ordinary' users to mount the share. Without it only root can mount it.


I can't find anything about a "users" option, but I have went back to Mint 17.3 and using the same line in /etc/fstab it works just fine. It just doesn't seem to work in Mint 18.
Someday, maybe I'll figure out exactly what the hell I'm doing.

User avatar
matt
Level 3
Level 3
Posts: 138
Joined: Sat Jun 04, 2016 3:13 pm
Location: Earth/North America/USA/home

Re: NFS share doesn't work in Mint 18 [Solved?]

Postby matt » Wed Aug 17, 2016 2:32 am

  1. Code: Select all

    sudo nano ~/.smbcredentials

  2. Replace value in quotation marks. Press ctrl + o, hit Enter. Press ctrl + x to exit.
    username="username"
    password="password"


  3. Change permissions:

    Code: Select all

    sudo chmod 600 ~/.smbcredentials

  4. Change ownership for added security:

    Code: Select all

    sudo chown root .smbcredentials

  5. Edit fstab:

    Code: Select all

    sudo nano /etc/fstab

  6. Replace the values of: IP address, ShareName, ShareDirectory and YourUsername.

    Code: Select all

    //123.456.7.890/ShareName  /media/user/ShareDirectory  cifs   uid=1000,credentials=/home/YourUsername/.smbcredentials,iocharset=utf8,sec=ntlmssp   0       0

  7. Mount shares:

    Code: Select all

    sudo mount -a

Note: You don't need to install nfs-common. cifs-utils is already installed.

altair4
Level 18
Level 18
Posts: 8784
Joined: Tue Feb 03, 2009 10:27 am

Re: NFS share doesn't work in Mint 18 [Solved?]

Postby altair4 » Wed Aug 17, 2016 7:05 am

timmn1 wrote:
mhenatsch wrote:The line in /etc/fstab, as you quoted it, is missing the option "users". This option is required to allow 'ordinary' users to mount the share. Without it only root can mount it.


I can't find anything about a "users" option, but I have went back to Mint 17.3 and using the same line in /etc/fstab it works just fine. It just doesn't seem to work in Mint 18.

** The "users" option does exactly what was described above. It allows every user the ability to mount and unmount the partition. I don't know why you would want to do that in this case since root will mount the share and everything else in fstab anyway. The right to mount something and the right to use something are two different things.

** The line you have in fstab works in Mint18 it just doesn't work at boot time or else a sudo mount -a wouldn't work. There does appear to be some kind of problem with network initialization in Mint18 and maybe Ubuntu 16.04 itself but I can't find the cause.

** @matt, There's nothing wrong with your post but the OP is using NFS not CIFS. Unless you are suggesting he replace NFS with CIFS.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

mhenatsch
Level 1
Level 1
Posts: 4
Joined: Sun Aug 14, 2016 12:21 pm

Re: NFS share doesn't work in Mint 18 [Solved?]

Postby mhenatsch » Wed Aug 17, 2016 7:56 am

I don't know why you would want to do that in this case since root will mount the share and everything else in fstab anyway.

timmn1 said that an attempt at manually mounting the share with mount -a failed with "only root can do that" (or to that effect). He was able to sudo mont -a, though. That's why I suggest to include the option "users" in the fstab line. He could just the same include "user" (singular) instead of "users" (plural) if he wants to restrict the right to unmount the share to himself only.

timmn1
Level 2
Level 2
Posts: 65
Joined: Mon Jun 08, 2009 12:34 pm
Location: Near intersection of I-80 and I-57 in US

Re: NFS share doesn't work in Mint 18 [Solved?]

Postby timmn1 » Wed Aug 17, 2016 11:52 pm

altair4 wrote:** The line you have in fstab works in Mint18 it just doesn't work at boot time or else a sudo mount -a wouldn't work. There does appear to be some kind of problem with network initialization in Mint18 and maybe Ubuntu 16.04 itself but I can't find the cause.


There seems to be a lot of problems with Mint 18 and/or Ubuntu 16.04 and that's why I went back to 17.3 On top of the network problems, It had intermittent problems at boot time and also at shutdown. Once it was started, Mint 18 was great, but where I can fix many simple problems, I am far from a Linux guru. I needed this computer to boot and shutdown reliably, and Mint 18 just wasn't doing it.

It could be that all the problems I've been having with Mint 18 are related somehow, but I don't know even where to start.
Someday, maybe I'll figure out exactly what the hell I'm doing.

User avatar
dsv
Level 1
Level 1
Posts: 1
Joined: Sun Sep 04, 2016 5:25 am
Location: Paris, France

Re: NFS share doesn't work in Mint 18 [Solved?]

Postby dsv » Sun Sep 04, 2016 5:43 am

I just experienced this exact problem after my upgrade from 17.3 to 18.

In playing around I discovered two things :
  1. the swap entries in my fstab still need to appear at the very end of the list - nothing after them mounts - as in Mint 17.x
  2. a spurious bind entry in my fstab was preventing all network mounts - new to Mint 18
This spurious bind entry was binding a previously commented out NFS network mount that I was no longer using (the network resource is gone for now).

BTW, this spurious bind entry and its related NFS mount entry were:

Code: Select all

#192.168.0.12:/export/dsv   /mnt/nfs-x100e   nfs   rw,_netdev,suid,dev,exec,auto,nouser,noatime,sync,rsize=8192,wsize=8192   0   0
/home/dsv   /export/dsv   none   rw,bind   0   0

(the first line wraps, above)

Commenting out this bind entry to a commented got the other network mounts (both cifs and nfs) to work again. Whether the issues is using a bind on an /export mount point or because the bind was on a mount point that wasn't being mounted, I don't know. I rather suspect it might be the former, and this mechanism doesn't seem to be used much anymore. But this is pure, uninformed speculation.

altair4
Level 18
Level 18
Posts: 8784
Joined: Tue Feb 03, 2009 10:27 am

Re: NFS share doesn't work in Mint 18 [Solved?]

Postby altair4 » Sun Sep 04, 2016 8:04 am

dsv wrote:the swap entries in my fstab still need to appear at the very end of the list - nothing after them mounts - [b]as in Mint 17.x

That’s interesting. I've never seen that before. I have many entries after the swap entry that mount although none of them are NFS mounts.

Is this unique to NFS mounts? Or unique to Mint perhaps?
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
cliffyk
Level 1
Level 1
Posts: 2
Joined: Sat Nov 08, 2014 8:09 pm
Location: Saint Augustine FL

Re: NFS share doesn't work in Mint 18 [Solved?]

Postby cliffyk » Fri Apr 14, 2017 4:30 pm

Old thread I know, however I wanted to report that I just loaded up a new server with Mint 18 and had the same issue, moving the swap entries to the bottom of /etc/fstab fixed it all up with no other changes to the file I've been using on 16.x/17.x for years...

leo.smith
Level 1
Level 1
Posts: 24
Joined: Wed Jan 02, 2013 12:23 pm

Re: NFS share doesn't work in Mint 18 [Solved?]

Postby leo.smith » Thu Aug 03, 2017 3:52 am

Ive just installed Mint 18 on a laptop and this is the last straw

I cannot believe how buggy the release is.
This doesn't work.

Also I changed window managers and now no matter what I do all the panel apps like the clock and so on keep crashing even though I put the original manager back

secure boot that I never needed to mess with now is a disaster area and prevented me from installing 3rd party drivers and took 3 goes to switch off, and now tells me 'insecure boot' every time I boot.

Reinstalling 17.3...

ralfz
Level 1
Level 1
Posts: 9
Joined: Sat May 28, 2016 1:47 pm

Re: NFS share doesn't work in Mint 18 [Solved?]

Postby ralfz » Mon Nov 13, 2017 6:31 am

Hi,

During last weekend i ran into a problem which fits into this thread.

Background: i have a total of 5 systems using NFS, 3 are running Mint 17.3
(Intel NUCi3, Lenovo T420 + Fujitsu Lifebook) and 2 are running Mint 18.2
(Lenovo T400 and Lenovo T61). I installed a 6th system (another Lenovo T420)
with Mint 18.2 and prepared the integration into my network by doing the usual
stuff like adding user accounts (for the NFS ) adding nfs-common,
making mount points, etc, etc, Did that dozen times before, we are running
a NFS based "Famlily Network" (thanks god no Windows) since more than 10
years now.

After adding the necessary usual entries to the fstab and rebooting, i discovered
the the boot process takes much longer than usual. First i expected a typo in
the fstab and double checked it after the box comes up but everything was fine
i am using a template for that cause i am a lzy guy :-)
Strange thing: no mounts were there (df and mount) and doing a mount -a brings
up all NFS shares immediately !

Additional info: This happend with a 2,4 or 5 GHz WLAn connection using the
1 GB Ethernet port didnt show that effect. Pls. be aware that the T400 (18.2),
the Lifebook (17.3), the other T420 (17.3 and the T61 (18.2) are working fine.
Their NFS mount via fstab is working stable and all systems are in heavy
daily use by my daughters and my wife and of course ba myself.

Since the new T420 is a new system, there is no problem for me in going back
to V17.3 which will i do this evening and i will report the result here.

Kind regards,
Ralf

ralfz
Level 1
Level 1
Posts: 9
Joined: Sat May 28, 2016 1:47 pm

Re: NFS share doesn't work in Mint 18 [Solved?]

Postby ralfz » Tue Nov 14, 2017 2:26 pm

Will need a few days more time to work with "autofs/automount" if this fits my needs, i will stay with 18.2 on this box. I'll keep you posted.


Return to “Other networking topics”