# hibernate with swsusp and sofware RAID 0 swap partition

## mgoppelt

Hi there!

Anyone out there who uses swsusp (sysfs-disk) with a software RAID 0 swap partition?

It will not work on my system. When I hibernate the system seems to suspend, but it doesn't resume. The system seems to start up like it hadn't been suspended.

I made the swap partition RAID 0 to double the performance. At least I hope that I get twice the performance.

----------

## Hu

I doubt it will help performance much when running normally, and there is not usually that much to write to disk when sleeping.  I suggest you make this work without RAID, then think about whether you need swap on RAID.

How do you order the resume kernel to resume the hibernated image?

----------

## mgoppelt

It works without RAID. I use sda8 as "default resume partition".

There is another way for striped swapping:

/dev/sda8               swap            swap            defaults,pri=1  0 0

/dev/sdb8               swap            swap            defaults,pri=1  0 0

(Data is written across the two partitions)

The steps for suspending and resuming are done by this:

sys-power/hibernate-script

I think it handles the whole process.

----------

## Hu

The hibernate script handles entering hibernation.  It is the responsibility of your initrd to resume from hibernation.  For very simple setups, such as hibernating to a single unencrypted non-LVM swap device, setting the default resume partition may be sufficient.  For anything else, you need the initrd to prepare the swap device, then trigger resume.

----------

