[linux-lvm] Reducing PV/ Reclaiming free PEs from a PV to be used for another partition/purpose outside of LVM

Alasdair G Kergon agk at redhat.com
Sun Feb 6 20:24:40 UTC 2005


On Sun, Feb 06, 2005 at 12:15:48PM -0800, Ajeet Nankani wrote:
> vgcfgbackup which would give me meta file data as below 
 
>         extent_size = 65536             # 32 Megabytes

>                         device = "/dev/hda6"    # Hint only
 
>                         pe_start = 384
>                         pe_count = 266  # 8.3125 Gigabytes

>                                 extent_count = 192      # 6 Gigabytes
>                                         "pv0", 0

0-191

>                                 extent_count = 32       # 1024 Megabytes
>                                         "pv0", 192

192-223

> Now here if i edit it and in physical volume section where it says that
> pe_count = 266, i change it to pe_count = 224 which is the last PE used
> by the Logical Volume.
 
Yes.

> after saving it if i run vgcfgrestore with this file, will my PV be
> reduced?? 

That's what pvresize would do.

> after that i can reduce hda6 with parted or similar utility.
 
and the new size is 384 sectors plus 224 extents of 65536 sectors each.

Alasdair
-- 
agk at redhat.com




More information about the linux-lvm mailing list