NFS shares does not mount after sleep.

Hi!
Maybe this post should be in networking instead, if so feel free to move it.
I have had this problem for quite a while. I installed 15.2 early because some other problems in 15.1 on my daily-driver PC. I’m pleased with 15.2 so fare except the trouble with mount the NFS-shares.

The shares is on a 15.1 “server” (192.168.0.1) and the mount is set up by the NFS-client in yast2. I have use this method for many years.

I have also tried from my notebook with 15.1 (working), 15.2 (problem as above), Tumbleweed ((problem as above). 15.2 and Tumbleweed had been updated to the latest using ‘zypper dup’ several times. The same problem(15.2, Tumbleweed) occurs when i set up a 15.2 “server” and test against. 15.1 works fine against 15.2 “server”.

No track of any NFS shares, not in terminal and the share in dolphin shows a red small square on share i left columm. In dolphin Thumbleweed click on the share to the left says: "An error occurred while accessing ‘Home’, the system responded: mount.nf: failed to prepare mount. Operation not permitted.

In dolphin on 15.2, "An error occurred while accessing ‘/home/vol2/:/home/xxx/vol2 on 192.168.0.1’, the system responded: mount: /home/xxx/vol2: operation permitted for root only.

Hmmm… ‘systemctl status home-xxx-vol2.mount’

● home-xxx-vol2.mount - /home/xxx/vol2
Loaded: loaded (/etc/fstab; generated; vendor preset: disabled)
Active: inactive (dead) since Thu 2020-06-11 11:40:25 CEST; 2h 44min ago
Where: /home/xxx/vol2
What: 192.168.0.1:/home/vol2
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Process: 3576 ExecMount=/usr/bin/mount 192.168.0.1:/home/vol2 /home/xxx/vol2 -t nfs (code=exited, status=0/SUCCESS)

Jun 11 10:51:26 xxxpc systemd[1]: Mounting /home/xxx/vol2…
Jun 11 10:51:27 xxxpc systemd[1]: Mounted /home/xxx/vol2.

Inactive (dead)?
Ok trying ‘systemctl restart home-xxx-vol2.mount’

● home-xxx-vol2.mount - /home/xxx/vol2
Loaded: loaded (/etc/fstab; generated; vendor preset: disabled)
Active: active (mounted) since Thu 2020-06-11 14:25:49 CEST; 35s ago
Where: /home/xxx/vol2
What: 192.168.0.1:/home/vol2
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Process: 23794 ExecMount=/usr/bin/mount 192.168.0.1:/home/vol2 /home/xxx/vol2 -t nfs (code=exited, status=0/SUCCESS)
Tasks: 0
CGroup: /system.slice/home-xxx-vol2.mount

Jun 11 14:25:48 xxxpc systemd[1]: Mounting /home/xxx/vol2…
Jun 11 14:25:49 xxxpc systemd[1]: Mounted /home/xxx/vol2.

Viola! Works! But…

fstab in 15.2:

UID=fad1fe6f-23ba-48f6-981f-69061ffd34ef / btrfs defaults 0 0
UUID=ebbe6230-dc02-491c-88e3-592ba56c5511 swap swap defaults 0 0
UUID=fad1fe6f-23ba-48f6-981f-69061ffd34ef /var btrfs subvol=/@/var 0 0
UUID=fad1fe6f-23ba-48f6-981f-69061ffd34ef /usr/local btrfs subvol=/@/usr/local 0 0
UUID=fad1fe6f-23ba-48f6-981f-69061ffd34ef /tmp btrfs subvol=/@/tmp 0 0
UUID=fad1fe6f-23ba-48f6-981f-69061ffd34ef /srv btrfs subvol=/@/srv 0 0
UUID=fad1fe6f-23ba-48f6-981f-69061ffd34ef /root btrfs subvol=/@/root 0 0
UUID=fad1fe6f-23ba-48f6-981f-69061ffd34ef /opt btrfs subvol=/@/opt 0 0
UUID=52ae82e3-d52b-4979-ae63-db0e04133145 /home xfs defaults 0 0
UUID=fad1fe6f-23ba-48f6-981f-69061ffd34ef /boot/grub2/x86_64-efi btrfs subvol=/@/boot/grub2/x86_64-efi 0 0
UUID=fad1fe6f-23ba-48f6-981f-69061ffd34ef /boot/grub2/i386-pc btrfs subvol=/@/boot/grub2/i386-pc 0 0
UUID=9F2D-638B /boot/efi vfat defaults 0 2
192.168.0.1:/home/wm /home/xxx/vm nfs defaults 0 0
192.168.0.1:/home/vol2 /home/xxx/vol2 nfs defaults 0 0
192.168.0.1:/home/vol1 /home/xxx/vol1 nfs defaults 0 0

fstab in Thumbleeweed:

UUID=b1f33aa7-8112-4142-b4fb-c914fe07b8ea /boot/grub2/x86_64-efi btrfs subvol=/@/boot/grub2/x86_64-efi 0 0
UUID=b1f33aa7-8112-4142-b4fb-c914fe07b8ea /boot/grub2/i386-pc btrfs subvol=/@/boot/grub2/i386-pc 0 0
UUID=e652cb78-0e7f-4f3b-8b35-164141736cc8 swap swap defaults 0 0
UUID=b1f33aa7-8112-4142-b4fb-c914fe07b8ea /.snapshots btrfs subvol=/@/.snapshots 0 0
UUID=b1f33aa7-8112-4142-b4fb-c914fe07b8ea /var btrfs subvol=/@/var 0 0
UUID=b1f33aa7-8112-4142-b4fb-c914fe07b8ea /usr/local btrfs subvol=/@/usr/local 0 0
UUID=b1f33aa7-8112-4142-b4fb-c914fe07b8ea /tmp btrfs subvol=/@/tmp 0 0
UUID=b1f33aa7-8112-4142-b4fb-c914fe07b8ea /srv btrfs subvol=/@/srv 0 0
UUID=b1f33aa7-8112-4142-b4fb-c914fe07b8ea /root btrfs subvol=/@/root 0 0
UUID=b1f33aa7-8112-4142-b4fb-c914fe07b8ea /opt btrfs subvol=/@/opt 0 0
UUID=b5750e0d-940e-4008-b442-b320a53930fd /home xfs defaults 0 0
192.168.0.1:/home /home/xxx/ss nfs defaults 0 0

fstab in 15.1:

UUID=8af195e0-cc4e-432a-80ff-771ed99514da / btrfs defaults 0 0
UUID=8af195e0-cc4e-432a-80ff-771ed99514da /var btrfs subvol=/@/var 0 0
UUID=8af195e0-cc4e-432a-80ff-771ed99514da /usr/local btrfs subvol=/@/usr/local 0 0
UUID=8af195e0-cc4e-432a-80ff-771ed99514da /tmp btrfs subvol=/@/tmp 0 0
UUID=8af195e0-cc4e-432a-80ff-771ed99514da /srv btrfs subvol=/@/srv 0 0
UUID=8af195e0-cc4e-432a-80ff-771ed99514da /root btrfs subvol=/@/root 0 0
UUID=8af195e0-cc4e-432a-80ff-771ed99514da /opt btrfs subvol=/@/opt 0 0
UUID=58bfbcca-3e67-45bf-8d7c-96bf930c531c /home ext4 data=ordered,acl,user_xattr 0 2
UUID=8af195e0-cc4e-432a-80ff-771ed99514da /boot/grub2/x86_64-efi btrfs subvol=/@/boot/grub2/x86_64-efi 0 0
UUID=8af195e0-cc4e-432a-80ff-771ed99514da /boot/grub2/i386-pc btrfs subvol=/@/boot/grub2/i386-pc 0 0
UUID=2c2f8011-97c3-45b2-88af-a910e3cc6963 swap swap defaults 0 0
192.168.0.4:/home/share /home/xxx/hpkvm nfs defaults 0 0
192.168.0.1:/home /home/xxx/ss nfs defaults 0 0

Have anyone any ideas why “home-jodot-vol2.mount” does not work/wake up after sleep in 15.2, Thumbleweed but works fine in 15.1.

EDIT! jounalctl output was after run “systemctl restart home-jodot-vol2.mount”. Sorry

Greetings!

How is the networking setup on the notebook?
Any entries in the journal?

Hi!
The network setup on my daily-driver desktop and notebook is dhcp(get ip-address, domain, gateway and dns) from my server, (this is working on 15.1) using network manager.

I did a cold start (14.51.58)of my notebook on Leap 15.2 (KDE plasma 5.18.5, KDE frameworks 5.70.0, Qt Version 5.12.7, Kernel Version 5.3.18-default).

Below Start after sleep ~49min later:

Error, see below to long journalctl text

No success, problems as in my orginal post is the same, despite ~49 minuters later:


# journalctl -u home-xxx-ss.mount 
-- Logs begin at Fri 2020-06-12 12:52:08 CEST, end at Fri 2020-06-12 14:52:02 CEST. --
Jun 12 12:52:33 localhost.localdomain systemd[1]: Mounting /home/xxx/ss...
Jun 12 12:52:34 localhost.localdomain systemd[1]: Mounted /home/xxx/ss.
localhost:/home/xxx # systemctl status home-xxx-ss.mount               
● home-xxx-ss.mount - /home/xxx/ss
   Loaded: loaded (/etc/fstab; generated; vendor preset: disabled)
   Active: inactive (dead) since Fri 2020-06-12 13:40:28 CEST; 8min ago
    Where: /home/xxx/ss
     What: 192.168.0.1:/home
     Docs: man:fstab(5)
           man:systemd-fstab-generator(8)
  Process: 1965 ExecMount=/usr/bin/mount 192.168.0.1:/home /home/xxx/ss -t nfs (code=exited, status=0/SUCCESS)

Jun 12 12:52:33 localhost.localdomain systemd[1]: Mounting /home/xxx/ss...
Jun 12 12:52:34 localhost.localdomain systemd[1]: Mounted /home/xxx/ss.

Run ‘# systemctl restart home-xxx-ss.mount’


# systemctl status home-xxx-ss.mount

● home-xxx-ss.mount - /home/xxx/ss
Loaded: loaded (/etc/fstab; generated; vendor preset: disabled)
Active: active (mounted) since Fri 2020-06-12 13:50:48 CEST; 11s ago
Where: /home/xxx/ss
What: 192.168.0.1:/home
Docs: man:fstab(5)
man:systemd-fstab-generator(8)
Process: 4062 ExecMount=/usr/bin/mount 192.168.0.1:/home /home/xxx/ss -t nfs (code=exited, status=0/SUCCESS)
Tasks: 0
CGroup: /system.slice/home-xxx-ss.mount

Jun 12 13:50:48 localhost.localdomain systemd[1]: Mounting /home/xxx/ss…
Jun 12 13:50:48 localhost.localdomain systemd[1]: Mounted /home/xxx/ss.



Checking:

journalctl -u home-xxx-ss.mount

– Logs begin at Fri 2020-06-12 12:52:08 CEST, end at Fri 2020-06-12 14:52:02 CEST. –
Jun 12 12:52:33 localhost.localdomain systemd[1]: Mounting /home/xxx/ss…
Jun 12 12:52:34 localhost.localdomain systemd[1]: Mounted /home/xxx/ss.
Jun 12 13:50:48 localhost.localdomain systemd[1]: Mounting /home/xxx/ss…
Jun 12 13:50:48 localhost.localdomain systemd[1]: Mounted /home/xxx/ss.



I have problems to attach a full journalctl from start after sleep 
(     **The following errors occurred with your submission**

     


  - The text that you have entered is too long (24702 characters). Please shorten it to 15000 characters long. 


 )


From the cold start ok and start after sleep it  doesn't mount NFS whiteout manually run 'systemctl restart home-xxx-ss.mount' as root. The is the same problem with Tumbleweed. It doesn't help to logout and log in again. I need to learn more about systemctl and journalctl. Any advice how to use journalctl and what to look after?
Greetings

That is most likely because Networkmanager starts after the user logs in on the desktop. NFS client has then tried to mount too many times. The NFS setup in itself seems correct since it does mount manually.
To change this behaviour:

  • Set the connection to be used by all users ( requires root password )
  • Set the passphrase to be stored unencrypted
    That way, the network connection will start at boot and the NFS shares will be mounted.

Upload full “journalctl -b” immediately after resume to https://susepaste.org/.

How is it relevant to suspend/resume?

You’re right, @arvidjaar.

Hi!
Finally I had some time today to test further. After zypper up on 15.2 and Tumbleweed on my notebook and a zypper dup on my desktop with 15.2 the problem is still there. However If I use wicked instead on both PC’s and in 15.2/Tumbleweed it works fine after wake up after sleep. I will check further and get back.

Greetings

Hi!
Not solved but I found a workaround when using NM, I thought that it was only me that suffering of/had this problem. Something wrong with my setup? It was working fine in Leap 15.1 - but not in 15.2/Tumbleweed on 2 different PC’s.

Today I notice https://lists.opensuse.org/opensuse/2020-07/msg00027.html and someone else has similar problems. Aha! -a bug report exists ( https://bugzilla.opensuse.org/show_bug.cgi?id=1116625 ) and in comment #32 a workaround is presented. I tested it on (new) two 15.2 and a Tumbleweed installations and its working that the NFS mounts after sleep are accessible.

*I adjusted in /etc/NetworkManager:
The dispatcher.d/nfs script should ignore x-systemd.automount entries in fstab.
e.g. change

NET_MOUNTS=$(sed -e ‘/^.#/d’ -e '/^.:/!d’ -e ‘s/ / /g’ /etc/fstab | tr -s " ")$’

by adding a clause

-e ‘/x-systemd.automount/!d’

to the sed command.

The line after adjustment:

NET_MOUNTS=$(sed -e '/^.*#/d' -e '/^.*:/!d' -e 's/	/ /g' -e 'x-systemd.automount/!d' /etc/fstab | tr -s " ")$'
'

Good, now I can plan to update (I will test a update first) my notebook to 15.2 and using NM.

Hmm… I added some information to the bug report in Bugzilla.

Greeetings