[Help] NFS Mounts to wrong path?

Discussion about using NAS on Linux and Unix OS.
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: [Help] NFS Mounts to wrong path?

Post by schumaku »

Simply mount it using /share/[share-folder-name] ... forget the ugly path in the (technically) correct exports file, the NAS Kernel is modded to handle the simple path.

From NFSv4-capable systems, force a v3 mount - mount options depend on the client.

Thee are less than a hand full of reports from users complaining about nfs not becoming reliably available after a system boot. If in question - it's worth to restart nfsd for a test:

[~] # /etc/init.d/nfs restart
laberkopp
First post
Posts: 1
Joined: Thu Jul 11, 2013 5:06 pm

Re: [Help] NFS Mounts to wrong path?

Post by laberkopp »

Hi,
I just want to share my situation with you, as this thread helped me in feeling that I am not alone with this problem.

I have no real solution or answer unfortunately.

That was the situation before the problem occured:

one central QNAP server with nfs shares exported (/Multimedia, /office)
two PC ubuntu 12.04 nfs clients that each mount from those exports several folders (/Multimedia/Pictures to /home/userX/Pictures, /Multimedia/Music to /home/userX/Music, /Multimedia/Videos to /home/userX/Videos, /office/usera to /home/usera/Documents, /office/userb to /home/userb/Documents)

Everything worked very fine.

Now I changed the situation by installing a vu+duo2 nfs client into this network mounting the folder /Multimedia/vuduo2.

From now on, I had the issue that on my both ubuntu PCs ALL the different mount points did show only the content from /Multimedia.
On the PCs mtab looked as normal as before, /proc/mounts/ looked as normal as before. On the qnap /etc/exports looked normal like before. But I could not even unmount the folders as the error "not found in /proc/mounts" occured when I tried to.

I systematically found out, that whenever the vu+duo2 had mounted the nfs export afterwards the PCs got pointed to the wrong share.
Restarting the nfs service on the QNAP or deleting the content from the rmtab file on the QNAP made it possible to mount correctly again (reboot PC).

I configured the QNAP to not provide nfsv4 but nothing changed.
I checked all export and mount parameters (like hide, crossmount, fsid) to be ok.

So I still have no clue what the problem was.

My solution now is a workaround:
the vu+duo2 mounts the share by cifs and not by nfs. Now everything is fine again.

If anybody has any idea on what does cause that one nfs client can confuse the nfs server so that other nfs clients cannot mount the share corectly I am glad to here them :-)
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: [Help] NFS Mounts to wrong path?

Post by schumaku »

KillerkelvUK wrote:Bump...could really use the help guys, can anyone else confirm tmt's setup as what I should be expecting on my nas?
One thing that hits my eyes: Your NFS configuration is wrong:
[/] # uname -a
Linux BlackNAS 2.6.33.2 #1 SMP Fri Mar 2 02:40:17 CST 2012 i686 unknown
[/] # cat /etc/exports
"/share/MD0_DATA/Backup" 192.168.1.*(rw,async,no_root_squash,insecure)
"/share/MD0_DATA/Download" 192.168.1.*(rw,async,no_root_squash,insecure)
...
Wildcards are _not_ permitted in exports (the NAS NFS access control under does clearly state that the data must be provided in correct format). Anything can go wrong as this is U**x/Linux - lack of strict data type checking almost everywhere - the price for the performance.

Borrowed from the /etc/exports man pages:
Machine Name Formats
NFS clients may be specified in a number of ways:

Single Host

You may specify a host either by an abbreviated name recognized be the resolver, the fully qualified domain name, an IPv4 address, or an IPv6 address. IPv6 addresses must not be inside square brackets in /etc/exports lest they be confused with character-class wildcard matches.

...

Wildcards

Machine names may contain the wildcard characters * and ?, or may contain character class lists within [square brackets]. This can be used to make the exports file more compact; for instance, *.cs.foo.edu matches all hosts in the domain cs.foo.edu. As these characters also match the dots in a domain name, the given pattern will also match all hosts within any subdomain of cs.foo.edu.

IP networks

