Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 430202

Summary: sys-fs/lvm2 - /etc/init.d/dmcrypt should run before /etc/init.d/lvm (when using encrypted LVM)
Product: Gentoo Linux Reporter: Lasse Lindner <gentoo>
Component: [OLD] Core systemAssignee: Robin Johnson <robbat2>
Severity: normal CC: agk, cardoe
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
Package list:
Runtime testing required: ---

Description Lasse Lindner 2012-08-06 17:36:56 UTC
Summary should say it all - I'm running a VG with two crytped PVs, and /etc/init.d/dmcrypt is able to decrypt them, but unfortunately it's too late to get recognised by /etc/init.d/lvm which already ran before, so I need to run "vgchange -a y" manually after the dmcrypt-init-script.

I don't know much about gentoo init scripts and how this problem is best resolved, so my quick workaround was to add "lvm" to the depend-section in /etc/init.d/dmcrypt . 

Reproducible: Always

Steps to Reproduce:
1. configure /etc/conf.d/dmcrypt to decrypt LVM Physical Volumes
2. reboot

Actual Results:  
Crypted LVs are not usable at system startup

Expected Results:  
/etc/init.d/lvm runs after /etc/init.d/dmcrypt
Comment 1 Doug Goldstein (RETIRED) gentoo-dev 2012-08-07 05:39:06 UTC
This is going to always have to be a manual one because many people use encrypted LVs instead of encrypted PVs so they need dmcrypt to start after LVM.

Inside of /etc/conf.d/lvm put:


And that should make it depend on dmcrypt being started.