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?
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
grep nfs /etc/fstab
Please do not only post your conclusions, but post the computer facts where you based your conclusions on.
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.
## 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.
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:
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.
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.
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:
| # 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 :(
I have Fedora on the server and Leap on the client. When I ran the command it did not return anything:
dagr@opensuse:~> /sbin/rpcinfo -b mountd 1
You have new mail in /var/spool/mail/dagr
What I hoped for was that maybe someone could tell if it were something wrong in my setup, but as it seems everything seems to be in order, but the module for searching the network for nfs servers does not work for servers with other distributions. The shares are mounted and I’m happy.