Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
01-23-2015, 07:15 PM
|
#1
|
Member
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568
Rep:
|
NFS mount : No such file or directory
gents,
i'm getting no luck with a simple NFS setup. I'm sure i'm overlooking something obvious ( as always). Appreciate your help.
a. The original setup where i export and mount single /mnt/storage/Video worked perfectly when i had fsid=0 set.
b. both PCs are on the same (home) network.
c. I can't get to mount a new directory - /mnt/storage/mp3. I'm getting
Code:
[root@toshiba tmp]# mount -v -t nfs4 server:/mnt/storage/mp3 ./test/
mount.nfs4: timeout set for Fri Jan 23 20:03:13 2015
mount.nfs4: trying text-based options 'addr=192.168.1.204,clientaddr=192.168.1.101'
mount.nfs4: mount(2): No such file or directory
mount.nfs4: mounting server:/mnt/storage/mp3 failed, reason given by server: No such file or directory
Here is my config:
i want to share a FS from the "server" to client "toshiba".
on "server":
Code:
[root@server etc]# cat /etc/exports
#/mnt/storage/Video 192.168.1.150(ro,async,anonuid=1000,anongid=1000) 192.168.1.101(rw,async,all_squash,fsid=0,anonuid=65534,anongid=65534)
/mnt/storage/Video 192.168.1.150(rw,async,all_squash,fsid=0) 192.168.1.109(rw,async,all_squash,fsid=0) 192.168.1.101(rw,async,all_squash,no_subtree_check,fsid=1)
/mnt/storage/mp3 192.168.1.150(rw,async,all_squash,fsid=1) 192.168.1.109(rw,async,all_squash,fsid=1) 192.168.1.101(rw,async,all_squash,no_subtree_check,fsid=2)
[root@server etc]#
[root@server etc]#
[root@server etc]# exportfs -av
exporting 192.168.1.150:/mnt/storage/mp3
exporting 192.168.1.109:/mnt/storage/mp3
exporting 192.168.1.101:/mnt/storage/mp3
exporting 192.168.1.150:/mnt/storage/Video
exporting 192.168.1.109:/mnt/storage/Video
exporting 192.168.1.101:/mnt/storage/Video
[root@server etc]#
[root@server etc]# tail -10 /var/log/messages
Jan 23 19:38:15 server kernel: NFSD: starting 90-second grace period
Jan 23 19:38:38 server kernel: svc: 192.168.1.101, port=41506: unknown version (3 for prog 100003, nfsd)
Jan 23 19:38:38 server kernel: svc: 192.168.1.101, port=60578: unknown version (3 for prog 100003, nfsd)
Jan 23 19:39:22 server kernel: nfsd: last server has exited, flushing export cache
Jan 23 19:39:22 server rpc.mountd[30157]: Caught signal 15, un-registering and exiting.
Jan 23 19:39:23 server rpc.mountd[30291]: Version 1.2.3 starting
Jan 23 19:39:23 server kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Jan 23 19:39:23 server kernel: NFSD: starting 90-second grace period
Jan 23 19:39:51 server kernel: svc: 192.168.1.101, port=41508: unknown version (3 for prog 100003, nfsd)
Jan 23 19:39:51 server kernel: svc: 192.168.1.101, port=58321: unknown version (3 for prog 100003, nfsd)
on the client "toshiba":
Code:
[root@toshiba tmp]# hostname
toshiba
[root@toshiba tmp]# ifconfig | grep 101
inet 192.168.1.101 netmask 255.255.255.0 broadcast 192.168.1.255
[root@toshiba tmp]# mount -v -t nfs4 server:/mnt/storage/mp3 ./test
mount.nfs4: timeout set for Fri Jan 23 20:10:44 2015
mount.nfs4: trying text-based options 'addr=192.168.1.204,clientaddr=192.168.1.101'
mount.nfs4: mount(2): No such file or directory
mount.nfs4: mounting server:/mnt/storage/mp3 failed, reason given by server: No such file or directory
[root@toshiba tmp]# mount -v -t nfs4 server:/mnt/storage/Video ./test
mount.nfs4: timeout set for Fri Jan 23 20:10:49 2015
mount.nfs4: trying text-based options 'addr=192.168.1.204,clientaddr=192.168.1.101'
mount.nfs4: mount(2): No such file or directory
mount.nfs4: mounting server:/mnt/storage/Video failed, reason given by server: No such file or directory
[root@toshiba tmp]# mount -v -t nfs4 server:/ ./test
mount.nfs4: timeout set for Fri Jan 23 20:10:55 2015
mount.nfs4: trying text-based options 'addr=192.168.1.204,clientaddr=192.168.1.101'
mount.nfs4: mount(2): No such file or directory
mount.nfs4: mounting server:/ failed, reason given by server: No such file or directory
[root@toshiba tmp]# grep server /etc/host
grep: /etc/host: No such file or directory
[root@toshiba tmp]# grep server /etc/hosts
192.168.1.204 server server.home
so i can't mount anything. Let's move config on the server back to the working version:
Code:
[root@server etc]# cat /etc/exports
#/mnt/storage/Video 192.168.1.150(ro,async,anonuid=1000,anongid=1000) 192.168.1.101(rw,async,all_squash,fsid=0,anonuid=65534,anongid=65534)
/mnt/storage/Video 192.168.1.150(rw,async,all_squash,fsid=0) 192.168.1.109(rw,async,all_squash,fsid=0) 192.168.1.101(rw,async,all_squash,no_subtree_check,fsid=0)
#/mnt/storage/mp3 192.168.1.150(rw,async,all_squash,fsid=1) 192.168.1.109(rw,async,all_squash,fsid=1) 192.168.1.101(rw,async,all_squash,no_subtree_check,fsid=2)
[root@server etc]# exportfs -av
exporting 192.168.1.150:/mnt/storage/Video
exporting 192.168.1.109:/mnt/storage/Video
exporting 192.168.1.101:/mnt/storage/Video
[root@server etc]# tail -10 /var/log/messages
Jan 23 19:38:15 server kernel: NFSD: starting 90-second grace period
Jan 23 19:38:38 server kernel: svc: 192.168.1.101, port=41506: unknown version (3 for prog 100003, nfsd)
Jan 23 19:38:38 server kernel: svc: 192.168.1.101, port=60578: unknown version (3 for prog 100003, nfsd)
Jan 23 19:39:22 server kernel: nfsd: last server has exited, flushing export cache
Jan 23 19:39:22 server rpc.mountd[30157]: Caught signal 15, un-registering and exiting.
Jan 23 19:39:23 server rpc.mountd[30291]: Version 1.2.3 starting
Jan 23 19:39:23 server kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
Jan 23 19:39:23 server kernel: NFSD: starting 90-second grace period
Jan 23 19:39:51 server kernel: svc: 192.168.1.101, port=41508: unknown version (3 for prog 100003, nfsd)
Jan 23 19:39:51 server kernel: svc: 192.168.1.101, port=58321: unknown version (3 for prog 100003, nfsd)
and on the "toshiba":
Code:
[root@toshiba tmp]# mount -v -t nfs4 server:/ ./test
mount.nfs4: timeout set for Fri Jan 23 20:13:06 2015
mount.nfs4: trying text-based options 'addr=192.168.1.204,clientaddr=192.168.1.101'
[root@toshiba tmp]# mount | grep server
server:/ on /tmp/test type nfs4 (rw,relatime,vers=4.0,rsize=1048576,wsize=1048576,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.101,local_lock=none,addr=192.168.1.204)
ls -l ./test/
total 40
drwxr-xr-x. 43 az nfsnobody 4096 Feb 7 2013 DVD_Backup
drwxrwxr-x. 11 az nfsnobody 4096 Feb 18 2013 Home_Movies
drwxrwxr-x. 7 az nfsnobody 4096 Dec 22 22:10 Instructional
drwxrwxr-x. 5 az nfsnobody 4096 Nov 30 17:02 Kids
drwxrwxr-x. 3 nfsnobody nfsnobody 4096 Jan 4 03:25 medicine_book
drwxrwxr-x. 5 az nfsnobody 12288 Nov 30 01:35 Movies
drwxrwxr-x. 17 nfsnobody nfsnobody 4096 Jan 12 12:54 new_mp3
drwxrwxr-x. 8 az nfsnobody 4096 Jan 17 16:56 TV Shows
it finds the directory as "/" and mounts it.
So the question is why i can't mount 2 directories ?
P.S.
if i take out "Video" and leave "mp3" as a single exported idrectory - that works fine. i can see all my files in mp3 from the client.
So i come to a conclusion that the exportfs file is misconfigured.
Last edited by DBabo; 01-23-2015 at 07:37 PM.
|
|
|
01-23-2015, 08:19 PM
|
#2
|
Member
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 568
Original Poster
Rep:
|
Aha!
there were two issues:
a. i should have used eportfs -av r
b. the fsid=0 that the directory was exported with for another host (150 for example) was "influencing" the implicit set of options for all subsequent hosts, including 101.
this version of the exports file works fine:
Code:
cat /etc/exports
#/mnt/storage/Video 192.168.1.150(ro,async,anonuid=1000,anongid=1000) 192.168.1.101(rw,async,all_squash,fsid=0,anonuid=65534,anongid=65534)
/mnt/storage/Video 192.168.1.150(rw,async,all_squash) 192.168.1.109(rw,async,all_squash) 192.168.1.101(rw,async,all_squash,no_subtree_check)
/mnt/storage/mp3 192.168.1.150(rw,async,all_squash) 192.168.1.109(rw,async,all_squash) 192.168.1.101(rw,async,all_squash)
|
|
|
All times are GMT -5. The time now is 08:45 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|