lvcreate fails to create new lv
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lvm2 (Ubuntu) |
Expired
|
Medium
|
Unassigned |
Bug Description
Binary package hint: lvm2
Just installed a new server which has a hardware raid6 in it, on which a lvm vg is set up.
It's a fresh Ubuntu-Server 7.10 Gutsy Gibbon install, with all current updates.
Trying to add a new lv fails because device-mapper thinks that a device is too small:
root@erebus:~# uname -a
Linux erebus 2.6.22-14-xen #1 SMP Tue Dec 18 07:06:28 UTC 2007 x86_64 GNU/Linux
root@erebus:~# lvm version
LVM version: 2.02.26 (2007-06-15)
Library version: 1.02.20 (2007-06-15)
Driver version: 4.11.0
root@erebus:~# dmsetup version
Library version: 1.02.20 (2007-06-15)
Driver version: 4.11.0
root@erebus:~# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb1 raid6 lvm2 a- 4.09T 3.96T
root@erebus:~# ls /dev/mapper/
control raid6-dom0 raid6-dom0--swap raid6-domU-
root@erebus:~# ls /dev/raid6
dom0 dom0-swap domU-gutsy-disk domU-gutsy-swap
root@erebus:~# lvcreate -v -n test -L 90G raid6
Finding volume group "raid6"
Archiving volume group "raid6" metadata (seqno 47).
Creating logical volume test
Creating volume group backup "/etc/lvm/
Found volume group "raid6"
Creating raid6-test
Loading raid6-test table
device-mapper: reload ioctl failed: Invalid argument
Failed to activate new LV.
root@erebus:~# dmesg | tail -n 3
[27673.414059] device-mapper: table: device 8:17 too small for target
[27673.414071] device-mapper: table: 254:4: linear: dm-linear: Device lookup failed
[27673.414131] device-mapper: ioctl: error adding target to table
root@erebus:~#
As seen above, there should be more than enough space in the vg to create a 90GB lv.
Interestingly, lvm knows about the new lv:
root@erebus:~# lvdisplay -C
LV VG Attr LSize Origin Snap% Move Log Copy%
dom0 raid6 -wi-ao 10.00G
dom0-swap raid6 -wi-ao 32.00G
domU-gutsy-disk raid6 -wi-ao 4.00G
domU-gutsy-swap raid6 -wi-ao 64.00M
test raid6 -wi-d- 90.00G
root@erebus:~#
but the state/Attr seems to be wrong.
device-mapper seems to know about the new lv:
root@erebus:~# ls /dev/mapper/
control raid6-dom0 raid6-dom0--swap raid6-domU-
but not lvm itself:
root@erebus:~# ls /dev/raid6
dom0 dom0-swap domU-gutsy-disk domU-gutsy-swap
root@erebus:~#
vgmknodes creates the appropriate link:
lrwxrwxrwx 1 root root 22 2008-01-15 23:31 test -> /dev/mapper/
but the new lv is not usable.
root@erebus:~# mke2fs /dev/raid6/test
mke2fs 1.40.2 (12-Jul-2007)
mke2fs: Device size reported to be zero. Invalid partition specified, or
partition table wasn't reread after running fdisk, due to
a modified partition being busy and in use. You may need to reboot
to re-read your partition table.
root@erebus:~#
Any Ideas? Any information missing? I'm able to test some things out, since the server is not used productively atm.
Additional Information to:
root@erebus:~# dmesg | tail -n 3
[27673.414059] device-mapper: table: device 8:17 too small for target
[27673.414071] device-mapper: table: 254:4: linear: dm-linear: Device lookup failed
[27673.414131] device-mapper: ioctl: error adding target to table
root@erebus:~#
device 8:17 should be /dev/sdb1:
brw-rw---- 1 root disk 8, 17 2008-01-15 23:19 /dev/sdb1
--- Physical volume --- 6W0G-uywn- K11c-fwHN- aWSg-D8HJEF
PV Name /dev/sdb1
VG Name raid6
PV Size 4.09 TB / not usable 1.97 MB
Allocatable yes
PE Size (KByte) 4096
Total PE 1072611
Free PE 1037779
Allocated PE 34832
PV UUID qgokgT-