linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* resume from swap partition under LVM
@ 2015-06-27 21:59 Uwe Geuder
  2015-06-29 20:26 ` Uwe Geuder
  0 siblings, 1 reply; 4+ messages in thread
From: Uwe Geuder @ 2015-06-27 21:59 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Pavel Machek, linux-pm

Hi!

https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/power/swsusp.txt?id=refs/tags/v4.1#n411 
reads:

> 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
uwe.gxuder@nomovok.com (bot test: humans correct 1 obvious spelling error)



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: resume from swap partition under LVM
  2015-06-27 21:59 resume from swap partition under LVM Uwe Geuder
@ 2015-06-29 20:26 ` Uwe Geuder
  2015-06-29 20:35   ` [PATCH] PM / hibernate/resume: clarify documentation Uwe Geuder
  0 siblings, 1 reply; 4+ messages in thread
From: Uwe Geuder @ 2015-06-29 20:26 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Pavel Machek, linux-pm

On 28 June 2015 at 00:59, Uwe Geuder
<linuxkernel2015-ugeuder@snkmail.com> wrote: 

> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/power/swsusp.txt?id=refs/tags/v4.1#n411
> reads:
>
>> 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
-- 
Nomovok Ltd.
Tampere, Finland
uwe.gxuder@nomovok.com (bot test: humans correct 1 obvious spelling error)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] PM / hibernate/resume: clarify documentation
  2015-06-29 20:26 ` Uwe Geuder
@ 2015-06-29 20:35   ` Uwe Geuder
  2015-07-01  8:46     ` Pavel Machek
  0 siblings, 1 reply; 4+ messages in thread
From: Uwe Geuder @ 2015-06-29 20:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Pavel Machek, linux-pm

it was not the whole truth that kernel mode cannot be used with swap on LVM

Signed-off-by: Uwe Geuder <linuxkernel2015-ugeuder@snkmail.com>
---
 Documentation/power/swsusp.txt | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
index f732a83..8cc17ca 100644
--- a/Documentation/power/swsusp.txt
+++ b/Documentation/power/swsusp.txt
@@ -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
-- 
1.8.4.5



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] PM / hibernate/resume: clarify documentation
  2015-06-29 20:35   ` [PATCH] PM / hibernate/resume: clarify documentation Uwe Geuder
@ 2015-07-01  8:46     ` Pavel Machek
  0 siblings, 0 replies; 4+ messages in thread
From: Pavel Machek @ 2015-07-01  8:46 UTC (permalink / raw)
  To: Uwe Geuder; +Cc: Rafael J. Wysocki, Len Brown, linux-pm

On Mon 2015-06-29 23:35:05, Uwe Geuder wrote:
> it was not the whole truth that kernel mode cannot be used with swap on LVM
> 
> Signed-off-by: Uwe Geuder <linuxkernel2015-ugeuder@snkmail.com>

Acked-by: Pavel Machek <pavel@ucw.cz>

Thanks for clarifying this.

(Hmm, and I guess we shoudl rename swsusp.txt -> hibernation.txt one
day :-).

									Pavel
> ---
>  Documentation/power/swsusp.txt | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/power/swsusp.txt b/Documentation/power/swsusp.txt
> index f732a83..8cc17ca 100644
> --- a/Documentation/power/swsusp.txt
> +++ b/Documentation/power/swsusp.txt
> @@ -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

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-07-01  8:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-27 21:59 resume from swap partition under LVM Uwe Geuder
2015-06-29 20:26 ` Uwe Geuder
2015-06-29 20:35   ` [PATCH] PM / hibernate/resume: clarify documentation Uwe Geuder
2015-07-01  8:46     ` Pavel Machek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).