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

Thread: After resume from suspend NFS is no longer mounted

  1. #1

    Default After resume from suspend NFS is no longer mounted

    Recently after I suspend my Tumbleweed machine and then resume from suspend, my NAS NFS is no longer mounted. Here is the fstab entry:
    DiskStation:/volume1 /mnt/DiskStation nfs defaults 0 0

    When I issue the mount command, the only difference between the output of pre-suspend and post-resume is this one line:
    DiskStation:/volume1 on /mnt/DiskStation type nfs4 (rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.1.43,local_lock=none,addr=192.168.1.112)

    'sudo mount -a' fixes the issue.

    Where can I look for clues as to what is happening? I have done a 'zypper dup' and am at the 2018-12-05 release.


    Thanks.


  2. #2

    Default Re: After resume from suspend NFS is no longer mounted

    As I searched for answers on what might be going wrong, I came across advice given to somebody with a similar issue, and that was to use autofs.
    Looking into autofs here is what my /etc/auto.master looks like:
    Code:
    /mnt    /etc/auto.nfs   --timeout=600   --ghost
    +auto.master
    And here is what the /etc/auto.nfs looks like:
    Code:
    DiskStation  -fstype=nfs,rw,nosuid,soft  DiskStation:/volume1


    I followed the edits with
    Code:
    sudo systemctl restart autofs

    Initially that worked, but the issue is that after a suspend/resume the nfs directories do not get mounted until I issue another
    restart autofs command.

    Does that shed any more light on what might be going on?


  3. #3
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    19,447
    Blog Entries
    1

    Default Re: After resume from suspend NFS is no longer mounted

    Just trying to get a better handle on this. Following a resume, open a terminal and do the following...
    Code:
    cd /mnt/DiskStation;ls
    Does the remote share show up?
    openSUSE Leap 15.0; KDE Plasma 5

  4. #4
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    19,447
    Blog Entries
    1

    Default Re: After resume from suspend NFS is no longer mounted

    Another important point that I wanted to make here is to ensure that your network filesystems are unmounted before you suspend the client machine. If you suspend while a network filesystem is still mounted and then resume when the remote system isn't reachable (eg network connectivity not up yet), then you will encounter issues like you describe.
    Last edited by deano_ferrari; 18-Dec-2018 at 16:03.
    openSUSE Leap 15.0; KDE Plasma 5

  5. #5

    Default Re: After resume from suspend NFS is no longer mounted

    Hi deano_ferrari. Thanks for the reply. 'cd /mnt/DiskStation;ls' after a suspend and resume does not list anything. After a mount command though, the same 'cd /mnt/DiskStation;ls' shows the proper directories.

    This is a NAS and always available (unless something has changed). And this is not a new installation. I've been running openSUSE (Leap and Tumbleweed) with this exact combination for many years. This development with the mounts not showing up is new though. I had never had to unmount before suspend and remount after resume prior to this.

    Thinking about what you said about "s
    uspend while a network filesystem is still mounted and then resume when the remote system isn't reachable (eg network connectivity not up yet)" makes me wonder though if some timing has changed in the process of network coming up on the client.

    I got some advice about switching to systemd automount. I'll see if that makes a difference.

    Thanks again.

  6. #6
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    19,447
    Blog Entries
    1

    Default Re: After resume from suspend NFS is no longer mounted

    Quote Originally Posted by payamf View Post
    Hi deano_ferrari. Thanks for the reply. 'cd /mnt/DiskStation;ls' after a suspend and resume does not list anything. After a mount command though, the same 'cd /mnt/DiskStation;ls' shows the proper directories.

    This is a NAS and always available (unless something has changed). And this is not a new installation. I've been running openSUSE (Leap and Tumbleweed) with this exact combination for many years. This development with the mounts not showing up is new though. I had never had to unmount before suspend and remount after resume prior to this.

    I would look at shortening the timeout value so that the network share is unmounted after a lesser period of inactivity, and so more likely unmounted before a suspend is invoked. You may find 120 seconds is probably more than sufficient for your needs.
    openSUSE Leap 15.0; KDE Plasma 5

  7. #7
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    19,447
    Blog Entries
    1

    Default Re: After resume from suspend NFS is no longer mounted

    Quote Originally Posted by payamf View Post
    I got some advice about switching to systemd automount. I'll see if that makes a difference.

    Thanks again.
    Yes, that is now the preferred method for an OS employing systemd.

    https://www.freedesktop.org/software...automount.html
    openSUSE Leap 15.0; KDE Plasma 5

  8. #8

    Default Re: After resume from suspend NFS is no longer mounted

    Following Per Jessen's suggestion for using systemd automount worked perfectly. As soon as I hit the power button to come out of suspend, I could hear the NAS disk start to spin up and the directories were mounted as expected.

    My fstab entry now looks like this
    Code:
    DiskStation:/volume1  /mnt/DiskStation  nfs  x-systemd.automount,x-systemd.idle-timeout=300,_netdev 0 0
    
    I might shorten that to 120 seconds if I see any further issues

  9. #9
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    19,447
    Blog Entries
    1

    Default Re: After resume from suspend NFS is no longer mounted

    Good to read of your success with using systemd.automount. Thanks for the update.
    openSUSE Leap 15.0; KDE Plasma 5

  10. #10

    Default Re: After resume from suspend NFS is no longer mounted

    Well, unfortunately that did not last long. Basically, after a reboot, things behave as expected, but after 2 or more suspend/resumes, the NFS no longer mounts automatically after the resume.
    Looking at the /var/log/messages I came across this:
    Code:
    Failing Case
    2018-12-24T08:38:20.981130-08:00 OptiPlex9020 systemd[1]: Started Network Manager Script Dispatcher Service.
    2018-12-24T08:38:20.983929-08:00 OptiPlex9020 chronyd[1068]: Forward time jump detected!
    2018-12-24T08:38:20.983989-08:00 OptiPlex9020 chronyd[1068]: Can't synchronise: no selectable sources
    2018-12-24T08:38:20.984021-08:00 OptiPlex9020 chronyd[1068]: Source 45.127.112.2 offline
    2018-12-24T08:38:20.984049-08:00 OptiPlex9020 chronyd[1068]: Source 74.82.59.150 offline
    2018-12-24T08:38:20.984077-08:00 OptiPlex9020 chronyd[1068]: Source 204.11.201.12 offline
    2018-12-24T08:38:20.984104-08:00 OptiPlex9020 chronyd[1068]: Source 173.51.147.14 offline
    2018-12-24T08:38:21.203889-08:00 OptiPlex9020 kernel: [31589.504434] IPv6: ADDRCONF(NETDEV_UP): em1: link is not ready
    2018-12-24T08:38:21.218507-08:00 OptiPlex9020 systemd[1]: mnt-DiskStation.automount: Got invalid poll event 16 on pipe (fd=67)
    2018-12-24T08:38:21.218583-08:00 OptiPlex9020 systemd[1]: mnt-DiskStation.automount: Failed with result 'resources'.
    2018-12-24T08:38:21.228127-08:00 OptiPlex9020 dbus-daemon[1029]: [system] Successfully activated service 'org.freedesktop.PackageKit'
    Those two BOLDED lines are not present in the messages file when NFS does automatically get mounted:
    Code:
    Passing Case
    2018-12-22T11:31:31.127923-08:00 OptiPlex9020 systemd[1]: Started Network Manager Script Dispatcher Service.
    2018-12-22T11:31:31.131072-08:00 OptiPlex9020 chronyd[1097]: Forward time jump detected!
    2018-12-22T11:31:31.131147-08:00 OptiPlex9020 chronyd[1097]: Can't synchronise: no selectable sources
    2018-12-22T11:31:31.131197-08:00 OptiPlex9020 chronyd[1097]: Source 173.230.144.109 offline
    2018-12-22T11:31:31.131254-08:00 OptiPlex9020 chronyd[1097]: Source 199.102.46.79 offline
    2018-12-22T11:31:31.131309-08:00 OptiPlex9020 chronyd[1097]: Source 208.75.89.4 offline
    2018-12-22T11:31:31.131362-08:00 OptiPlex9020 chronyd[1097]: Source 199.102.46.76 offline
    2018-12-22T11:31:31.345628-08:00 OptiPlex9020 kernel: [ 7288.679520] IPv6: ADDRCONF(NETDEV_UP): em1: link is not ready
    2018-12-22T11:31:31.379229-08:00 OptiPlex9020 dbus-daemon[1007]: [system] Successfully activated service 'org.freedesktop.PackageKit'
    Are there any clues there?

Page 1 of 2 12 LastLast

Posting Permissions

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