resizing PV does not work (lvm) after resizing partition
Hi all,
I know there are probably alot of threads about lvm however they aren't addressing my problem. I want to extend the PEs available in a VG. This VG already has LVs and those are active and mounted. From what I read from the manpages of pvresize this should be perfectly possible. Code:
pvresize resizes PhysicalVolume which may already be in a volume group and have active logical volumes allocated on it. 1. Resized the vmdk in ESX (+1G) 2. Let the kernel reread the device geometry: echo 1 > /sys/block/sdc/device/rescan 3. fdisk shows me the new size... so far so good 4. I resize the partition using fdisk (remove, recreate) and gave it the 8e type (lvm) 5. wrote config to disk 6. executed partprobe 7. pvresize /dev/sdc Here it goes wrong! Pvresize says in the verbose output it sees the same size however at the end it says the pv has been resized. I have seen when I put volumes "offline" using vgchange -a n vg on a test machine, and then try pvresize it seems to work ok. :s this is against what is in the manual as it says pvresize should work on online mounted volumes. Can anyone reproduce this or does anyone knows a fix for this? Thanks in advance! |
When you resize a PV you still have to add the extra extents to the volume and resize the filesystem to use those extents.
|
Just a question) why would you want to increase the size of a couple of allocated PVs when you can achieve the same by declaring new PVs from new disks; and then adding it to the VG.
|
Quote:
Quote:
It keeps showing the old size. I have been using LVM in the past and am aware that I should extend the LV(lvresize) and the fs(resize2fs). |
Quote:
For me it is more a matter of "why doesn't this work as it should". As the manual clearly states that it should work. And if other people notice the same behaviour on RHEL/Centos or other distributions. Another way I have been doing this in the past (because I had the same issue) is extending the existing disk, rereading the disk geometry, adding a partition, pvcreate, vgextend. But on a partition point of view this is a bit of junk, as it should be possible to do it in the same partition. |
Deadeyes - Did you ever find a way of doing this? I've been attempting the same thing to no avail far.
|
All times are GMT -5. The time now is 04:37 PM. |