You are not logged in.

#1 2014-10-09 18:22:15

Markus.N2
Member
From: Germany
Registered: 2013-08-22
Posts: 99

dm-crypt (Luks) on top of mdraid is not opened at boot

Hi,

I just encrypted my raid device. Everything seemed fine until reboot. Then, the device was not opened. Already having two encrypted devices, I did not expect any problems with this third one.
When I manually luksOpen the device /dev/md0p1, everything is there again until reboot.

This is my HOOKS configuration from /etc/mkinitcpio.conf:

HOOKS="base udev autodetect modconf block keyboard keymap mdadm encrypt_all lvm2 resume filesystems fsck"

where encrypt_all is a modified version of the original encrypt hook that handles all of my encrypted devices in one hook. And it works for the other two cryptdevices (one of them is the root filesystem).

I modified it again and added

ls -l ${cryptdevice}

and I got the error message that that /dev/md0p1 does not exist.

I think that's strange, because I added the mdadm hook before the encrypt_all hook and AFAIK, they are processed in the same order as they are configured. And the raid parts are partitions on physical harddisks, no layer in between, so no dependencies (other than block).

Any ideas what I could have done wrong ?

Thanks and Regards,
Markus

Offline

#2 2014-10-15 22:33:14

branch
Member
Registered: 2014-03-16
Posts: 209

Re: dm-crypt (Luks) on top of mdraid is not opened at boot

Have you tried using the mdadm_udev hook instead of mdadm?

Offline

#3 2014-10-16 04:02:57

bch24
Member
Registered: 2011-11-20
Posts: 27

Re: dm-crypt (Luks) on top of mdraid is not opened at boot

What is in your /etc/mdadm.conf and /etc/crypttab?

I have this working with no problem.

Non-root filesystems need to be listed in /etc/crypttab if you want them to be mounted on boot.

Offline

Board footer

Powered by FluxBB