Setting up a swap partition
During the suspend process, Linux writes data to a swap partition. This data is required later to resume Linux.
Set up a swap partition that is at least the size of the available LPAR memory or the memory of the z/VM® guest virtual machine.
Do not use this swap partition for any other operating system that might run in the LPAR or z/VM guest virtual machine while the Linux instance is suspended.
You cannot suspend a Linux instance while most of the memory and most of the swap space are in use. If there is not sufficient remaining swap space to hold the data for resuming the Linux instance, suspending the Linux instance fails.
To assure sufficient swap space you might have to configure two swap partitions, one partition for regular swapping and another for suspending the Linux instance. Configure the swap partition for suspending the Linux instance with a lower priority than the regular swap partition.
Use the pri=
parameter
to specify the swap partitions in /etc/fstab with
different priorities. See the swapon man page for details.
# cat /etc/fstab
...
/dev/disk/by-path/ccw-0.0.b101-part1 swap swap pri=-1 0 0
/dev/disk/by-path/ccw-0.0.b100-part2 swap swap pri=-2 0 0
In the example, the partition to be used for the resume data is /dev/disk/by-path/ccw-0.0.b100-part2.
# cat /proc/swaps
Filename Type Size Used Priority
/dev/disk/by-path/ccw-0.0.b101-part1 partition 7212136 71056 -1
/dev/disk/by-path/ccw-0.0.b100-part2 partition 7212136 0 -2