Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
+++ This bug was initially created as a clone of Bug #575840 +++
+++ but i made description accurate +++
Description of problem:
A raid array on a encrypted lvm volume is not started automatically by rc.syslocal when there aren't any md arrays already. This is because:
# grep mdadm /etc/rc.sysinit
[ -r /proc/mdstat -a -r /dev/md/md-device-map ] && /sbin/mdadm -IRs
#
If all the md components are on crypt, /dev/md/md-device-map does not exist at this time. I think this would work if dracut had set up some md devices earlier, but in my use case it does not.
Version-Release number of selected component (if applicable):
initscripts-9.03.23-1.el6.x86_64
How reproducible:
always
Steps to Reproduce:
1. create a mdadm raid on a encrypted partition
2. don't have any other mdadm raids
Actual results:
the raid is not started after boot
Expected results:
the raid is started
Additional info:
The recommendation of doing crypt underneath md came from RH engineering.
This patch fixes the problem on my system (it's after the first init_crypto so the components are detectable):
--- rc.sysinit.el6.1 2011-07-01 10:55:39.066082994 -0400
+++ rc.sysinit 2011-07-01 10:56:02.174082979 -0400
@@ -193,6 +193,7 @@
fi
fi
+[ -f /etc/mdadm.conf -a -x /sbin/mdadm ] && /sbin/mdadm -As --auto=yes --run
# Start any MD RAID arrays that haven't been started yet
[ -r /proc/mdstat -a -r /dev/md/md-device-map ] && /sbin/mdadm -IRs
I am curious: Who in Red Hat engineering recommended encrypting raid member devices instead of encrypting the raid device itself? This configuration is discouraged to the point that it was not even supported in RHEL5.
(I emailed you off-bz.)
Crypt below seemed to be consensus when asking around, admittedly most of them didn't have the same case (laptop single disk) that I have for raid.
In the GUI, anaconda seems to let you do either.
Of course, there's more than one way to do it and I'm open to pro/con arguments as to which way to go.
I didn't do any benchmarking, but I guess it depends on where the bottleneck lies - is it better to do crypt on bottom and have 4 dmcrypt threads underneath, or above md and only have one?
As far as other combinations, I'm probably indifferent between lvm>crypt>md and crypt>lvm>md.
The latter (crypt on top) would let me use urandom to have swap unrecoverable after reboot but I don't really care about that use case. I don't really swap much anyway, so I've still got a single crypt thread for all the iops.
The former (crypt in middle) would protect lvm metadata, so nobody would know that my LV is called vg1_take_over_world_project but, oops, I posted it in bugzilla.
I'm also not using md or crypt for the root filesystem. If I were I think md-device-map would exist at sysinit time and I'd have a chance of perhaps using the config file start the array without patching sysinit.
Since RHEL 6.2 External Beta has begun, and this bug remains
unresolved, it has been rejected as it is not proposed as
exception or blocker.
Red Hat invites you to ask your support representative to
propose this request, if appropriate and relevant, in the
next release of Red Hat Enterprise Linux.
Comment 6RHEL Program Management
2013-10-14 05:16:32 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
There was no activity in the bugzilla for a long time (4 years). Since we are already in production phase 2, we should not make any changes in this area.