[Help] NFS Mounts to wrong path?

Discussion about using NAS on Linux and Unix OS.
User avatar
KillerkelvUK
Getting the hang of things
Posts: 61
Joined: Sat Oct 10, 2009 8:35 pm
Location: North West England

[Help] NFS Mounts to wrong path?

Post by KillerkelvUK » Fri Mar 09, 2012 4:07 am

Hi, I've been using NFS shares successfully now for sometime and have little issues save this one niggling problem I keep running into which always forces me to fall back to using Samba...eventually gotten around to finding out what I'm doing wrong but none of my googling/reading has found anyone with similar symptoms hence this thread... :?

I'm exporting several paths for NFS usage but every so often when I come to use one of the paths the mount point is to one of the other NFS shares, example...

Exporting...
--/share/MD0_DATA/Backup
--/share/MD0_DATA/Download
--/share/MD0_DATA/Filestorage

I browse Backup and see the contents of Download, all the NFS shares will do and lead to the same path this unless I restart the NFS service. The folder it glitches on seems to be random each time the glitch starts, i.e. it isn't always Download the other mount points lead. When this happens I always have a long list of NFS connections showing in the "On-line Users" view of the Web GUI...the strange thing is that there isn't a frequency to this, i.e. a lapsed period of time when it happens, its always when I'm attemping something new...example is using OpenELEC and trying to switch from using Samba as the media library protocol to NFS, this always generates this problem. The strange thing is that I network boot OpenELEC which requires NFS connections and this works flawlessly day in day out. Today it happened after booting my netbook into Ubuntu x64...mount points defined in /etc/fstab...I opened a GUI filebrowser and the problem was present.

From what I've read there seems some correlation with NFS mounts not being unmounted properly but I'm not sure if this is it or how I'd go about limiting the problem save manually unmounting all my NFS shares everytime? (Not sure this is possible in OpenELEC/xbmc!?)

Contents of /etc/exports...

Code: Select all

"/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)
"/share/MD0_DATA/Filestorage" 192.168.1.*(rw,async,no_root_squash,insecure)
"/share/MD0_DATA/Multimedia" 192.168.1.*(rw,async,no_root_squash,insecure)
"/share/MD0_DATA/PXE" 192.168.1.*(rw,async,no_root_squash,insecure)


Can anyone help out? TIA.

K
----------------------------------------------------------------------------------
Sold my QNAP hardware, instead built a custom NAS using Ubuntu!
----------------------------------------------------------------------------------

tmt
Experience counts
Posts: 1006
Joined: Mon Nov 16, 2009 11:02 am

Re: [Help] NFS Mounts to wrong path?

Post by tmt » Fri Mar 09, 2012 5:59 am

Is it simply time passing between the two results, or is the server doing something in-between such as shutting down and restarting? Also, what client(s) are you seeing this from, and what version of NAS firmware?
SS-439, Ubuntu Server 12.04.3 LTS, EXT4, RAID10, 4xHitachi 5K1000
TS-112, 4.1.x Beta, EXT4, 1xHitachi 7K1000

User avatar
KillerkelvUK
Getting the hang of things
Posts: 61
Joined: Sat Oct 10, 2009 8:35 pm
Location: North West England

Re: [Help] NFS Mounts to wrong path?

Post by KillerkelvUK » Fri Mar 09, 2012 7:08 am

The server is up 24/7 and nothing unusual is happening server side when the glitch happens. Clients are primarily OpenELEC but some Ubuntu in their. NAS fw is latest release 3.6.0 but I experienced exact same problem on prior fw version.

Noob question but where are the logs located for NFS, I can't seem to spot anything obvious in /var but I could be searching for the wrong string??
----------------------------------------------------------------------------------
Sold my QNAP hardware, instead built a custom NAS using Ubuntu!
----------------------------------------------------------------------------------

tmt
Experience counts
Posts: 1006
Joined: Mon Nov 16, 2009 11:02 am

Re: [Help] NFS Mounts to wrong path?

Post by tmt » Fri Mar 09, 2012 11:29 am

There aren't any NFS logs, but you can turn on "System Connection Logs" in the System Administration->System Logs page to see some basic stuff.