You can also export directories to all hosts on an IP (sub-) network simultaneously. This is done by specifying an IP address and netmask pair as address/netmask where the netmask can be specified in dotted-decimal format, or as a contiguous mask length. For example, either '/255.255.252.0' or '/22' appended to the network base IPv4 address results in identical subnetworks with 10 bits of host. IPv6 addresses must use a contiguous mask length and must not be inside square brackets to avoid confusion with character-class wildcards. Wildcard characters generally do not work on IP addresses, though they may work by accident when reverse DNS lookups fail.
User avatar
joba1
Starting out
Posts: 18
Joined: Wed Feb 01, 2012 6:36 pm

Re: [Help] NFS Mounts to wrong path?

Post by joba1 »

I am aware, this thread is ancient, but...

I just had this problem yesterday with current firmware 4.2.0 on a TS 419 PII
No idea what lead to this, but a reboot fixed it.

Nevertheless, I'd like to know how to avoid it in the future.
It is a bit scary if you mount one directory and get data of another one...


P.S. wildcards are allowed
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: [Help] NFS Mounts to wrong path?

Post by schumaku »

joba1 wrote:I just had this problem yesterday with current firmware 4.2.0 on a TS 419 PII
Had added new shared folders?

I still suspect this is related to the QNAP "hack" permitting to mount the /sharename direct. Complain to QNAP customer service on https://helpdesk.qnap.com/ - alone, they don't hear me loud enough.
joba1 wrote:P.S. wildcards are allowed
Yes - for machines and domains, no for IP addresses. Related /etc/exports man page sniplets included before - still valid as before.
g-pita
New here
Posts: 2
Joined: Fri Aug 28, 2015 4:53 am

Re: [Help] NFS Mounts to wrong path?

Post by g-pita »

I have a similar problem on Ubuntu 15 with a ts451

When I do a mount from a client, fx
mount -t nfs server:/share/my_share1 /mnt/share1
share1 always point to the same QNAP share. nomatter which of my shares I mount
So a
mount -t nfs server:/share/my_share2 /mnt/share2
points to the same share.

This is only fixed if i do a mount command on all shares, then a umount and then mount the shares again, then it works untill next client reboot.

fstab mounting doesn't work either.
mount -all
gives a
mount.nfs: Connection timed out
but you can mount manually as described above

mounting and accessing works fine from geekbox
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: [Help] NFS Mounts to wrong path?

Post by schumaku »

g-pita wrote:I have a similar problem on Ubuntu 15 with a ts451
...as mentioned before...
schumaku wrote:I still suspect this is related to the QNAP "hack" permitting to mount the /sharename direct. Complain to QNAP customer service on https://helpdesk.qnap.com/ - alone, they don't hear me loud enough.
Unrelated ... /sharename should be sufficient :

Code: Select all

mount -t nfs server:/my_share1 /mnt/share1
g-pita wrote:fstab mounting doesn't work either.
Something wrong with the fstab ... lack of forcing nfsv3 for example?
TH3 M0L3
Starting out
Posts: 37
Joined: Sun Jan 08, 2012 2:54 am

Re: [Help] NFS Mounts to wrong path?

Post by TH3 M0L3 »

Yep, same problem here.

I had my NAS up and running for 12months and all NFS's were good. Updated firmware, restarted and I experienced this issue. Drove me nuts as I thought the issue was with openelec.

Restarted the NFS service as suggested by schumaku (+1 to you sir) and the shares started working again!

Thanks for the help.
Model name: QNAP TS-412
Firmware version: 4.2.0
4 no: RED WDC WD30EFRX
RAID configuration: RAID 10
allsts
New here
Posts: 2
Joined: Fri Feb 28, 2014 3:42 pm

Re: [Help] NFS Mounts to wrong path?

Post by allsts »

schumaku wrote: Thee are less than a hand full of reports from users complaining about nfs not becoming reliably available after a system boot. If in question - it's worth to restart nfsd for a test:
[~] # /etc/init.d/nfs restart
Thanks a lot! Worked
Post Reply

Return to “Linux & Unix (NFS)”