[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] possible bug in device-mapper

On Friday 19 March 2004 2:30 pm, Yaroslav Popovitch wrote:
> if option <sector count> is equal to 0, then dmsetup
> reports about error, but still creates device.
> Useful output:
> 	[root deimos yp]# echo 0 0 crypt aes-plain
> 4e1243bd22c66e76c2ba9eddc1f91394 0 /dev/loop0 0|dmsetup create volume1
> device-mapper ioctl cmd 9 failed: Invalid argument
> 	Command failed
> 	[root deimos yp]# echo $?
> 	1
> 	[root deimos yp]# dmsetup ls
> 	volume1 (254, 0)
> 	[root deimos yp]# dmsetup mknodes
> 	[root deimos yp]# lsmod /dev/mapper/
> 	control volume1
> Configuration:
> 	device-mapper-1.00.08
> 	Linux kernel 2.6.4
> Cheers,YP

What actually happened here is that you created a device called "volume1", and 
then tried to load a table with a zero-length target, which isn't allowed. 
The creation of the device worked as expected, and it's perfectly legitimate 
to have a device without a table (you just can't perform any I/O on that 

The confusing thing here is that dmsetup allows you to combine these two steps 
(creating the device and loading the table) into one. Dmsetup also allows you 
to create the device without specifying the table, and you can later use 
"dmsetup load" to load a table into that device, and "dmsetup resume" to 
activate that table. The "combined" version is a carry-over from the way the 
version 1 ioctl interface created devices.

So what you're really looking for here is that when you use "dmsetup create" 
in the create-with-table mode, dmsetup should remove the device if the 
load-table portion fails.

Kevin Corry
kevcorry us ibm com

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]