Bug#409875: cannot setup device-mapper mapping ontop of /dev/md* device

2007-02-09 Thread David Härdeman
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 as I'm out
of ideas on how to diagnose the error:

http://bugs.debian.org/409875

-- 
David Härdeman




-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#409875: cannot setup device-mapper mapping ontop of /dev/md* device

2007-02-09 Thread Loïc Minier
On Thu, Feb 08, 2007, David Härdeman wrote:
 dmsetup / cryptsetup both fail to create a mapping on top of a raid 
 device (/dev/md0 in this case).

 I don't know where the error lies, but I created two loop devices loop0
 and loop1, added them to a new RAID 1 md0 device, and ran cryptsetup on
 the resulting md0 successfully.

 bee:~# dmsetup  ls
 ...
 crypt0  (253, 6)

 bee:~# dmsetup table crypt0
 0 65408 crypt aes-cbc-plain
 42cfa211018ea492fdee45ac637b7972a0ad687380f9a6d0484900ad8cca2d8f 0 9:0
 0

 bee:~# mdadm --detail /dev/md0
 ...
Number   Major   Minor   RaidDevice State
   0   700  active sync   /dev/loop0
   1   711  active sync   /dev/loop1

-- 
Loïc Minier [EMAIL PROTECTED]



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

2007-02-09 Thread David Härdeman
On Fri, February 9, 2007 11:45, Loic Minier said:
 On Thu, Feb 08, 2007, David Härdeman wrote:
 dmsetup / cryptsetup both fail to create a mapping on top of a raid
 device (/dev/md0 in this case).

  I don't know where the error lies, but I created two loop devices loop0
  and loop1, added them to a new RAID 1 md0 device, and ran cryptsetup on
  the resulting md0 successfully.

Ditto. I've succesfully setup a crypto mapping on a raid1 device under
qemu, which leads me to believe that it is something specific to Johannes
setup.

So I'm hoping that someone will come up with some suggestions on how to
troubleshoot it further on his machine.

(This is my last cross-post on this subject, I promise, please keep
further discussions to the bug report address only -
[EMAIL PROTECTED])

-- 
David Härdeman



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2007-02-09 Thread Johannes Schlumberger
Hi,

   I don't know where the error lies, but I created two loop devices loop0
   and loop1, added them to a new RAID 1 md0 device, and ran cryptsetup on
   the resulting md0 successfully.
 
 Ditto. I've succesfully setup a crypto mapping on a raid1 device under
 qemu, which leads me to believe that it is something specific to Johannes
 setup.

I have tried and I can successfully run cryptsetup on another raiddevice (md1)
made from loopdevices without any problems.
best regars,
Johannes


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



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

2007-02-09 Thread Henrique de Moraes Holschuh
On Fri, 09 Feb 2007, David Härdeman wrote:
  On Thu, Feb 08, 2007, David Härdeman wrote:
  dmsetup / cryptsetup both fail to create a mapping on top of a raid
  device (/dev/md0 in this case).
 
   I don't know where the error lies, but I created two loop devices loop0
   and loop1, added them to a new RAID 1 md0 device, and ran cryptsetup on
   the resulting md0 successfully.
 
 Ditto. I've succesfully setup a crypto mapping on a raid1 device under
 qemu, which leads me to believe that it is something specific to Johannes
 setup.

Warning: It is not safe on all kernels out there, due to kernel bugs.  See
recent flow of patches from the md maintainer in LKML.  I don't know if they
all landed on 2.6.16.y and 2.6.19.y and 2.6.20 yet.

-- 
  One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie. -- The Silicon Valley Tarot
  Henrique Holschuh



Bug#409875: cannot setup device-mapper mapping ontop of /dev/md* device

2007-02-08 Thread David Härdeman

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:[EMAIL PROTECTED]:/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:[EMAIL PROTECTED]:/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:[EMAIL PROTECTED]:/tmp]# echo '0 1 crypt aes-cbc-essiv:sha256 \
0123456789abcdef0123456789abcdef 0 /dev/md0 0'  map
[22:28:[EMAIL PROTECTED]:/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