LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 06-30-2014, 04:27 AM   #1
zkab
Member
 
Registered: Dec 2007
Posts: 142

Rep: Reputation: 16
NFS4 mounts incorrectly


I have a problem with NFS4 that mounts wrong directory contents.
On the Server (x-files) side I have following:

jurka@x-files:~$ cat /etc/exports
/mnt/x-file_1/ 192.168.0.4(rw,subtree_check,sync,fsid=0)
/mnt/x-file_1/ 192.168.0.5(rw,subtree_check,sync,fsid=0)
/mnt/DBMovie/ 192.168.0.4(rw,subtree_check,sync,fsid=0)

jurka@x-files:~$ ls /mnt/x-file_1/
Anne CD_Samling DownLoad_ToDo Foto_Album lost+found Raivo

jurka@x-files:~$ ls /mnt/DBMovie/
DB1 DB2 DB3 lost+found

On the Client (192.168.0.4) side I run autofs and it looks as follows:

raivo@zkab ~ $ cat /etc/auto.master
/nfs /etc/auto.nfs --ghost
/cifs /etc/auto.cifs --ghost

raivo@zkab ~ $ cat /etc/auto.nfs
Anne -fstype=nfs,rw,hard,intr,rsize=65536,wsize=65536 x-files:/mnt/x-file_1/Anne
CD_Samling -fstype=nfs,rw,hard,intr,rsize=65536,wsize=65536 x-files:/mnt/x-file_1/CD_Samling
DownLoad_ToDo -fstype=nfs,rw,hard,intr,rsize=65536,wsize=65536 x-files:/mnt/x-file_1/DownLoad_ToDo
Foto_Album -fstype=nfs,rw,hard,intr,rsize=65536,wsize=65536 x-files:/mnt/x-file_1/Foto_Album
Raivo -fstype=nfs,rw,hard,intr,rsize=65536,wsize=65536 x-files:/mnt/x-file_1/Raivo
DBMovie -fstype=nfs,rw,hard,intr,rsize=65536,wsize=65536 x-files:/mnt/DBMovie

It seems that I got the NFS4 mounts OK for /nfs mounting point.
raivo@zkab ~ $ ls /nfs
Anne CD_Samling DBMovie DownLoad_ToDo Foto_Album Raivo

But when it comes to /nfs/DBMovie/ it is totally wrong ... I should have 'DB1 DB2 DB3 lost+found' but got

raivo@zkab ~ $ ls /nfs/DBMovie/
Anne CD_Samling DownLoad_ToDo Foto_Album lost+found Raivo
raivo@zkab ~ $

The server is 3.2.0-4-amd64 (stable)
The client is 3.13-1-amd64 (jessie)

Could the different versions between server/client cause this problem ...
 
Old 06-30-2014, 06:42 AM   #2
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
You have a strange config with 2 lines exporting the same directory in your exports file.

https://access.redhat.com/site/docum...g-exports.html

Try this:
Code:
/mnt/x-file_1/ 192.168.0.4(rw,subtree_check,sync,fsid=0) 192.168.0.5(rw,subtree_check,sync,fsid=0)
 
Old 06-30-2014, 07:27 AM   #3
zkab
Member
 
Registered: Dec 2007
Posts: 142

Original Poster
Rep: Reputation: 16
Still the same problem after change ...
 
Old 06-30-2014, 08:11 AM   #4
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
On the client zkab what do these commands get you?
Code:
ls -ld /nfs/DBMovie/
cd /nfs/DBMovie/ && ls -la && df -k . && mount
Have you restarted NFS services on both hosts since the last edit to NFS configuration?
 
Old 06-30-2014, 09:20 AM   #5
zkab
Member
 
Registered: Dec 2007
Posts: 142

Original Poster
Rep: Reputation: 16
Yes - I restarted NFS on both sides.

Server:
-------------------------------------------------
jurka@x-files:~$ sudo service nfs-common restart
[ ok ] Stopping NFS common utilities: idmapd.
[ ok ] Starting NFS common utilities: idmapd.

jurka@x-files:~$ sudo service nfs-kernel-server restart
[ ok ] Stopping NFS kernel daemon: mountd nfsd.
[ ok ] Unexporting directories for NFS kernel daemon....
[ ok ] Exporting directories for NFS kernel daemon....
[ ok ] Starting NFS kernel daemon: nfsd mountd.

Client:
-------------------------------------------------
raivo@zkab ~ $ sudo service nfs-common restart
[ ok ] Stopping NFS common utilities: gssd idmapd statd.
[ ok ] Starting NFS common utilities: statd idmapd gssd.

raivo@zkab ~ $ sudo service autofs restart
[ ok ] Stopping automount....
[ ok ] Starting automount....

raivo@zkab ~ $ ls -ld /nfs/DBMovie/
drwxr-xr-x 8 root root 4096 Feb 15 15:28 /nfs/DBMovie/

