Unmount NFS filesystems before stopping network during suspend

Bug #30594 reported by Steve Kowalik
52
This bug affects 7 people
Affects Status Importance Assigned to Milestone
pm-utils (Ubuntu)
Invalid
Wishlist
Unassigned

Bug Description

I think it would be a nice feature to also unmount all NFS filesystems before the network is dropped while suspending a machine. The rationale being that NFS may or may not be available when you resume the machine, and NFS mounts not be available makes things like mount a little unhappy.

Revision history for this message
Connor Imes (ckimes) wrote :

Hi Steve,
Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue for you. Can you try with the latest Ubuntu release? Thanks in advance.

Changed in acpi-support:
status: New → Incomplete
Revision history for this message
Steve Langasek (vorlon) wrote :

Nothing has changed that would invalidate this bug report, except that acpi-support is no longer involved in suspending the system. Reassigning to pm-utils.

Changed in acpi-support:
status: Incomplete → New
Revision history for this message
Gdev (webmaster-ge-kr) wrote :

Hi Steve,

thanks for this bug report - I think this would be some good new feature.
I often use NFS and suspend, so I have these problems with mount after resume too.

Revision history for this message
Wizzu (wizzu) wrote :

This thread in the Ubuntu forums seems to be related: http://ubuntuforums.org/showthread.php?p=8596122 -- unfortunatelu no solutions (as of now).

Revision history for this message
Robert McKee (bertmanphx) wrote :

Same issue here. I suspend my machine regularly. Upon resume, my NFS shares take a long time to respond. Samba shares, and other network appear immediately, so it's not a network issue.

Boniek (boniek12p)
Changed in pm-utils (Ubuntu):
status: New → Confirmed
Revision history for this message
Chow Loong Jin (hyperair) wrote :

This could be a pretty tricky issue to solve. While there are NFS mounts that might not be there any more when you resume from suspension/hibernation, there are also NFS mounts that are too important to unmount (might bring programs or even the whole system crashing down) that would probably reestablish themselves nicely if you left everything alone, connected and all.

Either way, I'm passing this onto the NFS people to decide. If there is a hook-script to unmount all NFS shares, it should be in the nfs-common package anyway. See /usr/share/doc/pm-utils/README.distributions for more information.

Perhaps we could ship a template hook script to /etc/pm/sleep.d that is disabled by default (chmod -x) that can be enabled and modified by the user.

affects: pm-utils (Ubuntu) → nfs-utils (Ubuntu)
Revision history for this message
Steve Langasek (vorlon) wrote :

No, it shouldn't be in the nfs-common package, because the same technique should be applied to all network filesystems (e.g., CIFS) if we're going to do it.

Also, FWIW I don't think there are any "NFS people" about, I've been the only one triaging nfs-utils bugs for the last cycle. :) And my opinion is that we should have something like this, though tt needs to be constructed carefully.

affects: nfs-utils (Ubuntu) → pm-utils (Ubuntu)
Revision history for this message
Wizzu (wizzu) wrote :

I use NFS with autofs, and I'm impacted by this bug (2 minutes of waiting on resume before my NFS-mounted drive is available). Admittedly with autofs it's a bit of a different use case, but still... Sorry if the following is off-topic.

With autofs, it would actually be quite easy to unmount everything during suspend. Eg. see http://www.faqs.org/docs/Linux-mini/Automount.html#s5 . Doing it from a script/program should be done a bit differently, all automount pid files live in /var/run/autofs. And actually autofs even ships with a script to turn off automounted NFS shares during suspend (at /etc/apm/event.d/autofs) using this technique, but for some reason it doesn't seem to get called on my system AFAIK. I don't know enough about the suspend/hibernate system to diagnose why -- is it in the wrong location (ie. should it be in /etc/pm/sleep.d instead of /etc/apm/event.d?)

Revision history for this message
Chow Loong Jin (hyperair) wrote : Re: [Bug 30594] Re: Unmount NFS filesystems before stopping network during suspend

On Tuesday 12,January,2010 03:08 AM, Wizzu wrote:
> I use NFS with autofs, and I'm impacted by this bug (2 minutes of
> waiting on resume before my NFS-mounted drive is available). Admittedly
> with autofs it's a bit of a different use case, but still... Sorry if
> the following is off-topic.
>
> With autofs, it would actually be quite easy to unmount everything
> during suspend. Eg. see http://www.faqs.org/docs/Linux-
> mini/Automount.html#s5 . Doing it from a script/program should be done a
> bit differently, all automount pid files live in /var/run/autofs. And
> actually autofs even ships with a script to turn off automounted NFS
> shares during suspend (at /etc/apm/event.d/autofs) using this technique,
> but for some reason it doesn't seem to get called on my system AFAIK. I
> don't know enough about the suspend/hibernate system to diagnose why --
> is it in the wrong location (ie. should it be in /etc/pm/sleep.d instead
> of /etc/apm/event.d?)
>
Yeah, that script's targeted for apmd, but Ubuntu uses pm-utils to suspend now
so the scripts in /etc/apm/event.d are generally ignored. That script will have
to be ported to pm-utils for it to work properly.

--
Kind regards,
Chow Loong Jin (GPG: 0x8F02A411)
Ubuntu Contributing Developer

Revision history for this message
Wizzu (wizzu) wrote :

Okay, I opened a new bug against autofs. Thanks for the explanation.

"autofs suspend/hibernate script should be ported from apmd system to pm-utils"
https://bugs.launchpad.net/ubuntu/+source/autofs/+bug/506116

Revision history for this message
Ralf Barth (ubuntu-haggy) wrote :

Please see https://bugs.launchpad.net/ubuntu/+source/linux/+bug/292698 - it seems to be related. I experience the same issues and have attached a dmesg log there.

Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

Please reply if this is still an issue in a supported release.

Changed in pm-utils (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
MountainX (dave-mountain) wrote :

NFS auto-unmounting upon suspend is still important to me. I'm on 12.04
(which is still a supported release, of course).

On Thu, Mar 6, 2014 at 6:59 PM, Serge Hallyn <email address hidden>wrote:

> Please reply if this is still an issue in a supported release.
>
>
> ** Changed in: pm-utils (Ubuntu)
> Status: Confirmed => Invalid
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/30594
>
> Title:
> Unmount NFS filesystems before stopping network during suspend
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/pm-utils/+bug/30594/+subscriptions
>

Revision history for this message
Petr Helebrant (helebrant) wrote :

It's not unmounting automatically so it's and issue until the developers make some possibility to do that...

Any advice how to unmount sftp mount before suspend automatically with some script? I tried to make script for pm-utils, but it doesn't run as superuser so it's unable to unmount...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.