Are you perhaps adding, removing or changing any shares or share options from time to time? One curious thing about QNAP's NFS exports is that they are actually symbolic links in the top-level share directory. These links are recreated from time to time, including whenever shares are configured. What I'm thinking is that the client's cached filehandles end up pointing to the wrong place. Shouldn't happen, but then again the behavior you're seeing shouldn't either.
SS-439, Ubuntu Server 12.04.3 LTS, EXT4, RAID10, 4xHitachi 5K1000
TS-112, 4.1.x Beta, EXT4, 1xHitachi 7K1000

User avatar
rbnmndz
New here
Posts: 8
Joined: Wed Dec 23, 2009 5:45 pm
Location: Barcelona

Re: [Help] NFS Mounts to wrong path?

Post by rbnmndz » Fri Mar 09, 2012 5:30 pm

Hi,
I'm having the same problem since some time ago. I have 2 shares exported as NFS: Qdownload & Public . After booting my client pc I'm seeing the same content at both mounted discs (shares). Only doing and umount -t nfs -a and afterwards, mounting them the shares go right.
QNAP TS-119

User avatar
KillerkelvUK
Getting the hang of things
Posts: 61
Joined: Sat Oct 10, 2009 8:35 pm
Location: North West England

Re: [Help] NFS Mounts to wrong path?

Post by KillerkelvUK » Sat Mar 10, 2012 3:37 am

So I can recreate the problem by booting OpenELEC over the network (sucessfully and consistently using NFS shares) and then attempting to catalogue my media library using an NFS connection rather than Samba. Once Ive attemtped this if I reboot OpenELEC then it errors and the reason is that the NFS mounts required for the KERNEL and SYSTEM files are resolving to the media library location I previously entered in xbmc.

I originally believed this to be a bug with OpenELEC as I'm using a dev version however the same problem also now happens in Ubuntu.
----------------------------------------------------------------------------------
Sold my QNAP hardware, instead built a custom NAS using Ubuntu!
----------------------------------------------------------------------------------

tmt
Experience counts
Posts: 1006
Joined: Mon Nov 16, 2009 11:02 am

Re: [Help] NFS Mounts to wrong path?

Post by tmt » Sat Mar 10, 2012 6:01 am

That's really weird. I don't know anything about OpenELEC or its NFS client. Is it a regular Linux distro, with kernel NFSv3/TCP? Also, when you say it happens with Ubuntu, what do you do to reproduce it there, and what version of Ubuntu?
SS-439, Ubuntu Server 12.04.3 LTS, EXT4, RAID10, 4xHitachi 5K1000
TS-112, 4.1.x Beta, EXT4, 1xHitachi 7K1000

User avatar
KillerkelvUK
Getting the hang of things
Posts: 61
Joined: Sat Oct 10, 2009 8:35 pm
Location: North West England

Re: [Help] NFS Mounts to wrong path?

Post by KillerkelvUK » Sat Mar 10, 2012 8:28 pm

OpenELEC is a small linux distro whos sole purpose is to provide a boot environment for running xbmc, if your interested have a read here http://openelec.tv/...I'm a big fan :D From what I understand its the regular linux kernel at v3.2.

My implementation is to network boot OpenELEC (and thus xbmc) so in effect I have a diskless HTPC, I was able to achieve this when the QNAP fw introduced TFTP and DHCP Boot File capabilities. Basically TFTP serves up the OE Kernel which then opens 2 NFS connections for fileshares to read/write OS level data as well as xbmc data. If once xbmc is loaded I restrict xbmc's connection types to SAMBA then all is good, its only when I type a switch xbmc to use NFS for cataloging my media libraries that I encounter issues but the issues are only after I reboot, never during the session I switch to NFS.

I'm running Ubuntu x64 11.10 on a brand new net book I've had for a week and Ubuntu x86 11.10 on my desktop pc which I've had since 11.10 was released. As I said previously I believe the problem to be restricted to OpenELEC hence not posting previously, since observing the problem in Ubuntu however I'm not so sure this isn't a server side issue?

The testing I've done is as follows...
-1- Boot into Ubuntu (standard hard disk install NOT a netboot), manually mount an NFS connection. Check QNAP which shows this as an "on line user". Manually unmount this NFS connection, recheck QNAP and the "on line user" has gone...Reboot and follow the same process time after time...All is good! :D

