LVM disk extend after P2V to VMWARE
We have recently P2V'd a physical RHEL 5.8 system to VMware.
FDISK shows the resized disk
Disk /dev/sdb: 214.7 GB, 214748364800 bytes
68 heads, 4 sectors/track, 1542023 cylinders
Units = cylinders of 272 * 512 = 139264 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 948737 129028096 8e Linux LVM
But I am unable to resize...
Failed to read physical volume "/dev/sdb"
0 physical volume(s) resized / 0 physical volume(s) not resized
Was wondering if anyone has run into this issue.
Thanks.
Responses
I'm not seeing an indication that you extended the partition on /dev/sdb? Normally, when you grow a device, you do:
- Grow vDisk/LUN
- Rescan device for geometry changes (fails if device is open/in use)
3a. If wishing to continue to only have one partition, delete existing partition and re-create to match new vDisk/LUN size
3b. Otherwise, add another partition to disk that extends to the end.
4a. Do a pvscan/vgscan so that LVM sees the new partition size
4b. Do a vgextend onto the new partition - Perform lvextend
- Perform your fs-resize operation.
Everything I find recommends creating a new partition with the new portion of disk that was found, then growing the VG and extending the LV.
I would try:
blockdev --rereadpt /dev/sdb
partprobe /dev/sdb
blockdev --report
parted /dev/sdb print
Then, I would also look at this doc, section 7:
http://www.thegeekstuff.com/2011/09/parted-command-examples/
and rerun the commands above to rescan and update the partition table, etc..
I am going to spin up a machine to test this and I will update this response with the steps. If you happen to test this before I, can you please update the thread?
Good luck ;-)
Doing things that way limits the number of times you can expand your vDisk or LUN. Redoing the disk's single partition means you can extend it an arbitrary number of times. You also don't have to worry about whether you remembered to properly align each of the subsequent partitions (so long as the partition-to-be-extended was properly aligned when first set up)
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
