Hello,
I have multiple swap partitions on different physical hard disks. Searching on the Internet showed no way to configure suspend to disk / resume in this case.
Finally I had to assemble my swaps into a RAID0 and use its UUID in the initrd. However, the init script in initrd needs a bit of change:
Code:
--- initrd-tree/init 2013-06-22 07:27:43.000000000 +0200
+++ initrd-tree.new/init 2013-10-02 12:28:22.042119407 +0200
@@ -282,6 +282,10 @@
fi
# Resume state from swap
+ if echo $RESUMEDEV | grep -q "LABEL=" || \
+ echo $RESUMEDEV | grep -q "UUID=" ; then
+ RESUMEDEV=$(findfs $RESUMEDEV)
+ fi
if [ "$RESUMEDEV" != "" ]; then
if ls -l $RESUMEDEV | grep -q "^l" ; then
#RESUMEDEV=$(ls -l $RESUMEDEV | awk '{ print $NF }')
I have heard that running a swap on RAID0 is unwise. So I want to know is the way I set s2d up stupid? Is there a better way to do that?
BTW, My device names for swap may change sometimes. Sometimes they are sdaX and sdbY but sometimes they are sdbX and sdcY. So even without RAID, I have to use UUIDs for them.