raivo@zkab ~ $ cd /nfs/DBMovie/ && ls -la && df -k . && mount
total 48
drwxr-xr-x 8 root root 4096 Feb 15 15:28 .
drwxr-xr-x 8 root root 0 Jun 30 16:12 ..
drwxrwxr-x 4 raivo raivo 4096 Mar 13 2011 Anne
drwxrwxr-x 236 raivo raivo 12288 Jun 11 15:02 CD_Samling
drwxrwxr-x 54 raivo raivo 4096 Jul 8 2013 DownLoad_ToDo
drwxrwxr-x 71 raivo raivo 4096 Jun 29 12:35 Foto_Album
drwx------ 2 root root 16384 Mar 3 2012 lost+found
drwxrwxr-x 4 raivo raivo 4096 Sep 8 2012 Raivo
Filesystem 1K-blocks Used Available Use% Mounted on
x-files:/mnt/DBMovie 480720640 166090496 290210880 37% /nfs/DBMovie
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=1022133,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=819180k,mode=755)
/dev/disk/by-uuid/dec36c7e-4196-4c80-bd63-04669c66c23b on / type ext4 (rw,noatime,nodiratime,errors=remount-ro,data=ordered)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
pstore on /sys/fs/pstore type pstore (rw,relatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1638360k)
/dev/sda2 on /home type ext4 (rw,nosuid,nodev,relatime,data=ordered)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
cgroup on /dev/cgroup/cpu type cgroup (rw,relatime,cpu,release_agent=/usr/local/sbin/cgroup_clean)
none on /sys/fs/cgroup type tmpfs (rw,relatime,size=4k,mode=755)
systemd on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,name=systemd)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
/etc/auto.nfs on /nfs type autofs (rw,relatime,fd=6,pgrp=19311,timeout=300,minproto=5,maxproto=5,indirect)
/etc/auto.cifs on /cifs type autofs (rw,relatime,fd=12,pgrp=19311,timeout=300,minproto=5,maxproto=5,indirect)
x-files:/mnt/DBMovie/DownLoad_ToDo on /nfs/DownLoad_ToDo type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mo untaddr=192.168.0.2,mountvers=3,mountport=39720,mountproto=udp,local_lock=none,addr=192.168.0.2)
x-files:/mnt/DBMovie/Anne on /nfs/Anne type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mo untaddr=192.168.0.2,mountvers=3,mountport=39720,mountproto=udp,local_lock=none,addr=192.168.0.2)
x-files:/mnt/DBMovie/Raivo on /nfs/Raivo type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mo untaddr=192.168.0.2,mountvers=3,mountport=39720,mountproto=udp,local_lock=none,addr=192.168.0.2)
x-files:/mnt/DBMovie on /nfs/DBMovie type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mo untaddr=192.168.0.2,mountvers=3,mountport=39720,mountproto=udp,local_lock=none,addr=192.168.0.2)
x-files:/mnt/DBMovie/Foto_Album on /nfs/Foto_Album type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mo untaddr=192.168.0.2,mountvers=3,mountport=39720,mountproto=udp,local_lock=none,addr=192.168.0.2)
x-files:/mnt/DBMovie/CD_Samling on /nfs/CD_Samling type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mo untaddr=192.168.0.2,mountvers=3,mountport=39720,mountproto=udp,local_lock=none,addr=192.168.0.2)
raivo@zkab /nfs/DBMovie $
 
Old 06-30-2014, 10:37 AM   #6
linosaurusroot
Member
 
Registered: Oct 2012
Distribution: OpenSuSE,RHEL,Fedora,OpenBSD
Posts: 982
Blog Entries: 2

Rep: Reputation: 244Reputation: 244Reputation: 244
I suppose x-files is 192.168.0.2.

What's funny about this is the many mounts - most of them wrong.

Quote:
x-files:/mnt/DBMovie/DownLoad_ToDo on /nfs/DownLoad_ToDo type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mo untaddr=192.168.0.2,mountvers=3,mountport=39720,mountproto=udp,local_lock=none,addr=192.168.0.2)
x-files:/mnt/DBMovie/Anne on /nfs/Anne type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mo untaddr=192.168.0.2,mountvers=3,mountport=39720,mountproto=udp,local_lock=none,addr=192.168.0.2)
x-files:/mnt/DBMovie/Raivo on /nfs/Raivo type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mo untaddr=192.168.0.2,mountvers=3,mountport=39720,mountproto=udp,local_lock=none,addr=192.168.0.2)
x-files:/mnt/DBMovie on /nfs/DBMovie type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mo untaddr=192.168.0.2,mountvers=3,mountport=39720,mountproto=udp,local_lock=none,addr=192.168.0.2)
x-files:/mnt/DBMovie/Foto_Album on /nfs/Foto_Album type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mo untaddr=192.168.0.2,mountvers=3,mountport=39720,mountproto=udp,local_lock=none,addr=192.168.0.2)
x-files:/mnt/DBMovie/CD_Samling on /nfs/CD_Samling type nfs (rw,relatime,vers=3,rsize=65536,wsize=65536,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mo untaddr=192.168.0.2,mountvers=3,mountport=39720,mountproto=udp,local_lock=none,addr=192.168.0.2)
 
Old 06-30-2014, 11:49 AM   #7
zkab
Member
 
Registered: Dec 2007
Posts: 142

Original Poster
Rep: Reputation: 16
Agree - but where is the problem ... nfs bug ?

The section you marked seems to be the right mount but the rest like xfiles:/mnt/(Anne CD_Samling DownLoad_ToDo Foto_Album Raivo) ... seems to be wrong
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nfs4 and idmapper GentooTom Linux - Server 0 02-23-2012 02:10 AM
nfs4 - mount.nfs4: access denied by server while mounting edwin11 Linux - Networking 1 12-07-2010 10:06 AM
Deadlock in NFS4 mam2 Linux - Server 1 01-06-2010 06:00 AM
[SOLVED] can't mount via NFS4 rmahn Linux - Server 4 09-10-2009 08:35 AM
acl and Nfs4 collen Linux - Networking 0 09-30-2004 07:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration