Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Setting up nfs client Yast

  1. #1

    Default Setting up nfs client Yast

    Hi,
    I've set up nfs client in Yast. I used ip adress to point to the right server, and it went well, but when I tried to use the search button in the add/edit section I got an error message that says: "the network search didn't find any nfs servers in the network. Maybe the firewall is turned on and blocking network search". I have then turned the firewall off, but the network search does not change.

    I have put the hostname of the server in the /etc/hosts-file on both machines, and when I ping the server with hostname it responds positive. I wondered if I have some settings which prohibit the network search to perform as it should?

    Dag R

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

    Default Re: Setting up nfs client Yast

    You only talk about what you did on the target, but nothing about what you did on the server.

    As far as your post covers it, the system seems to exist (because you say you can ping it, but you never showed anything), but there is no evidence of an NFS server running on it at all.

    My advice would also be to show what the configuration is on the client by statements like
    Code:
    grep nfs /etc/fstab

    Please do not only post your conclusions, but post the computer facts where you based your conclusions on.
    Henk van Velden

  3. #3
    Join Date
    Aug 2008
    Location
    Brazil
    Posts
    3,240

    Default Re: Setting up nfs client Yast

    Quote Originally Posted by dagring View Post
    Hi,
    I've set up nfs client in Yast. I used ip adress to point to the right server, and it went well, but when I tried to use the search button in the add/edit section I got an error message that says: "the network search didn't find any nfs servers in the network. Maybe the firewall is turned on and blocking network search". I have then turned the firewall off, but the network search does not change.

    I have put the hostname of the server in the /etc/hosts-file on both machines, and when I ping the server with hostname it responds positive. I wondered if I have some settings which prohibit the network search to perform as it should?

    Dag R
    Long ago I had this problem, so I used the IP address in the NFS Server Hostname field. It works, and then you can choose the Remote directory using the select button.

    I tried to fix this a couple of times long ago, but couldn't find out why, so I got used to using the server IP address. It has to be persistent, of course.

    Obs: No need to turn the firewall off, you can open the firewall port in the NFS Settings tab.

  4. #4

    Default Re: Setting up nfs client Yast

    Here is the output of grep nfs /etc/fstab:

    Code:
    dagr@opensuse:~> grep nfs /etc/fstab
    192.168.1.2:/home/dagr/Musikk   /arkiv/fed_mntpoint1    nfs     defaults 0 0 
    192.168.1.2:/home/dagr/Filmer   /arkiv/fed_mntpoint2    nfs     defaults 0 0 
    d
    Dag R

  5. #5

    Default Re: Setting up nfs client Yast

    Post the output of

    Code:
    ## on the nfs server
    hostname -I
    pgrep -a nfs
    sudo grep -v '#' /etc/sysconfig/nfs
    sudo cat /etc/exports
    sudo exportfs
    
    ## on the client
    hostname -I
    sudo mount -t nfs 192.168.1.2:/home/dagr/Musikk /arkiv/fed_mntpoint1
    you may have to try nfs4 in the mount command above as I am not sure whether nfs type works with nfs4. It probably should

    I pefer autofs over fstab mounts for nfs. But that requires that plain mount works already.
    Last edited by markdd; 12-Feb-2018 at 12:22. Reason: sudo missing in mount call

  6. #6

    Default Re: Setting up nfs client Yast

    Quote Originally Posted by markdd View Post
    Post the output of

    Code:
    ## on the nfs server
    hostname -I
    pgrep -a nfs
    sudo grep -v '#' /etc/sysconfig/nfs
    sudo cat /etc/exports
    sudo exportfs
    
    ## on the client
    hostname -I
    sudo mount -t nfs 192.168.1.2:/home/dagr/Musikk /arkiv/fed_mntpoint1
    you may have to try nfs4 in the mount command above as I am not sure whether nfs type works with nfs4. It probably should

    I pefer autofs over fstab mounts for nfs. But that requires that plain mount works already.
    Here is the output from the server:

    Code:
    [dagr@fedorastation ~]$ hostname -I
    192.168.1.2 192.168.122.1 2001:4641:8348:0:876d:f51f:3419:65eb 
    [dagr@fedorastation ~]$ pgrep -a nfs
    1070 nfsiod
    14395 nfsd
    14396 nfsd
    14397 nfsd
    14398 nfsd
    14399 nfsd
    14400 nfsd
    14401 nfsd
    14402 nfsd
    [dagr@fedorastation ~]$ sudo grep -v '#' /etc/sysconfig/nfs
    RPCNFSDARGS=""
    RPCMOUNTDOPTS=""
    STATDARGS=""
    SMNOTIFYARGS=""
    RPCIDMAPDARGS=""
    RPCGSSDARGS=""
    GSS_USE_PROXY="yes"
    BLKMAPDARGS=""
    [dagr@fedorastation ~]$ sudo cat /etc/exports
    /home/dagr/Musikk 192.168.1.9(rw,sync,no_root_squash)
    /home/dagr/Filmer opensuse(rw,sync,no_root_squash)
    [dagr@fedorastation ~]$ sudo exportfs
    /home/dagr/Musikk
            192.168.1.9
    /home/dagr/Filmer
            192.168.1.9
    Here is the output from the client:

    Code:
    dagr@opensuse:~> hostname -I
    hostname: invalid option -- 'I'
    Usage: hostname [-v] {hostname|-F file}      set hostname (from file)                                                                                        
           domainname [-v] {nisdomain|-F file}   set NIS domainname (from file)                                                                                  
           hostname [-v] [-d|-f|-s|-a|-i|-y|-n]  display formatted name                                                                                          
           hostname [-v]                         display hostname                                                                                                
                                                                                                                                                                 
           hostname -V|--version|-h|--help       print info and exit                                                                                             
                                                                                                                                                                 
        dnsdomainname=hostname -d, {yp,nis,}domainname=hostname -y                                                                                               
                                                                                                                                                                 
        -s, --short           short host name                                                                                                                    
        -a, --alias           alias names                                                                                                                        
        -i, --ip-address      addresses for the hostname                                                                                                         
        -f, --fqdn, --long    long host name (FQDN)
        -d, --domain          DNS domain name
        -y, --yp, --nis       NIS/YP domainname
        -F, --file            read hostname or NIS domainname from given file
    
       This command can read or set the hostname or the NIS domainname. You can
       also read the DNS domain or the FQDN (fully qualified domain name).
       Unless you are using bind or NIS for host lookups you can change the
       FQDN (Fully Qualified Domain Name) and the DNS domain name (which is
       part of the FQDN) in the /etc/hosts file.
    dagr@opensuse:~> sudo mount -t nfs 192.168.1.2:/home/dagr/Musikk /arkiv/fed_mntpoint1
    The first resposns from the client gave a error message when used with capital I, with small i it says:

    Code:
    dagr@opensuse:~> hostname -i
    192.168.1.9

  7. #7
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    29,818

    Default Re: Setting up nfs client Yast

    Code:
    /home/dagr/Musikk 192.168.1.9(rw,sync,no_root_squash)
    /home/dagr/Filmer opensuse(rw,sync,no_root_squash)
    It looks as if you have 192.168.1.9 as the allowed client (and I think I can detect from the other info that that is the client), but why is the other entry allowed system by hostname of opensuse?
    Henk van Velden

  8. #8

    Default Re: Setting up nfs client Yast

    Quote Originally Posted by hcvv View Post
    Code:
    /home/dagr/Musikk 192.168.1.9(rw,sync,no_root_squash)
    /home/dagr/Filmer opensuse(rw,sync,no_root_squash)
    It looks as if you have 192.168.1.9 as the allowed client (and I think I can detect from the other info that that is the client), but why is the other entry allowed system by hostname of opensuse?
    I set the hostname in the /etc/exports. I could have set both folders with hostname, but when I tried to get the module in Yast to search for nfs servers in the network and I got nil result, I thought it was something wrong with my setup. I had to insert ip adresses, and let one of the two folders in the exports file to be the hostname and not the ip adress, to see if it made any difference.

    I get to mount the nfs shares, but the module (nfs client in Yast) can't find any servers when I click the chose button.

    Dag R

  9. #9

    Default Re: Setting up nfs client Yast

    This is the command yast runs for nfs server discovery. Run in in a console and see whether it returns the server. It does for me, though I have both server and clients running tumbleweed and no firewalls on my LAN.

    Code:
    /sbin/rpcinfo -b mountd 1
    # 10.0.20.9.78.80  plan9.site
    # 10.0.20.9.78.80  plan9.site
    https://github.com/yast/yast-nfs-cli...es/Nfs.rb#L666

  10. #10

    Default Re: Setting up nfs client Yast

    The yast source are quite frank about the state of exports discovery. So do not rely on it. After all, you can mount the shares, so go ahead and use them ;-)

    For fun:

    Code:
    # showmounts does not work for nfsv4 (#466454)
    if v4
    tmpdir = Mount(server, "/", nil, "ro", "nfs4")
    # This is completely stupid way how to explore what can be mounted
    # and I even don't know if it is correct. Maybe 'find tmpdir -xdev -type d'
    # should be used instead. No clue :(
    https://github.com/yast/yast-nfs-cli...es/Nfs.rb#L687

Page 1 of 2 12 LastLast

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
  •