resume from swap partition under LVM
Hi!
Quoted 4 lines
Q: Can I suspend-to-disk using a swap partition under LVM?
A: No. You can suspend successfully, but you'll not be able to resume. uswsusp should be able to work with LVM. See suspend.sf.net.
Is that information still up to date?
It works for me most times, just occasional crashes during resume.
Regards,
Uwe Geuder
--
Nomovok Ltd.
Tampere, Finland
[email protected] (bot test: humans correct 1 obvious spelling error)
Quoted 9 lines · Uwe Geuder
Quoted 4 lines
Q: Can I suspend-to-disk using a swap partition under LVM?
A: No. You can suspend successfully, but you'll not be able to resume. uswsusp should be able to work with LVM. See suspend.sf.net.
Is that information still up to date?
I guess I can reply myself. The "No" answer probably refers to the kernel resuming itself just with the help of the command line parameters. Of course that is not possible. I did not even think about that possibility, because I have used LUKS encrypted disks longer than hibernate/resume...
What I meant is
echo -n "$major:$minor" > /sys/power/resume
I guess that should work just fine with LVM, shouldn't it.
I'll send a patch to clarify the answer in the FAQ.
Regards,
Uwe Geuder
Signature · 3 lines
Nomovok Ltd. Tampere, Finland [email protected] (bot test: humans correct 1 obvious spelling error)
PATCH 1/1 PM / hibernate/resume: clarify documentation
it was not the whole truth that kernel mode cannot be used with swap on LVM
--- Documentation/power/swsusp.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
Documentation/power/swsusp.txt +11 -2
@@ -410,8 +410,17 @@ Documentation/usb/persist.txt. Q: Can I suspend-to-disk using a swap partition under LVM? -A: No. You can suspend successfully, but you'll not be able to -resume. uswsusp should be able to work with LVM. See suspend.sf.net. +A: Yes and No. You can suspend successfully, but the kernel will not be able +to resume on its own. You need an initramfs that can recognize the resume +situation, activate the logical volume containing the swap volume (but not +touch any filesystems!), and eventually call + +echo -n "$major:$minor" > /sys/power/resume + +where $major and $minor are the respective major and minor device numbers of +the swap volume. + +uswsusp works with LVM, too. See http://suspend.sourceforge.net/ Q: I upgraded the kernel from 2.6.15 to 2.6.16. Both kernels were compiled with the similar configuration files. Anyway I found that
Signature · 1 line
1.8.4.5
Re: [PATCH] PM / hibernate/resume: clarify documentation
Quoted 3 lines · Uwe Geuder
it was not the whole truth that kernel mode cannot be used with swap on LVM
Signed-off-by Uwe Geuder <[email protected]>
Thanks for clarifying this.
(Hmm, and I guess we shoudl rename swsusp.txt -> hibernation.txt one day :-).
Pavel
Quoted 28 lines
--- Documentation/power/swsusp.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)Documentation/power/swsusp.txt +11
-2@@ -410,8 +410,17 @@ Documentation/usb/persist.txt. Q: Can I suspend-to-disk using a swap partition under LVM? -A: No. You can suspend successfully, but you'll not be able to -resume. uswsusp should be able to work with LVM. See suspend.sf.net. +A: Yes and No. You can suspend successfully, but the kernel will not be able +to resume on its own. You need an initramfs that can recognize the resume +situation, activate the logical volume containing the swap volume (but not +touch any filesystems!), and eventually call + +echo -n "$major:$minor" > /sys/power/resume + +where $major and $minor are the respective major and minor device numbers of +the swap volume. + +uswsusp works with LVM, too. See http://suspend.sourceforge.net/ Q: I upgraded the kernel from 2.6.15 to 2.6.16. Both kernels were compiled with the similar configuration files. Anyway I found that
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html