[linux-lvm] how to online resize pv?
Stuart D Gathman
stuart at bmsi.com
Mon Jul 30 20:25:46 UTC 2012
On Jul 30, Stefan Priebe transmitted in part:
> Number Start End Size File system Name Flags
> 1 1049kB 2097kB 1049kB GRUB_BOOT bios_grub
> 2 2097kB 32,2GB 32,2GB Linux LVM lvm
>
> If i delete 2 and recreate it starting at the same sector i can't reread the
> part. table.
>
> Is there a way todo online resizing?
Only when no partition is open. That is one reason why LVM is an
improvement over partition tables. You don't have to use a partition
table, just use the entire device as a PV. However, most admins use a
partition table with a single partition so that other OSes will
recognize the disk as in use (and hopefully not overwrite without
warning if accidentally presented).
If you have multiple drives, you might be able to migrate stuff off,
remove the PV, resize, add the PV back to the VG.
I use software RAID1/RAID10. You can remove the partition from the RAID
array, resize, then add it back and resync. Repeat for other mirror
legs to actually use the space.
More information about the linux-lvm
mailing list