Suspend/hibernate

From Arnout Engelen

Jump to: navigation, search

Contents

[edit] A mounted FS on an USB disk

Normally, an USB disk will not survive suspending/resuming. This means the disk needs to be unmounted before hibernating, which means any applications using it must be closed. That is annoying.

However, 'network filesystems' like samba/cifs shares can be mounted, and those do survive reboots of the fileserver. Thus, I decided to 'serve' my USB disk to the local host. When going into hibernate, I'm doing the following:

  • shutdown samba server
  • unmount disk
  • hibernate
  • mount disk
  • start samba server
  • resume working as normal.

[edit] How to do it

  • To have the samba server started/stopped, I added it to the MODULES in /etc/defaults/acpi-support
  • To unmount the disk when suspending, I added a '67-usbdisk.sh' to my /etc/acpi/suspend.d
  • To mount the disk when resuming, I added a '95-usbdisk.sh' to my /etc/acpi/resume.d

That's all there was to it!

[edit] Other solutions

[edit] lowlevel

A lower-level solution might be http://lwn.net/Articles/198333/

[edit] Coda

I also considered using Coda as a filesystem, but for a 40g disk it'd require a 1.6g rvm metadata file - and 1.6g of memory! that's way too much for my purposes.

[edit] Root fs on the usb disk

Suspend/hibernate to disk doesn't work when the root fs is on the usb disk.

Personal tools