Bug 607646 - Hibernation does not resume correctly with encrypted disk
Hibernation does not resume correctly with encrypted disk
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: anaconda (Show other bugs)
6.0
All Linux
high Severity high
: rc
: ---
Assigned To: David Cantrell
Release Test Team
: Regression
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-06-24 10:07 EDT by Eduard Benes
Modified: 2013-01-10 03:09 EST (History)
4 users (show)

See Also:
Fixed In Version: anaconda-13.21.55-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-11-10 14:49:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
pm-utils-bugreport-info.sh output (7.33 KB, text/plain)
2010-06-24 10:07 EDT, Eduard Benes
no flags Details

  None (edit)
Description Eduard Benes 2010-06-24 10:07:23 EDT
Created attachment 426586 [details]
pm-utils-bugreport-info.sh output

Description of problem:
Hibernation of a system does not work properly with encrypted disk on my laptop (Lenovo T60). The system does not resume into a state left before the hibernation. Result is a normal (re)boot.

plymouth-log-viewer shows:
<snip>
Enabling /etc/fstab swaps:  swapon: /dev/mapper/vg_godot-lv_swap: software suspend data detected. Rewriting the swap signature.
	[  OK  ]
</snip>

Version-Release number of selected component (if applicable):
kernel-2.6.32-30.el6.x86_64
pm-utils-1.2.5-7.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Run pm-hibernate, or click System -> Shut Down -> Hibernate
2. Once the system goes to power-off, resume it ...
  
Actual results:
System does not resume, result is a "fresh boot".

Expected results:
Correct resume into a state before hibernation.

Additional info:
No AVC denials found. Suspend works just fine.
Comment 1 RHEL Product and Program Management 2010-06-24 10:13:08 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux major release.  Product Management has requested further
review of this request by Red Hat Engineering, for potential inclusion in a Red
Hat Enterprise Linux Major release.  This request is not yet committed for
inclusion.
Comment 2 Matthew Garrett 2010-06-24 10:34:04 EDT
Looks like a dracut issue. The kernel's never being told to resume - dracut needs to do that after the encrypted vg has been unlocked.
Comment 3 Harald Hoyer 2010-06-24 10:56:08 EDT
add "resume=/dev/mapper/vg_godot-lv_swap rd_LVM_LV=vg_godot-lv_swap" to the kernel command line. Anaconda will do this in the bugfixed version.
Comment 4 Chris Lumens 2010-06-24 11:24:33 EDT
And how, exactly, should anaconda know when to write resume= and when not to?  Do we just do it on all systems?  What happens if it's a dual boot system and the swap is shared among several OSes?  What if there's multiple swap partitions?  What if the swap isn't big enough?
Comment 5 Eduard Benes 2010-06-25 03:53:34 EDT
(In reply to comment #3)
> add "resume=/dev/mapper/vg_godot-lv_swap rd_LVM_LV=vg_godot-lv_swap" to the
> kernel command line. Anaconda will do this in the bugfixed version.    

This doesnt' work in my case:

# grep resume /boot/grub/grub.conf 
    kernel /vmlinuz-2.6.32-30.el6.x86_64 root=/dev/mapper/vg_godot-lv_root ro rd_LUKS_UUID=luks-ab3924cc-4c70-412f-ad72-d03ad79ed634 rd_LVM_LV=vg_godot/lv_root rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=auto rhgb quiet resume=/dev/mapper/vg_godot-lv_swap rd_LVM_LV=vg_godot-lv_swap

I get a message saying "No root device found" after the encrypted vg has been unlocked.

$ rpm -q anaconda kernel dracut
anaconda-13.21.48-1.el6.x86_64
kernel-2.6.32-30.el6.x86_64
dracut-004-19.el6.noarch

$ ls -laZ /dev/mapper/vg_godot-lv_swap
lrwxrwxrwx. root root system_u:object_r:device_t:s0    /dev/mapper/vg_godot-lv_swap -> ../dm-2

Will to try only with the "rd_LVM_LV" as suggested in bug 588351[1].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=588351#c10
Comment 6 Eduard Benes 2010-06-25 04:02:40 EDT
The hibernation works as expected with "rd_LVM_LV=vg_godot/lv_swap" (without the resume=...).
Comment 7 Harald Hoyer 2010-06-25 05:01:17 EDT
(In reply to comment #4)
> And how, exactly, should anaconda know when to write resume= and when not to? 
> Do we just do it on all systems?  What happens if it's a dual boot system and
> the swap is shared among several OSes?  What if there's multiple swap
> partitions?  What if the swap isn't big enough?    

ok, sry, the rd_LVM_LV for swap partitions is enough.
Comment 9 Alexander Todorov 2010-07-05 06:39:40 EDT
Moving to VERIFIED as per comment #6
Comment 10 releng-rhel@redhat.com 2010-11-10 14:49:05 EST
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.

Note You need to log in before you can comment on or make changes to this bug.