[dm-crypt] Need help: Device /dev/md3 is not a valid LUKS device

Lucy Brentwood elchechapeton at yahoo.com
Sun Apr 29 20:03:57 CEST 2012

Hello all,

Following an advice found in an Internet forum, I am sending this list my request for help in hope someone will be able to answer it.

I am installing Debian in a new computer (so I am pretty flexible about what I can do).

I started following a tutorial for RAID5 + DM-CRYPT + LVM2 and I now face a weird issue.

I launch the computer with the latest Debian live distribution and work on the hard drives from there.

The first steps that concern this issue are:

I partition the 4 hard drives using fsdisk, one partition with 10GB for /boot, one with 130GB for swap, and two big partitions for the operating system and for additional data. /boot is set as bootable, all as Linux Raid devices (code fd).

I create a RAID5 array with the four hard drives:

# mdadm --create /dev/md3 --level=5 --raid-devices=4 /dev/sda4 /dev/sdb4 /dev/sdc4 /dev/sdd4 

Then I format it to ext4:

# mke2fs -t ext4 /dev/md3

Then I encrypt the partition:

# KEYFILE="/media/PENDRIVE/picture.jpg"
# cryptsetup --hash sha512 --key-size 256 --cipher aes-cbc-essiv:sha256 luksFormat /dev/md3 $KEYFILE

This will overwrite data on /dev/md3 irrevocably.

Are you sure? (Type uppercase yes): YES

And then I try to open the RAID5 array:

# cryptsetup --key-file $KEYFILE luksOpen /dev/md3 md3encrypted

And I get:

Device /dev/md3 is not a valid LUKS device.

Can anyone let me know what is happening or what I did wrong?

Thank you in advance,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.saout.de/pipermail/dm-crypt/attachments/20120429/a4f94cad/attachment.html>

More information about the dm-crypt mailing list