Unable to make NFS connection from laptop.

Wrote too soon. While trying to solve a different problem I went through an update and reboot on my laptop and now my carefully installed NFS connection has failed on the client (Laptop here).

What I am finding is that on booting the NFS doesn’t work. I have to use yast to create the nfs share again, although it is shown in yast but I have to delete and rebuild. Once done the nfs connection has been completed the connection works. However, following on a restart of the laptop;

The shutdown is delayed by over a minute due to the NFS not stopping.
On restart I get a red warning that the NFS does not start. This is before I have logged in. Once logged in the NFS is not connected.

So I am back to the beginning. Here are some of the things I have tried:-
From the laptop:-

alastair@IBMW530:~> grep nfs /etc/fstab 
192.168.169.134:/multimedia                /home/alastair/NFS_Multimedia_NFS  **nfs****nfs**vers=4.2                   0 
 0 
alastair@IBMW530:~>

From the server:-

alastair@IBMW530:~> ssh alastair@192.168.169.134         
(alastair@192.168.169.134) Password:  
Last failed login: Fri Jun 24 17:36:06 BST 2022 from 192.168.169.223 on ssh:notty 
There were 2 failed login attempts since the last successful login. 
Last login: Mon Jun 20 20:23:23 2022 from 192.168.169.223 
Have a lot of fun... 
alastair@ibmserv2:~> ip address show 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo 
       valid_lft forever preferred_lft forever 
    inet6 ::1/128 scope host  
       valid_lft forever preferred_lft forever 
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000 
    link/ether 34:40:b5:93:38:d0 brd ff:ff:ff:ff:ff:ff
    altname eno1 
    altname enp11s0f0 
    inet 192.168.169.134/25 brd 192.168.169.255 scope global eth0 
       valid_lft forever preferred_lft forever 
    inet6 fe80::3640:b5ff:fe93:38d0/64 scope link  
       valid_lft forever preferred_lft forever 
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP group default qlen 1000 
    link/ether 34:40:b5:93:38:d1 brd ff:ff:ff:ff:ff:ff
    altname eno2 
    altname enp11s0f1 
4: usb0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000 
    link/ether 36:40:b5:93:38:d5 brd ff:ff:ff:ff:ff:ff
    altname enp0s26f1u2 
5: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 
    link/ether 34:40:b5:93:38:d1 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::3640:b5ff:fe93:38d1/64 scope link  
       valid_lft forever preferred_lft forever 
alastair@ibmserv2:~> ip route show 
default via 192.168.169.129 dev eth0 
192.168.169.128/25 dev eth0 proto kernel scope link src 192.168.169.134 
alastair@ibmserv2:~> ip -6 route show 
::1 dev lo proto kernel metric 256 pref medium 
fe80::/64 dev eth0 proto kernel metric 256 pref medium 
fe80::/64 dev br0 proto kernel metric 256 pref medium 
alastair@ibmserv2:~> cat /etc/exports 
/multimedia/multimedia  *(rw,root_squash,sync,no_subtree_check) 
alastair@ibmserv2:~> 

and

alastair@ibmserv2:~> sudo systemctl status nfs-* 
[sudo] password for root:  
**●** nfs-server.service - NFS server and services 
     Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled) 
    Drop-In: /usr/lib/systemd/system/nfs-server.service.d 
             └─nfsserver.conf, options.conf 
             /run/systemd/generator/nfs-server.service.d 
             └─order-with-mounts.conf 
     Active: **active (exited)** since Sun 2022-06-26 10:56:15 BST; 3h 20min ago 
    Process: 2464 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS) 
    Process: 2827 ExecStart=/usr/sbin/rpc.nfsd $NFSD_OPTIONS (code=exited, status=0/SUCCESS) 
   Main PID: 2827 (code=exited, status=0/SUCCESS) 

Jun 26 10:56:14 ibmserv2 systemd[1]: Starting NFS server and services... 
Jun 26 10:56:15 ibmserv2 systemd[1]: Finished NFS server and services. 

