[Pkg-cryptsetup-devel] Bug#409875: cannot setup device-mapper mapping ontop of /dev/md* device

David Härdeman david at hardeman.nu
Thu Feb 8 23:43:33 CET 2007


On Thu, Feb 08, 2007 at 10:51:50PM +0100, Johannes Schlumberger wrote:
>I built the packages and installed them.
>The attached file contains the generated stderr stream (which looks a bit
>strange to me). Just to make shure, here is also the output generated from the
>command without the redirection.

The stderr stream is fine. When you run it without redirection, bash 
will helpfully mask the null characters that are printed (which is not 
done when they are redirected to a file).

However, everything looks ok after studying that file, the first two 
ioctl's are executed (i.e. the device-mapper version is checked and the 
"root" mapping name is reserved).

Then when it is time to pass the actual parameters for the mapping using 
the "reload" ioctl, everything goes south. I'm quickly running out of 
ideas what might cause this or what the best way to debug it would be.

So I'm CC:ing this mail to some different people with the hope that 
someone other than me can spot the error.

Quoting from previous mails:
> [04:11:35][root at asso:/home/spjsschl]# cryptsetup -c aes -s 256 -d /dev/stdin
> create root /dev/md0 < /key
> Command failed: device-mapper: reload ioctl failed: Invalid argument
> 
> [04:12:57][root at asso:/home/spjsschl]# dmesg | tail -n 3
> device-mapper: table: 253:2: crypt: Device lookup failed
> device-mapper: ioctl: error adding target to table
> device-mapper: ioctl: device doesn't appear to be in the dev hash table.
> 
> [22:28:31][root at asso:/tmp]# echo '0 10000 crypt aes-cbc-essiv:sha256 \
> 0123456789abcdef0123456789abcdef 0 /dev/md0 0' > map
> [22:28:46][root at asso:/tmp]# dmsetup create root map
> device-mapper: reload ioctl failed: Invalid argument Command failed

Executive summary:
dmsetup / cryptsetup both fail to create a mapping on top of a raid 
device (/dev/md0 in this case).

For much more details, see the bug report, any help appreciated:
http://bugs.debian.org/409875

-- 
David Härdeman




More information about the Pkg-cryptsetup-devel mailing list