-2- Boot into same Ubuntu install, edit /etc/fstab and add several NFS mounts, reboot Ubuntu and the NFS mounts are set up and work, QNAP "on line users" show 1 single NFS connection. Shutdown Ubuntu properly but the QNAP "on line users" connection persist! :? Reboot Ubuntu and the NFS mount points now all point to one of the mounts specified in /etc/fstab. Ubuntu is configured with a static IP address, so on reboot is it possible my NAS is getting confused when Ubuntu is requesting what it believes are new NFS connections yet the NAS never closed the original connections? Sometimes manually unmounting the connections in Ubuntu works and the nas closes the connections as per the "on line users" UI, othertimes I have to completely reboot my nas to clear the connections down.

Is there a way for me to view the symlinks that my nas is creating for the NFS exports?

Thanks for your help,

K
----------------------------------------------------------------------------------
Sold my QNAP hardware, instead built a custom NAS using Ubuntu!
----------------------------------------------------------------------------------

tmt
Experience counts
Posts: 1006
Joined: Mon Nov 16, 2009 11:02 am

Re: [Help] NFS Mounts to wrong path?

Post by tmt » Mon Mar 12, 2012 12:19 am

KillerkelvUK wrote:Is there a way for me to view the symlinks that my nas is creating for the NFS exports?


Sure. If you can ssh directly to the NAS, just do "ls -li /share/NFS/".

But, it looks like I may have misspoken on these being symbolic links, I wonder if QNAP changed this behavior in 3.6.1. The /share/NFS directory is actually populated with "bind" type mounts. In any case, I am not certain this approach is leading to your observed issues, but it's worth investigating.
SS-439, Ubuntu Server 12.04.3 LTS, EXT4, RAID10, 4xHitachi 5K1000
TS-112, 4.1.x Beta, EXT4, 1xHitachi 7K1000

User avatar
KillerkelvUK
Getting the hang of things
Posts: 61
Joined: Sat Oct 10, 2009 8:35 pm
Location: North West England

Re: [Help] NFS Mounts to wrong path?

Post by KillerkelvUK » Mon Mar 12, 2012 5:24 am

Noted in your reply the reference to fw 3.6.1...I was on 3.6.0 so am upgrading now...

Also I had no /share/NFS/ directory to interrogate, will see if its there post upgrade and confirm back.
----------------------------------------------------------------------------------
Sold my QNAP hardware, instead built a custom NAS using Ubuntu!
----------------------------------------------------------------------------------

tmt
Experience counts
Posts: 1006
Joined: Mon Nov 16, 2009 11:02 am

Re: [Help] NFS Mounts to wrong path?

Post by tmt » Mon Mar 12, 2012 8:45 am

Really, no /share/NFS? Very odd.

Code: Select all

[~] # cat /etc/exports
"/share/NFS" *(no_subtree_check,no_root_squash,insecure,fsid=0)
"/share/MD0_DATA/Public" *(rw,async,no_root_squash,insecure)
"/share/NFS/Public" *(rw,nohide,async,no_root_squash,insecure)
"/share/MD0_DATA/TMT" 192.168.0.101(rw,async,no_root_squash,insecure)
"/share/NFS/TMT" 192.168.0.101(rw,nohide,async,no_root_squash,insecure)
[~] # ls -lsi /share/NFS
1007629    4 drwxrwxrwx    6 admin    administ     4096 Mar  4 23:30 Public/
  16386    4 drwxrwxrwx   27 tmt      everyone     4096 Mar  5 07:59 TMT/
[~] # mount
/proc on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw,size=64M)
none on /proc/bus/usb type usbfs (rw)
/dev/sda4 on /mnt/ext type ext3 (rw)
/dev/md9 on /mnt/HDA_ROOT type ext3 (rw)
/dev/md0 on /share/MD0_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,nodelalloc,noacl)
nfsd on /proc/fs/nfsd type nfsd (rw)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
tmpfs on /.eaccelerator.tmp type tmpfs (rw,size=32M)
none on /sys/kernel/config type configfs (rw)
/share/MD0_DATA/Public on /share/NFS/Public type none (rw,bind)
/share/MD0_DATA/TMT on /share/NFS/TMT type none (rw,bind)
[~] #
SS-439, Ubuntu Server 12.04.3 LTS, EXT4, RAID10, 4xHitachi 5K1000
TS-112, 4.1.x Beta, EXT4, 1xHitachi 7K1000

User avatar
KillerkelvUK
Getting the hang of things
Posts: 61
Joined: Sat Oct 10, 2009 8:35 pm
Location: North West England