**●** nfs-idmapd.service - NFSv4 ID-name mapping service 
     Loaded: loaded (/usr/lib/systemd/system/nfs-idmapd.service; static) 
     Active: **active (running)** since Sun 2022-06-26 10:56:03 BST; 3h 20min ago 
   Main PID: 1085 (rpc.idmapd) 
      Tasks: 1 (limit: 4915) 
     CGroup: /system.slice/nfs-idmapd.service 
             └─1085 /usr/sbin/rpc.idmapd 


     Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; vendor preset: disabled) 
    Drop-In: /usr/lib/systemd/system/nfs-server.service.d 
             └─nfsserver.conf, options.conf 
             /run/systemd/generator/nfs-server.service.d 
             └─order-with-mounts.conf 
     Active: **active (exited)** since Sun 2022-06-26 10:56:15 BST; 3h 20min ago 
    Process: 2464 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS) 
    Process: 2827 ExecStart=/usr/sbin/rpc.nfsd $NFSD_OPTIONS (code=exited, status=0/SUCCESS) 
   Main PID: 2827 (code=exited, status=0/SUCCESS) 

Jun 26 10:56:14 ibmserv2 systemd[1]: Starting NFS server and services... 
Jun 26 10:56:15 ibmserv2 systemd[1]: Finished NFS server and services. 

**●** nfs-idmapd.service - NFSv4 ID-name mapping service 
     Loaded: loaded (/usr/lib/systemd/system/nfs-idmapd.service; static) 
     Active: **active (running)** since Sun 2022-06-26 10:56:03 BST; 3h 20min ago 
   Main PID: 1085 (rpc.idmapd) 
      Tasks: 1 (limit: 4915) 
     CGroup: /system.slice/nfs-idmapd.service 
             └─1085 /usr/sbin/rpc.idmapd 

Jun 26 10:56:03 ibmserv2 systemd[1]: Starting NFSv4 ID-name mapping service... 
Jun 26 10:56:03 ibmserv2 systemd[1]: Started NFSv4 ID-name mapping service. 

**●** nfs-mountd.service - NFS Mount Daemon 
     Loaded: loaded (/usr/lib/systemd/system/nfs-mountd.service; static) 
    Drop-In: /usr/lib/systemd/system/nfs-mountd.service.d 
             └─options.conf 
     Active: **active (running)** since Sun 2022-06-26 10:56:14 BST; 3h 20min ago 
   Main PID: 2437 (rpc.mountd) 
      Tasks: 1 (limit: 4915) 
     CGroup: /system.slice/nfs-mountd.service 
             └─2437 /usr/sbin/rpc.mountd 

Jun 26 10:56:14 ibmserv2 systemd[1]: Starting NFS Mount Daemon... 
Jun 26 10:56:14 ibmserv2 rpc.mountd[2437]: **Version 2.1.1 starting** 
Jun 26 10:56:14 ibmserv2 systemd[1]: Started NFS Mount Daemon. 
lines 23-38/38 (END)
 


I am lost again. Where am I going wrong?

I may have identified another problem.
For reasons I mentioned above my av media is held in a directory on a different partition which is named /multimedia.
When my hardware was reconfigured this multimedia database ended up on a subdirectory also named multimedia so on the storage partition I have
/multimedia/multimedia. This may be seen on my system:-

alastair@ibmserv2:~> cat /etc/fstab 
UUID=d49782e2-1df9-4013-a8c9-6136ff257446  /            btrfs  defaults             0  0 
UUID=f6190f68-a732-46c1-97ed-1bd670763810  /boot        ext4   data=ordered         0  2 
UUID=d49782e2-1df9-4013-a8c9-6136ff257446  /var         btrfs  subvol=/@/var        0  0 
UUID=d49782e2-1df9-4013-a8c9-6136ff257446  /usr/local   btrfs  subvol=/@/usr/local  0  0 
UUID=d49782e2-1df9-4013-a8c9-6136ff257446  /tmp         btrfs  subvol=/@/tmp        0  0 
UUID=d49782e2-1df9-4013-a8c9-6136ff257446  /srv         btrfs  subvol=/@/srv        0  0 
UUID=d49782e2-1df9-4013-a8c9-6136ff257446  /root        btrfs  subvol=/@/root       0  0 
UUID=d49782e2-1df9-4013-a8c9-6136ff257446  /opt         btrfs  subvol=/@/opt        0  0 
UUID=d49782e2-1df9-4013-a8c9-6136ff257446  /home        btrfs  subvol=/@/home       0  0 
UUID=B738-D576                             /boot/efi    vfat   utf8                 0  2 
UUID=4272b75a-ea72-4068-8826-e2dfc5611fd5  /multimedia  xfs    defaults             0  2 
192.168.169.130:/Multimedia                /home/alastair/Temp_NAS2_share  nfs    nfsvers=3            0  0 
alastair@ibmserv2:~> 

