NFS mount fails "reason by server: No such file or directory" , but dir exists!
FedoraForum.org - Fedora Support Forums and Community
Results 1 to 8 of 8
  1. #1
    Join Date
    May 2005
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Arrow 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 ~]#

  2. #2
    Join Date
    May 2006
    Location
    Caracas, Venezuela
    Posts
    1,886
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  3. #3
    Join Date
    May 2005
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think my /etc/exports file is identical already to what you suggest I should change it to. Thanks, Pete

  4. #4
    Join Date
    Oct 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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

  5. #5
    stevea Guest
    What does "exportfs" report is shared ?

  6. #6
    Join Date
    May 2005
    Posts
    10
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Prabhat3107,

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

    Thrombomodulin

  7. #7
    Join Date
    Oct 2007
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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
    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
    /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.

  8. #8
    Join Date
    Jan 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This worked for me in Fedora 10 as well. The magic bit was "fsid=0".

    Thanks!

Similar Threads

  1. Replies: 5
    Last Post: 20th February 2009, 06:35 PM
  2. Replies: 0
    Last Post: 6th December 2008, 04:29 AM
  3. yum update fails "mono-zeroconf-0.7.5-4.fc8.i386 conflicts with file from"
    By flakrat in forum Installation, Upgrades and Live Media
    Replies: 3
    Last Post: 15th April 2008, 02:17 AM
  4. Rsync problems - "no such file or directory"
    By tonyingesson in forum Using Fedora
    Replies: 0
    Last Post: 7th January 2006, 12:16 AM
  5. Installation fails with "no such file or directory"
    By Chris Brett in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 1st November 2004, 02:30 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •