lvcreate/lvextend fails with "device-mapper: reload ioctl failed: Invalid argument" in Red Hat Enterprise Linux
Issue
lvextend
fails after adding additional space withpvresize
.- After editing partition table with
fdisk
,lvm
tools dont work complaing about the device too small for target. parted
/fdisk
editing partition tables doesn't updatedevice-mapper
tables.pvresize
reports pv's being resized but does not resize the pv to the size of the partition.- After adding additional space to the block device used by lvm, I can't
lvextend
. - Need help with resizing root on a grown virtual disk (vmware virtual host).
- After Increasing the size of disk from vmware server side, size is reflected in guest "
fdisk -l
". Now to extend pv, "pvresize -v --setphysicalvolumesize
" is executed and went fine. Butlvextend
fails. -
Device is not reflecting increased size after increasing in VMWare and lvextend fails with:
kernel: device-mapper: table: 253:11: sdb1 too small for target: start=125831168, len=62906368, dev_size=125837312
-
lvcreate
fails with the below error.device-mapper: resume ioctl on (major:minor) failed: Invalid argument Unable to resume vgname-lvname (major:minor) Failed to activate new LV
Environment
- Red Hat Enterprise Linux (RHEL); including:
- Red Hat Enterprise Linux 4 (RHEL4)
- Red Hat Enterprise Linux 5 (RHEL5)
- Red Hat Enterprise Linux 6 (RHEL6)
- Storage block device that can be resized/appended to:
- Commonly virtualized environments including VMWare, but could also apply to bare-metal systems with SAN-based volumes
-
LVM2 managed storage
- Physical Volume (LVM PV) is on a partition rather than being directly on the device (/dev/sdb1 in this example):
# pvs Scanning for physical volume names PV VG Fmt Attr PSize PFree DevSize PV UUID /dev/sdb1 VolGroup00 lvm2 a-- 90.00g 37.00g 60.00g lt5jBc-JE70-hlbn-yFtg-CZ5l-mD2c-twu9xj
- The LVM PV has been grown using
pvresize --setphysicalvolumesize <size>
instead of letting pvresize automatically detect the new size of the device (above,DevSize
is 60g butPSize
is 90g, indicating device is smaller than LVM metadata thinks it is)
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.