The data directories are in the multimedia directory thus comprise three directories:-
/multimedia/multimedia/Music, Photos and Videos.

When I started this thread I had set up my NFS server using yast and pointing to my working directory in my home tree, named Mastermedia, which is softlinked from the storage partition thus:-

lrwxrwxrwx   1 alastair users     11 Sep 18  2021 Mastermedia -> **/multimedia**

As far as I can tell all this is correct and when I share the /multimedia/multimedia directory I think expect to see the second multimedia directory as an NFS share, which if I open it should just have the three subdirectories Music, Photos and Videos.

What I get however and when I have the NFS client working is not what I expected. The NFS client file structure appears as NFS_Multimedia_NFS/multimedia and I have to open that directory to see the three contents Music, Photos and Videos.
It seems that when I try and select a directory to share I am offered / and /multimedia. I select /multimedia but am I suspect being offered the first /multimedia on the partition.

Reading the man page on export options I suspect my problem is having two “multimedia” but am not sure, so if anybody can help again it world be appreciated.

nfsnfsvers=4.2 

This is still wrong. Do you ever read man pages?

Tried nfs just for fun (I avoid using remote file systems). Ran into a problem when the server started with the client being down and not known to the network. Running “systemctl restart nfs-server.service” on the server while the client is up and connected to the network fixes the problem here.

Hi I shall try what you suggest but meanwhile there is a problem.
To remove the earlier confusion I have renamed the subdirectory directory on the /multimedia mount to AV_multimedia so now I have;-
/multimedia/AV_multimedia. This avoids any selection of which directory is being shared as I can be sure I have selected the required directory and in my server I now have:-

alastair@ibmserv2:~> cat /etc/exports 
/multimedia/AV_multimedia       *(rw,root_squash,sync,no_subtree_check) 
alastair@ibmserv2:~> 

As I read this I should be trying to create the client with /AV_multimedia however when I try and create the NFS client using Yast I have two problems.

First no offered directory is found, as before, and only if I force NFSv4.2 is any directory offered and that is /multimedia not /multimedia/AV_multimedia.
In other words the exported directory is not what was intended but the directory above. The intended exported directory is not shown.

I suspect this is part of the problem. Shall keep working on this but I do believe theer is an underlying bug.

alastair@ibmserv2:~> cat /etc/fstab
UUID=d49782e2-1df9-4013-a8c9-6136ff257446 / btrfs defaults 0 0
UUID=f6190f68-a732-46c1-97ed-1bd670763810 /boot ext4 data=ordered 0 2
UUID=d49782e2-1df9-4013-a8c9-6136ff257446 /var btrfs subvol=/@/var 0 0
UUID=d49782e2-1df9-4013-a8c9-6136ff257446 /usr/local btrfs subvol=/@/usr/local 0 0
UUID=d49782e2-1df9-4013-a8c9-6136ff257446 /tmp btrfs subvol=/@/tmp 0 0
UUID=d49782e2-1df9-4013-a8c9-6136ff257446 /srv btrfs subvol=/@/srv 0 0
UUID=d49782e2-1df9-4013-a8c9-6136ff257446 /root btrfs subvol=/@/root 0 0
UUID=d49782e2-1df9-4013-a8c9-6136ff257446 /opt btrfs subvol=/@/opt 0 0
UUID=d49782e2-1df9-4013-a8c9-6136ff257446 /home btrfs subvol=/@/home 0 0
UUID=B738-D576 /boot/efi vfat utf8 0 2
UUID=4272b75a-ea72-4068-8826-e2dfc5611fd5 /multimedia xfs defaults 0 2
192.168.169.130:/Multimedia /home/alastair/Temp_NAS2_share nfs nfsvers=3 0 0

