LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-23-2015, 07:15 PM   #1
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 506

Rep: Reputation: 39
Question 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.
 
Old 01-23-2015, 08:19 PM   #2
DBabo
Member
 
Registered: Feb 2003
Distribution: Fedora {latest}
Posts: 506

Original Poster
Rep: Reputation: 39
Aha!
there were two issues:
a. i should have used eportfs -avr
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)
 
  


Reply

Tags
nfs mount network


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
nfs mount: No such file or directory ? czezz Solaris / OpenSolaris 10 09-02-2014 08:40 AM
mount.nfs: mount point /mnt/cdrom is not a directory Error Anna23 Red Hat 1 06-29-2014 06:27 AM
fedora core 5 nfs mount:no such file or directory horizonti_2004 Linux - Networking 5 09-15-2007 06:14 PM
fedora core 5 nfs mount:no such file or directory horizonti_2004 Linux - Server 2 09-12-2007 07:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:18 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration