Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#23889 - [initscripts] rc.shutdown should recognize LVM upon LUKS option.

Attached to Project: Arch Linux
Opened by b4283 (b4283) - Friday, 22 April 2011, 15:38 GMT
Last edited by Tom Gundersen (tomegun) - Saturday, 18 June 2011, 23:52 GMT
Task Type Bug Report
Category Arch Projects
Status Closed
Assigned To Tom Gundersen (tomegun)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
See rc.sysinit of latest initscripts has the following:
Line 215 # Maybe someone has LVM on an encrypted block device
means that rc.sysinit has already considered the possibility of LVM on LUKS option,
but this feature is not complete because rc.shutdown doesn't recognize this setup since
LUKS drives are deactivated before LVM volumes are unmounted in rc.shutdown.

Maybe you could get use of the command "vgdisplay -As", where -A means LVM volumes that is
still active, and -s means short instaed of detailed message.

Additional info:
* package version(s)
initscripts 2011.04.1-1

* config and/or log files etc.

Steps to reproduce:
This task depends upon

Closed by  Tom Gundersen (tomegun)
Saturday, 18 June 2011, 23:52 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Reopen against mkinitcpio.
Comment by Tom Gundersen (tomegun) - Thursday, 28 April 2011, 13:20 GMT
Yes, we should definitely do this. It's on my TODO, but patches are welcome!
Comment by b4283 (b4283) - Friday, 29 April 2011, 14:03 GMT
Hi, I added just few lines to the script.
It's should be a harmless move to do an extra vgchange.
Comment by Tom Gundersen (tomegun) - Friday, 29 April 2011, 19:48 GMT
Looks good! Could you post a git patch to <arch-projects@archlinux.org>? That way we get to keep the authorship information.
Comment by voltaic (voltaic) - Tuesday, 14 June 2011, 18:19 GMT
I see a failure during shutdown with LVM on top of a dm-crypt partition. The problem is with the do_lock() function called on line 78. I am using initscripts 2011.06.4-1.

My root parition and my swap are encrypted. Upon shutdown initiation, swap is deactivated successfully, but my root partition fails (line 75). I am not familiar with cryptsetup or the helper functions in /etc/rc.d/functions, so I was not able to debug this problem.

If you can offer some direction, I will try to figure out where the source of the problem is. Thank you.
Comment by b4283 (b4283) - Thursday, 16 June 2011, 10:45 GMT
It's possible because you set your root on such a partition,
it won't be able to lock(close) the root because it's still in use (the rc.* scripts are in it).

A possible solution is that you use a irrevelant small partition as /etc
Comment by voltaic (voltaic) - Thursday, 16 June 2011, 13:23 GMT
Yes, the root partition is a LUKS volume and there is LVM on top of that.

Is this bad for my root file system? It sounds like the encrypted root is not getting unmounted.

If I had a separate encrypted /etc partition, then I would have the same problem. From your suggestion I gather that /etc has to be unencrypted. But the wiki makes it sound like users should be able to encrypt their entire root parition without any ill consequences.

Maybe I need to copy /etc to a ramfs (encrypted with a random key) and mount that temporary partition before calling rc.shutdown. Does this sound like a good solution or is there something simpler? How do other distributions encrypt root?
Comment by Tom Gundersen (tomegun) - Saturday, 18 June 2011, 23:51 GMT
Sorry for not getting to this earlier: initscripts will not do anything with the root partition. If you have problems with encrypted root, you need to file a bug against mkinitcpio. I'll close this, as the reopened bug seems independent of the original bug.

Loading...