Skip to contentSkip to conversation

lvcreate gives 'device-mapper: reload ioctl failed: Invalid argument'

linux-lvm Matt McHenry 2 participants 4 messages Nov 14, 2006

lore
Share & tools
lore
#0 lore raw

As suggested in your other post, I upgraded my kernel and lvm tools.
Still no luck. :(

# uname -a
Linux localhost 2.6.18-gentoo-r2 #1 SMP PREEMPT Sun Nov 12 18:00:54 EST 2006 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz GNU/Linux
# dmsetup version
Library version:   1.02.10 (2006-09-19)
Driver version:    4.7.0
Quoted 3 lines

I don't have an idea why the lvcreate is failing... You could try to interface with device-mapper directly and see what happens. To do that type:

# echo "0 31457280 linear 8:11 31457664" | dmsetup -vvvv create maingroup-dvd
device-mapper: reload ioctl failed: Invalid argument
Command failed
dm version   O   [16384]
dm create maingroup-dvd  O   [16384]
dm reload maingroup-dvd  O   [16384]
dm remove maingroup-dvd  O   [16384]
Quoted 4 lines

Another simple thing to try is bumping up the verbosity; e.g. 'lvcreate -vvvv -L 15G -n dvd maingroup'. This will give alot of output, so you may wish to redirect it to a file. Having everything printed can often give great clues as to the problem.

I think my first message got rejected because of the size of the
output, so instead it's at http://66.93.60.83/~matt/lvcreate.log. To my untrained eye, things look fine until this point:

# libdm-deptree.c:1370 Adding target: 0 31457280 linear 8:11 31457664
# ioctl/libdm-iface.c:1557 dm table (254:11) O [16384]
# ioctl/libdm-iface.c:1557 dm reload (254:11) N [16384]
# ioctl/libdm-iface.c:1574 device-mapper: reload ioctl failed: Invalid # argument

----------------------
Matt McHenry
http://www.speakeasy.org/~jerith/
[email protected]
[email protected]

#1 lore raw
Quoted 4 lines · Matt McHenry
# echo "0 31457280 linear 8:11 31457664" | dmsetup -vvvv create 
maingroup-dvd
device-mapper: reload ioctl failed: Invalid argument
Command failed

Now look in your kernel message log for a slightly more detailed error message.

And provide the output of 'pvs -o +dev_size'

Alasdair

Signature · 1 line
[email protected]
#2 lore raw
Quoted 3 lines

Now look in your kernel message log for a slightly more detailed error message.

Nov 13 20:03:03 [kernel] device-mapper: table: device 8:11 too small for target
Nov 13 20:03:03 [kernel] device-mapper: table: 254:11: linear: dm-linear: Device lookup failed
Nov 13 20:03:03 [kernel] device-mapper: ioctl: error adding target to table
# pvs -o +dev_size
  PV         VG        Fmt  Attr PSize  PFree   DevSize
  /dev/sda10 maingroup lvm2 a-   38.15G 516.00M  38.16G
  /dev/sda11 maingroup lvm2 a-   38.15G  23.15G  19.08G
  /dev/sda12 maingroup lvm2 a-   19.07G  19.07G  19.07G
  /dev/sda6  maingroup lvm2 a-   19.08G      0   19.08G
  /dev/sda7  maingroup lvm2 a-   38.15G      0   38.16G
  /dev/sda8  maingroup lvm2 a-   76.30G      0   76.31G
  /dev/sda9  maingroup lvm2 a-   76.30G      0   76.31G

----------------------
Matt McHenry
http://www.speakeasy.org/~jerith/
[email protected]
[email protected]

#3 lore raw
Quoted 5 lines · Matt McHenry
Nov 13 20:03:03 [kernel] device-mapper: table: device 8:11 too small for target

PV VG Fmt Attr PSize PFree DevSize

  /dev/sda11 maingroup lvm2 a-   38.15G  23.15G  19.08G
  /dev/sda12 maingroup lvm2 a-   19.07G  19.07G  19.07G

So your partition /dev/sda11 now has a size of 19GB but lvm2 thinks it can use 38GB of it.

Have you edited the partition table?

Alasdair

Signature · 1 line
[email protected]