Multimedia is not multimedia

Also IP Adress?

For reasons I do not understand the line is correct on my system but not when I copy and paste. If you read my earlier posts you would have seen I have already addressed this

What you are seeing is a mount of a client NFS from another machine which is Multimedia on the NAS 192.168.169.130 and is the data referred to my the media servers. The server on that machine is only capable of NFSv3 so uses a different approach from NFSv4. I have no problem with this NFS server and client pair.

My problem and post are all concerned with the connection between my laptop and one of my IBM servers. The IBM and HP systems are all running LEAP 15.3. It is my laptop which has TW that I now suspect is where the fault lies.

To check further I booted an HP system which also runs on LEAP 15.3 and set up an NFS connection using Yast and the force NFSv4.2 option. This worked as expected but more importantly there were no error messages on shutting down and once re-booted the NFS connection was up and running as soon as I logged in.

I conclude that, at present, creating a NFS connection which will work after a re-boot and made between a LEAP 15.3 NFS server and a Tumbleweed NFS client is beyond my knowledge or ability.

Sorry to have taken up so much of your time and thanks again for the help and advice.
Budge.

Hi Budgie2. This reads like a possible network issue, whereby the mount is attempted before the network is ready at boot?

Are you sure? I doubt your claim. Double check.

Hi Karl, here it is again:

alastair@IBMW530:~> grep nfs /etc/fstab 
192.168.169.134:/multimedia                /home/alastair/NFS_Multimedia_NFS  **nfs****nfs**vers=4                     0 
 0 
alastair@IBMW530:~> 

As I enter this the line is correct when inserted between the hash signs. This has always been correct but it appears to be changed by the forum posting process. This happens even when I preview the post now. I confirm once again that this has always been correct when I run the grep command.

Hi Deano, This seems very possible because the route between the laptop and the server is long and busy. The route from the laptop is through wifi which is serving three vlans on three ssids. The traffic on vlan then has to be switched by firewall router to lan and then sorted out by another switch before reaching the nic. On the other hand the HP machine I have just tried is connected by copper on one subnet all the way to final switch.

There is an error warning on booting the laptop so I could try inserting a delay if you could please suggest where and how.
Worth a try.

This is what it really is:
[noparse]

alastair@IBMW530:~> grep nfs /etc/fstab 
192.168.169.134:/multimedia                /home/alastair/NFS_Multimedia_NFS  **nfs****nfs**vers=4                     0 
 0 
alastair@IBMW530:~> 

[/noparse]

