Find the answer to your Linux question:
Results 1 to 10 of 10
The problem is that I'm unable to mount an NFS exported filesystem on the client. Initially, the server rejected the NFS request. Now, RPC is rejecting the connection. Two X86 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2012
    Posts
    5

    Cool Fedora 16 unable to NFS4 mount from client


    The problem is that I'm unable to mount an NFS exported filesystem on
    the client. Initially, the server rejected the NFS request. Now, RPC
    is rejecting the connection.

    Two X86 32-bit PCs, connected via wireless wlan0. Kernel on both systems
    is 3.1.6-1.fc16.i686.PAE Connection is managed by NetworkManager.

    Both systems are running an up-to-date Fedora 16. Rebooting does not
    change the problem.

    I would appreciate inshight as to what is happening.
    As I'm reliably informed that a for all intents and purposes configuration
    is working, I have to assume that it's something that I've done. But what?

    ===============

    Detail.

    First the setup.

    Server:

    % cat /etc/exports
    /nfs4exports 192.168.0.0/24(ro,sync,insecure,root_squash,no_subtree_checck, fsid=0)
    /nfs4exports/home 192.168.0.0/24(rw,nohide,sync,insecure,root_squash,no_subtree_ check)

    % ls -ld /nfs4exports/ /nfs4exports/*
    drwxrwxrwt 5 root root 4096 Dec 31 15:34 /nfs4exports//
    drwxrwxrwt. 6 root root 4096 May 18 2011 /nfs4exports/home/
    # systemctl -a |grep nfs
    nfs4exports-home.mount loaded active mounted /nfs4exports/
    home
    nfs4exports-tmp.mount loaded active mounted /nfs4exports/
    tmp
    nfs4expo...usrlocal.mount loaded active mounted /nfs4exports/
    usrlocal
    proc-fs-nfsd.mount loaded active mounted RPC Pipe File
    System
    nfs-idmap.service loaded active running NFSv4 ID-name
    mapping daemon
    nfs-lock.service loaded active running NFS file
    locking service.
    nfs-server.service loaded active running NFS Server

    Client:

    % systemctl -a |grep nfs
    nfs-idmap.service loaded active running NFSv4 ID-name mapping daemon
    nfs-lock.service loaded active running NFS file locking service.

    firewall is disabled on both systems.

    Here's what happened first -- when the NFS connection was rejected

    # mount -t nfs4 mtranch:/nfs4exports/home /mtranch-home
    mount.nfs: access denied by server while mounting mtranch:/nfs4exports/home

    Debug:

    # sysctl -w sunrpc.nfs_debug=1023
    # mount -t nfs4 mtranch:/home /mtranch-home
    # dmesg ( Error 13 is: Permission denied )

    [ 9772.530553] --> nfs4_create_server()
    [ 9772.530567] --> nfs4_init_server()
    [ 9772.530568] --> nfs4_set_client()
    [ 9772.530570] --> nfs_get_client(mtranch,v4)
    [ 9772.532498] NFS: Callback listener port = 54051 (af 2)
    [ 9772.532509] NFS: Callback listener port = 34833 (af 10)
    [ 9772.532549] --> nfs_get_client() = f2337a00 [new]
    [ 9772.532551] <-- nfs4_set_client() = 0 [new f2337a00]
    [ 9772.532561] <-- nfs4_init_server() = 0
    [ 9772.532564] --> nfs4_get_rootfh()
    [ 9772.532569] encode_compound: tag=
    [ 9772.533339] encode_compound: tag=
    [ 9772.533945] encode_compound: tag=
    [ 9772.533966] encode_compound: tag=
    [ 9772.534696] encode_compound: tag=
    [ 9772.535725] encode_compound: tag=
    [ 9772.536449] encode_compound: tag=
    [ 9775.536039] encode_compound: tag=
    [ 9775.537400] encode_compound: tag=
    [ 9775.539288] nfs4_get_rootfh: getroot error = 13
    [ 9775.539291] <-- nfs4_get_rootfh() = -13
    [ 9775.539293] --> nfs_free_server()
    [ 9775.539340] --> nfs_put_client({1})
    [ 9775.539343] --> nfs_free_client(4)
    [ 9775.539449] <-- nfs_free_client()
    [ 9775.539457] <-- nfs_free_server()
    [ 9775.539459] <-- nfs4_create_server() = error -13
    [ 9775.539463] <-- nfs4_mount() = -13 [error]

    Rejection from RPC

    dmesg after mount; mount is looping
    111 is (supprise!) Connection refused

    [ 1498.776618] --> nfs4_create_server()
    [ 1498.776631] --> nfs4_init_server()
    [ 1498.776633] --> nfs4_set_client()
    [ 1498.776634] --> nfs_get_client(mtranch,v4)
    [ 1498.776738] nfs_create_rpc_client: cannot create RPC client. Error = -111
    [ 1498.776740] <-- nfs4_init_client() = xerror -111
    [ 1498.776742] --> nfs_put_client({1})
    [ 1498.776743] --> nfs_free_client(4)
    [ 1498.776745] <-- nfs_free_client()
    [ 1498.776747] <-- nfs4_set_client() = xerror -111
    [ 1498.776748] <-- nfs4_init_server() = -111
    [ 1498.776749] --> nfs_free_server()
    [ 1498.779070] <-- nfs_free_server()
    [ 1498.779073] <-- nfs4_create_server() = error -111
    [ 1498.779077] <-- nfs4_mount() = -111 [error]
    [ 1499.779258] --> nfs4_create_server()
    [ 1499.779277] --> nfs4_init_server()
    [ 1499.779278] --> nfs4_set_client()
    [ 1499.779280] --> nfs_get_client(mtranch,v4)
    [ 1499.779363] nfs_create_rpc_client: cannot create RPC client. Error = -111
    [ 1499.779365] <-- nfs4_init_client() = xerror -111
    [ 1499.779367] --> nfs_put_client({1})
    [ 1499.779368] --> nfs_free_client(4)
    [ 1499.779370] <-- nfs_free_client()
    [ 1499.779371] <-- nfs4_set_client() = xerror -111
    [ 1499.779373] <-- nfs4_init_server() = -111
    [ 1499.779374] --> nfs_free_server()
    [ 1499.782044] <-- nfs_free_server()
    [ 1499.782047] <-- nfs4_create_server() = error -111
    [ 1499.782050] <-- nfs4_mount() = -111 [error]

  2. #2
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    /nfs4exports 192.168.0.0/24(ro,sync,insecure,root_squash,no_subtree_checck, fsid=0)
    /nfs4exports/home 192.168.0.0/24(rw,nohide,sync,insecure,root_squash,no_subtree_ check)
    I assume the misspelling on the first line is a typo and the space on the second line is not really there...

    I got a similar mount error as you using the above configuration (well, NFS server running on a F16 server and mounting from a RHEL4 client), but I got it to work, if I dropped the fsid=0 option. I don't see that option listed in any man pages, what is it for?

    Also, I used mount -t nfs4 ... when mounting on the client side, but that is probably the default on the F16 client...

  3. #3
    Just Joined!
    Join Date
    Jan 2012
    Posts
    5
    Your assumptions are correct. Stumbling around in the dark here.

    The fsid=0 option comes from crazysquirrel.com

    /nfs4exports 192.168.0.0/24(ro,sync,insecure,root_squash,no_subtree_check,f sid=0)

    This line expors the /nfs4exports directory as the root of the NFS pseudo file system to the whole of the local network. We know that this specifies the root of the pseudo file system beause of the fsid=0 option. Once you have made changes to /etc/exports run
    I did try without the option after restarting the server there were no differences in the results.

  4. #4
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    hmm...okay, how about dumbing down your exports file, to see if you can get a basic connection working? maybe something simple like:

    Code:
    /nfs4exports 192.168.0.0/24(ro,sync)
    and nothing else in the file.

    also, do exportfs -rv after modifying it so it'll show you what it is exporting.

    also, what is your exact mount command on the client side?

    you don't have tcp_wrappers enabled, right? (/etc/hosts.deny)

    you are positive firewall is disabled, right?

    Your client PC does have a 192.168.0.x ip address, right?

    Edit: Is SELinux enabled? Maybe it is buggering something. check if enabled (on server & client) with:

    Code:
    getenforce
    temporarily disable with:

    Code:
    setenforce 0
    Last edited by atreyu; 01-04-2012 at 11:05 PM. Reason: SELinux?

  5. #5
    Just Joined!
    Join Date
    Jan 2012
    Posts
    5
    Hokay, ...
    Code:
    # exportfs -rv
    exporting 192.168.0.0/24:/nfs4exports
    and the exact command

    Code:
    mount -v -v -v -t nfs4 mtranch:/ /mtranch
    /etc/hosts.deny has no entries

    firewall is really, really, really disabled.

    Server is 192.168.10.2, client is 192.168.10.4

    SElinux is disabled.

  6. #6
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    you need to specify the share name in the nfs mount command, i think. but maybe that is where your virtual root option came in (the fsid=0 option). anyway, try this to see if it works, to start somewhere:

    Code:
    mount -v -v -v -t nfs4 mtranch:/nfs4exports /mtranch

  7. #7
    Just Joined!
    Join Date
    Jan 2012
    Posts
    5
    Alas no joy. FWIW, my suspicion (without any competence on my part) is that the problem is happening before I get to the NFS server. It is, after all, that RPC is denying access at this point.

  8. #8
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    I think I've confused you, the ip range for authorized clients in /etc/exports needs to reflect the network you are on. for example, if, as you say, your server is 192.168.10.2 and client is 192.168.10.4, then on your server's /etc/exports, you should have something like:

    Code:
    /nfs4exports 192.168.10.0/24(ro,sync)

  9. #9
    Just Joined!
    Join Date
    Jan 2012
    Posts
    5
    Exactly the solution. Thanks.

  10. #10
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,307
    cheers! glad it's sorted.

Posting Permissions

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