Re: [Help] NFS Mounts to wrong path?

Post by KillerkelvUK » Tue Mar 13, 2012 2:05 am

Upgraded fw to 3.6.1 last night...

Code: Select all

[~] # pwd
/root
[~] # cd /
[/] # 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)
"/share/MD0_DATA/Filestorage" 192.168.1.*(rw,async,no_root_squash,insecure)
"/share/MD0_DATA/Multimedia" 192.168.1.*(rw,async,no_root_squash,insecure)
"/share/MD0_DATA/PXE" 192.168.1.*(rw,async,no_root_squash,insecure)
[/] #  ls -lsi /share/NFS
ls: /share/NFS: No such file or directory
[/] # mount
/proc on /proc type proc (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
sysfs on /sys type sysfs (rw)
tmpfs on /tmp type tmpfs (rw,size=64M)
none on /proc/bus/usb type usbfs (rw)
/dev/sda4 on /mnt/ext type ext3 (rw)
/dev/md9 on /mnt/HDA_ROOT type ext3 (rw)
/dev/md0 on /share/MD0_DATA type ext4 (rw,usrjquota=aquota.user,jqfmt=vfsv0,user_xattr,data=ordered,delalloc,noacl)
nfsd on /proc/fs/nfsd type nfsd (rw)
tmpfs on /.eaccelerator.tmp type tmpfs (rw,size=32M)
djmount on /mnt/QUPNP type fuse.djmount (ro,nosuid,nodev,allow_other)
/dev/sdu1 on /share/external/sdu1 type ext4 (rw)
[/] #


Is there a simple explanation as to why I have a different configuration coz I'm stumped! (Not very hard tho to stump me :!: )
----------------------------------------------------------------------------------
Sold my QNAP hardware, instead built a custom NAS using Ubuntu!
----------------------------------------------------------------------------------

tmt
Experience counts
Posts: 1006
Joined: Mon Nov 16, 2009 11:02 am

Re: [Help] NFS Mounts to wrong path?

Post by tmt » Tue Mar 13, 2012 2:50 am

Gack, no idea. The only thing I am doing differently is that I have manually enabled NFSv4 in uLinux.conf. I don't recommend this in general, but I have been experimenting. Looking at the scripts, I don't think this could explain the difference however.

Fragment of my SS-439's /etc/config/uLinux.conf, entire NFS section

Code: Select all

[NFS]
Enable = TRUE
Enable_V4 = TRUE


Just to check, are you running this on a TS-259Pro+ like your profile says? Firmware 3.6.1 build 0302T??

Anyone else confirm the presence of /share/NFS on their similar QNAP?
Last edited by tmt on Tue Mar 13, 2012 2:57 am, edited 1 time in total.
SS-439, Ubuntu Server 12.04.3 LTS, EXT4, RAID10, 4xHitachi 5K1000
TS-112, 4.1.x Beta, EXT4, 1xHitachi 7K1000

User avatar
KillerkelvUK
Getting the hang of things
Posts: 61
Joined: Sat Oct 10, 2009 8:35 pm
Location: North West England

Re: [Help] NFS Mounts to wrong path?

Post by KillerkelvUK » Tue Mar 13, 2012 2:55 am

Yeh all on my 259Pro+, upgrade the fw last night to 3.6.1 0302T, was previously on 3.6.0 0210....
----------------------------------------------------------------------------------
Sold my QNAP hardware, instead built a custom NAS using Ubuntu!
----------------------------------------------------------------------------------

User avatar
KillerkelvUK
Getting the hang of things
Posts: 61
Joined: Sat Oct 10, 2009 8:35 pm
Location: North West England

Re: [Help] NFS Mounts to wrong path?

Post by KillerkelvUK » Sat Mar 17, 2012 4:38 am

tmt wrote:....

Just to check, are you running this on a TS-259Pro+ like your profile says? Firmware 3.6.1 build 0302T??

Anyone else confirm the presence of /share/NFS on their similar QNAP?


Bump...could really use the help guys, can anyone else confirm tmt's setup as what I should be expecting on my nas?
----------------------------------------------------------------------------------
Sold my QNAP hardware, instead built a custom NAS using Ubuntu!
----------------------------------------------------------------------------------

Post Reply

Return to “Linux & Unix (NFS)”