Hello all,
I tried to extend my lvm today, found the following error,
lvextend -L +10G /dev/vg/a
Extending logical volume a to 60.21 GB
device-mapper: reload ioctl failed: Invalid argument
Failed to suspend a
Any help
Hello all,
I tried to extend my lvm today, found the following error,
lvextend -L +10G /dev/vg/a
Extending logical volume a to 60.21 GB
device-mapper: reload ioctl failed: Invalid argument
Failed to suspend a
Any help
Could you post the result of
pvs -a -v
Also, please, search and post messages in /var/log/messages
containing kernel: device-mapper
entries
Perhaps, something like:
perl -ne '/kernel:\s+device-mapper/ and print' /var/log/messages
Hello Aia ,
Thanks for your reply,
pvs -a -v
Wiping cache of LVM-capable devices
PV VG Fmt Attr PSize PFree DevSize PV UUID
/dev/VolGroup00/LogVol01 -- 0 0 1.00G
/dev/VolGroup00/LogVol02 -- 0 0 8.00G
/dev/sda2 VolGroup00 lvm2 a- 29.88G 1.38G 29.90G hmTbbr-3IaH-Pl8f-pw0Z-FArk-2wtW-UecJpM
/dev/sdb1 vg lvm2 a- 420.00G 120.67G 300.00G tuJPoe-nHD6-R3C7-Mcss-njlT-yMei-e25Kde
/dev/sdb2 vg lvm2 a- 100.00G 100.00G 100.00G fYWd52-Xf65-zx7G-9AVg-QoWZ-YVM9-Ee04PM
/dev/vg/a -- 0 0 149.64G
/dev/vg/b -- 0 0 50.21G
/dev/vg/c -- 0 0 99.46G
perl -ne '/kernel:\s+device-mapper/ and print' /var/log/messages
May 4 10:21:05 bneftp01 kernel: device-mapper: table: device 8:17 too small for target
May 4 10:21:05 bneftp01 kernel: device-mapper: table: 253:7: linear: dm-linear: Device lookup failed
May 4 10:21:05 bneftp01 kernel: device-mapper: ioctl: error adding target to table
May 4 10:24:23 bneftp01 kernel: device-mapper: table: device 8:17 too small for target
May 4 10:24:23 bneftp01 kernel: device-mapper: table: 253:7: linear: dm-linear: Device lookup failed
May 4 10:24:23 bneftp01 kernel: device-mapper: ioctl: error adding target to table
May 4 10:24:35 bneftp01 kernel: device-mapper: table: device 8:17 too small for target
May 4 10:24:35 bneftp01 kernel: device-mapper: table: 253:8: linear: dm-linear: Device lookup failed
May 4 10:24:35 bneftp01 kernel: device-mapper: ioctl: error adding target to table
May 4 10:24:41 bneftp01 kernel: device-mapper: table: device 8:17 too small for target
May 4 10:24:41 bneftp01 kernel: device-mapper: table: 253:9: linear: dm-linear: Device lookup failed
May 4 10:24:41 bneftp01 kernel: device-mapper: ioctl: error adding target to table
May 4 10:31:33 bneftp01 kernel: device-mapper: table: device 8:17 too small for target
May 4 10:31:33 bneftp01 kernel: device-mapper: table: 253:9: linear: dm-linear: Device lookup failed
May 4 10:31:33 bneftp01 kernel: device-mapper: ioctl: error adding target to table
May 4 10:33:10 bneftp01 kernel: device-mapper: table: device 8:17 too small for target
May 4 10:33:10 bneftp01 kernel: device-mapper: table: 253:9: linear: dm-linear: Device lookup failed
May 4 10:33:10 bneftp01 kernel: device-mapper: ioctl: error adding target to table
May 4 10:33:20 bneftp01 kernel: device-mapper: table: device 8:17 too small for target
May 4 10:33:20 bneftp01 kernel: device-mapper: table: 253:9: linear: dm-linear: Device lookup failed
May 4 10:33:20 bneftp01 kernel: device-mapper: ioctl: error adding target to table
May 4 10:33:44 bneftp01 kernel: device-mapper: table: device 8:17 too small for target
May 4 10:33:44 bneftp01 kernel: device-mapper: table: 253:9: linear: dm-linear: Device lookup failed
May 4 10:33:44 bneftp01 kernel: device-mapper: ioctl: error adding target to table
Thanks in advance
Thank you for posting the output. That helps to confirm the issue. I have edited your post with some of the relevant information.
The reported PV size (PSize) is bigger (420.00G) than the device(DevSize) size (300.00G). Also, the log messages confirm that with the message highlighted in red. It is obvious something has gone wrong with it. The PV can not be bigger than the device it holds it.
My suggestion:
Backup your data if it is important.
umount
any volume you have on the group vg:
/dev/vg/a
/dev/vg/b
/dev/vg/c
Resize the pv for /dev/sdb1
with the following command:
pvresize /dev/sdb1
Check again with pvs -a -v
or pvdisplay /dev/sdb1
Try to lvextend /dev/vg/a again.
mount the lvm volumes again.
Thanks Aia,
I will try that out by Monday and let you know how it turned out to be
Hello Aia,
I have raised for a change request, i just want to double check with you the commands to be executed after taking the backup.
1.#umount /dev/vg/a
2.#umount /dev/vg/b
3.#umount /dev/vg/c
Resize PV with the following command,
#pvresize /dev/sdb1(will this shrink the dev?)
pvdisplay /dev/sdb1
lvextend -L +30G /dev/mapper/vg_ftpdata-lv_a
lvextend -L +30G /dev/mapper/vg_ftpdata-lv_b
lvextend -L +30G /dev/mapper/vg_ftpdata-lv_c
#mount /dev/vg/a
#mount /dev/vg/b
#mount /dev/vg/c
Kindly confirm.Thanks
If it can it will reconfigure how the pv sees the size of device to the correct size. Nothing is done to the /dev/sdb1
I do not know where those come from, everything you have shown says that it should be:
lvextend -L+30G /dev/mapper/vg-a
lvextend -L+30G /dev/mapper/vg-b
lvextend -L+30G /dev/mapper/vg-c
or
lvextend -L+30G /dev/vg/a
lvextend -L+30G /dev/vg/b
lvextend -L+30G /dev/vg/c
Note: Do not forget that you have to resize the file system, afterward, to recognize the new space, but I have not mentioned that since it is another topic that I assume you know about it.
Hello Aia,
I tried the change yesterday and it worked like a charm Thanks a lot for your help,
pvresize /dev/sdb1 command didnt work but i did a pvresize ---physicalsetpath which worked great ,
And yes did resize of the file system later.Everything looks good now:)