Results 1 to 9 of 9

Thread: Can't connect to NFS shares

  1. #1

    Default Can't connect to NFS shares

    Installed Nfs Server using Yast Nfs Server (installs ns-kernel-server)

    Set up a share, looks like this in /etc/exports:

    /backups 192.168.0.0/255.255.255.0(fsid=0,rw,root_squash,sync,subtree_check)


    On the client I have this in fstab:

    192.168.0.2:/backups/ /backups nfs4 defaults 0 0

    Also tried it from the commandline with mount 192.168.0.2:/backups /backups, this returns:

    mount.nfs: mount system call failed


    The user I'm logged onto the client machine as exists on the server with the same uid, though this shouldn't even matter, I have nfsidmap on both machines (the server is running opensuse 11.0 x86_64 and the client opensuse 11.1 x86_64)

    I've allowed nfs server and client in the firewall on both machines, forwarded port 2048 udp (preconfigured) and 2049 tcp to 192.168.0.2 in the router


    When I start the nfs server, /var/log/messages shows this:

    rpc.statd[16810]: statd running as root. chown /var/lib/nfs/sm to choose different user
    kernel: NFSD: Using /var/lib/nfs/v4recovery as the NFSv4 state recovery directory
    kernel: NFSD: starting 90-second grace period


    Could the fact it's running as root be the thing that's stopping me from connecting?

    I've read numerous google results and got no clues as to where I may be going wrong

    Any ideas anyone?

  2. #2
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,799

    Default Re: Can't connect to NFS shares

    You are explaining all the steps you took on the server, including the installation of nfs-kernel-server.

    But I am mising the step of installing nfs-client on the other system. Did you forget to mention or to install?
    Henk van Velden

  3. #3
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,925
    Blog Entries
    14

    Default Re: Can't connect to NFS shares

    Make /etc/exports like this:

    /backups * (fsid=0,rw,root_squash,sync,subtree_check)

    On the client /etc/fstab then should have

    SERVERIPHERE:/backups /backups nfs defaults 0 0


    This works. Folders should exist on both server and client. From here on you can figure out how to set netmask etc.

    Good luck
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  4. #4

    Default Re: Can't connect to NFS shares

    Henck Yast's NFS Client module was installed by default on the Suse machines I have here

    Knurpht I've tried your suggestion and if I try mounting the share I now get this:

    mount.nfs4: mounting 192.168.0.2:/backups failed, reason given by server:
    No such file or directory

    But there IS such a directory, it's actually a partition mounted at /backups, but I've tried it with a number of different folders on different drives, including some owned by the user I'm logged on as

    Seems no matter what I do the server reports no such file or directory

  5. #5

    Default Re: Can't connect to NFS shares

    Give it up as a bad job then

    Been reading reams of stuff for days, trying everything I can think of and then some besides

    Knurpht said 'this works', in my case nothing seems to when it comes to nfs

    Think I'll just have to carry on using samba

  6. #6
    Join Date
    Jun 2008
    Location
    Groningen, Netherlands
    Posts
    20,925
    Blog Entries
    14

    Default Re: Can't connect to NFS shares

    You're almost there !!! The only thing is that you're trying to mount a folder from the client's IP, where you should mount a folder from your server's IP. That's all.

    If you're still interested, pass us the IP of the server, the folder to export and mount, and the client's IP.
    ° Appreciate my reply? Click the star and let me know why.

    ° Perfection is not gonna happen. No way.

    http://en.opensuse.org/User:Knurpht
    http://nl.opensuse.org/Gebruiker:Knurpht

  7. #7

    Default Re: Can't connect to NFS shares

    The server's ip is 192.168.0.2

    (which is the ip I'm trying to mount)

    The folder to export and mount is /backups, there are other folders I would be exporting if/when it's working, the backups one is just the one I tried first

    The client's ip is 192.168.0.4, though there would be other clients on the 192.168.0 range and possibly even some on the 192.168.1 range

  8. #8

    Default Re: Can't connect to NFS shares

    Knurpht I'm curious, what exactly made you think I was trying to mount a share at the client's ip and not the server's?

  9. #9

    Default Re: Can't connect to NFS shares

    3.4 Mounting remote exported directories from an NFSv4 client _____________________________________________________________ One main difference between previous versions of NFS and NFSv4 is the way in which mount is invoked. With regard to the pseudofilesystem concept sketched above, mount is done as follows: #mount -t nfs4 <servername>:/ <mntpath> Observe that only '/' is given after the servername.

    So in fstab it's;

    hostname.domain.com:/ /data/AppSrv01 nfs4 defaults 0 0

    And not


    hostname.domain.com:/data/AppSrv01 /data/AppSrv01 nfs4 defaults 0 0

    See;
    http://www.suse.de/~sjayaraman/nfs4_howto.txt

Posting Permissions

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