 |
 |
 |
 |
| Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc. |

26th August 2007, 02:17 AM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 8

|
|
NFS mount fails "reason by server: No such file or directory" , but dir exists!
Hello,
On Fedora 7, I attempted to setup NFS4 between two hosts which didn't work. So, I tried to use NFS with server and client on the same host. I followed the instructions at this address quite exactly.
http://wiki.linux-nfs.org/wiki/index..._configuration
I suspect the example mount command given there might have left off ":/export", so I tried it both ways. Regardless, the same error always occurs. Thanks in advance for any help.
Regards,
Pete
P.S. SELinux is in permissive mode.
Code:
[root@homepc ~]# mkdir /export
[root@homepc ~]# chmod a+rwxt /export
[root@homepc ~]# echo test > /export/testfile.txt
[root@homepc ~]# cat /etc/exports
/export 127.0.0.1(ro) 192.168.1.2(ro) 192.168.1.3(ro)
[root@homepc ~]# /usr/sbin/exportfs -ra
[root@homepc ~]# mkdir /mnt/nfs4
[root@homepc ~]# mount -t nfs4 127.0.0.1:/ /mnt/nfs4
mount.nfs4: 127.0.0.1:/ failed, reason given by server: No such file or directory
[root@homepc ~]# mount -t nfs4 127.0.0.1:/export /mnt/nfs4
mount.nfs4: 127.0.0.1:/export failed, reason given by server: No such file or directory
[root@homepc ~]# /sbin/service iptables stop
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
[root@homepc ~]# mount -t nfs4 127.0.0.1:/ /mnt/nfs4
mount.nfs4: 127.0.0.1:/ failed, reason given by server: No such file or directory
[root@homepc ~]# mount -t nfs4 127.0.0.1:/export /mnt/nfs4
mount.nfs4: 127.0.0.1:/export failed, reason given by server: No such file or directory
[root@homepc ~]# /sbin/service nfs restart
Shutting down NFS mountd: [ OK ]
Shutting down NFS daemon: [ OK ]
Shutting down NFS quotas: [ OK ]
Shutting down NFS services: [ OK ]
Starting NFS services: [ OK ]
Starting NFS quotas: [ OK ]
Starting NFS daemon: [ OK ]
Starting NFS mountd: [ OK ]
[root@homepc ~]# mount -t nfs4 127.0.0.1:/ /mnt/nfs4
mount.nfs4: 127.0.0.1:/ failed, reason given by server: No such file or directory
[root@homepc ~]# mount -t nfs4 127.0.0.1:/export /mnt/nfs4
mount.nfs4: 127.0.0.1:/export failed, reason given by server: No such file or directory
[root@homepc ~]# ls -o /export
total 8
-rw-r--r-- 1 root 5 Aug 25 21:02 testfile.txt
[root@homepc ~]# cat /etc/hosts.allow
#
# hosts.allow This file describes the names of the hosts which are
# allowed to use the local INET services, as decided
# by the '/usr/sbin/tcpd' server.
#
portmap: 127.0.0.1, 192.168.1.2, 192.168.1.3
mountd: 127.0.0.1, 192.168.1.2, 192.168.1.3
rquotad: 127.0.0.1, 192.168.1.2, 192.168.1.3
statd: 127.0.0.1, 192.168.1.2, 192.168.1.3
[root@homepc ~]#
|

26th August 2007, 02:27 AM
|
 |
Registered User
|
|
Join Date: May 2006
Location: Caracas, Venezuela
Posts: 1,828

|
|
|
I think /etc/exports must contain something like:
/export 127.0.0.1(ro) 192.168.1.2(ro) 192.168.1.3(ro)
HTH
__________________
Pietro Pesci Feltri
PowerBook 15" G4 and
MacBook Pro 17" Intel Core 2 Duo
Intel I5 Desktop
|

26th August 2007, 02:38 AM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 8

|
|
|
I think my /etc/exports file is identical already to what you suggest I should change it to. Thanks, Pete
|

11th October 2007, 11:10 AM
|
|
Registered User
|
|
Join Date: Oct 2007
Posts: 2

|
|
Hi thrombomodulin,
I am too facing the same problem.
found the following link suggesting a solution, however my initial attempts to configure it is failed.
I am still searching for the cause and solutions.
http://fedorasolved.org/post-install...s/nfsv4-fedora
|

11th October 2007, 06:31 PM
|
 |
Registered User
|
|
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,301

|
|
|
What does "exportfs" report is shared ?
|

12th October 2007, 12:01 AM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 8

|
|
|
Prabhat3107,
I found this links also. I followed the instructions exactly. NFS4 now works between my two Fedora 7 machines.
Thrombomodulin
|

12th October 2007, 05:24 AM
|
|
Registered User
|
|
Join Date: Oct 2007
Posts: 2

|
|
Hi,
I could suceed in configuring nfsv4 server.
the importent thing with nfsv4 server is you need to put fsid=0 option with the exports.
for example: (in /etc/exports)
/home/data *(ro,fsid=0)
if you do not use fsid=0 option you will get the
"mount.nfs4: 127.0.0.1:/export failed, reason given by server: No such file or directory "
error
refer the manual page
# man 5 exports
which say that
Quote:
The value 0 has a special meaning when use with NFSv4. NFSv4
has a concept of a root of the overall exported filesystem. The
export point exported with fsid=0 will be used as this root.
|
If I have to make a correction in the /etc/exports file you have posted it would be as bellow
[root@homepc ~]# cat /etc/exports
Quote:
|
/export 127.0.0.1(ro,fsid=0) 192.168.1.2(ro,fsid=0) 192.168.1.3(ro,fsid=0)
|
and while mounting the nfs share observer the folliwing
# mount -t nfs4 <serverip>:/ /mount/point
not mount -t nfs4 <serverip>:/exports /mount/point
Last edited by prabhat3107; 17th October 2007 at 04:55 AM.
|

26th January 2010, 06:33 AM
|
|
Registered User
|
|
Join Date: Jan 2010
Posts: 1

|
|
|
This worked for me in Fedora 10 as well. The magic bit was "fsid=0".
Thanks!
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Current GMT-time: 05:01 (Thursday, 23-05-2013)
|
|
 |
 |
 |
 |
|
|