On Sat, Nov 15, 2008 at 05:25:19PM +0100, Michael Biebl wrote: > Florian Lohoff wrote: > > Package: pm-utils > > Version: 1.1.2.4-1 > > Severity: wishlist > > > > Hi, > > please provide a sleep scriptlet to unmount network filesystems. I am > > currently using this basically copied from /etc/init.d/umountnfs.sh > > which does more than needed (unmounting sysfs etc) ... This needs to > > be done before network manager is instructed to shut down networking > > e.g. i used priority 07 ... > > Why is it necessary to unmount the network filesystems and shouldn't > they mounted on resume again.
Because typically your network filesystems will not be there after resume. At least thats my typical use case - suspending at home - going to work - resuming - then your serves will not be there and all desktop file managers will hang because of the long timeouts to retry to establish the connection again. TCP based filesystems will even timeout on the server as the tcp connection endpoint is gone and your tcp session will timeout - So you come back and try to regain connectivity on a tcp session the server does not know about anymore. The only sane state is to unmount all network based filesystems on suspend. mounting on resume might be done based on the ones in the fstab. Typically i have all temporary available network filesystems in the fstab as noauto,user so i mount them manually if i need them. Doing a mount -a -t nfs|cifs|smbfs|nfs4 on resume should be okay. If they are in the fstab to be automatically mounted thats what the user wanted to do ... Anyway - unmounting network based storage is what hibernate does and it even goes further by killing programs which have open files on the storage. I would go that far without user really wanting to do that. A sane way could be to refuse suspend if there are open files on the network storage as the state could get severly garbled if suspending with potentially dirty cache content or even resuming with some expectation about the files state (which might have changed in the last hours while we were suspended) so you could garble servers files on resume because somebody else already appended to the file etc I have no clue about dealing with nbd, iscsi, ataoe or all the network based block devices. Those should go away too but thats beyond the scope of this wishlist bug. Flo -- Florian Lohoff [EMAIL PROTECTED] +49-171-2280134 Those who would give up a little freedom to get a little security shall soon have neither - Benjamin Franklin
signature.asc
Description: Digital signature