As you see it is full of extra tags. Apart from the color that is put there by the grep command (which can be suppressed by adding the option --color=never to grep. I still doubt that grep will leave out the space or tab that must be there.

I do not know what terminal emulator you use, or how you copy/paste, but you should do a plain copy/paste of the text, not of all the eye candy.

In this case you could also do a

cat /etc/fstab

and then copy/paste the line we need on it’s own (as an exception to the rules I will accept that). But I can not work with such untrustable computer facts.

Hi Henk,

Try this:-

alastair@IBMW530:~> cat /etc/fstab 
UUID=ab51d09c-1257-45c0-938d-792fedccde55  /                       btrfs  defaults                      0  0 
UUID=ab51d09c-1257-45c0-938d-792fedccde55  /boot/grub2/x86_64-efi  btrfs  subvol=/@/boot/grub2/x86_64-efi  0  0 
UUID=ab51d09c-1257-45c0-938d-792fedccde55  /boot/grub2/i386-pc     btrfs  subvol=/@/boot/grub2/i386-pc  0  0 
UUID=10A2-1035                             /boot/efi               vfat   utf8                          0  2 
UUID=ab51d09c-1257-45c0-938d-792fedccde55  /.snapshots             btrfs  subvol=/@/.snapshots          0  0 
UUID=d3acdb3b-fed4-4676-bb15-dc32dfd6c835  swap                    swap   defaults                      0  0 
UUID=ab51d09c-1257-45c0-938d-792fedccde55  /var                    btrfs  subvol=/@/var                 0  0 
UUID=ab51d09c-1257-45c0-938d-792fedccde55  /usr/local              btrfs  subvol=/@/usr/local           0  0 
UUID=ab51d09c-1257-45c0-938d-792fedccde55  /tmp                    btrfs  subvol=/@/tmp                 0  0 
UUID=ab51d09c-1257-45c0-938d-792fedccde55  /srv                    btrfs  subvol=/@/srv                 0  0 
UUID=ab51d09c-1257-45c0-938d-792fedccde55  /root                   btrfs  subvol=/@/root                0  0 
UUID=ab51d09c-1257-45c0-938d-792fedccde55  /opt                    btrfs  subvol=/@/opt                 0  0 
UUID=e3a09502-9453-4a94-a88d-07c5119d13ed  /home                   ext4   data=ordered                  0  2 
192.168.169.134:/multimedia                /home/alastair/NFS_Multimedia_NFS  nfs    nfsvers=4                     0 
 0 
alastair@IBMW530:~> 

Still looks right to me.

And I know this is a bit a bewildering thread with many suggestions and you jumping from one to another, often working on them parallel. In post# 13 I suggested to test if mounting later then boot works (if I am correct, but I am not sure that I read and understand all the actions you did, on failing you did reconfigure using YaST instead of finding out what is wrong).

So again, when you log in and the NFS is not mounted, what does:

mount  /home/alastair/NFS_Multimedia_NFS

do. Did you not answer that. or did I miss at in the mess.

Hi Deano, further to my last post you can see the latency for ping from laptop:-

--- 192.168.169.134 ping statistics --- 
35 packets transmitted, 35 received, 0% packet loss, time 34049ms 
rtt min/avg/max/mdev = 2.228/3.848/13.241/1.850 ms 
alastair@IBMW530:~> 

Good call.

Maybe “still” to you, but we see this for the first time :wink:

Mounting later works and I am sorry I missed the earlier request. Mounting either from cli or yast works, it is only on booting that the NFS fails. I have posted the ping info which does rather confirm the need for a delay when using laptop at my location.

OK, you are not the first one experiencing this. Indeed during boot things are going a bit to soon/early as others suggested.

There are more people having problems with NFS mounts being to early, or being mounted at boot, but unmounted immediate. Many have solved this by using Automounting (take care, there are several cases where people call something automounting, but this is the real one). It will mount when some process needs it. And unmount after a certain time of no usage.


boven.henm.xs4all.nl:/home/wij             /home/wij  nfs   noauto,nofail,x-systemd.automount,x-systemd.mount-timeout=10,_netdev,x-systemd.idle-timeout=5min          0  0

The extra options are:

  • noauto because we refrain from mounting at boot;
  • nofail as an extra, may not be needed;
    
  • x-systemd.automount to let systemd-automount do it's work: mount when required;
    
  • x-systemd-.ount-timeout=10 time before it errors becaue of e.g. NFS server down;;
    
  • _netdev most probably not needed;
    
  • x-systemd.idle-timeout=5min after 5 minutes of no usage the fs will be unmounted (to be mounted auto at next access)
    

man systemd.automount
man systemd.mount

I hope this is clear. Do not forget to add the new options to the already existing nfs=… option, comma separated.

Hi Henk,
That seems to have addressed and solved my problem. Quite a few clues I missed along the way and thanks again for your patience and thanks to all the others who have provided help.

What also confused me was that I do not recall this earlier with NFSv3 and other operating system but I do appreciate that NFSv4 is treated differently.

My other problem I overcame by forcing the NFSv4.2 during the creation of the client on Yast, which brought up the server mounts does not explain why no mounts are shown if I try and scan for hosts. As I stated earlier I always use the IP address so scanning is not needed but either I have a problem because I do not have a local name server set up correctly or a firewall is blocking the scanning. Not a problem for today but good to know in future.

Thanks again,
Budge.