[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[linux-lvm] shrink VG and PV



My system is archlinux i386. lvm version 2.02.62(1) (2010-03-09)
I'd like to shrink a partition with lvm on it. Can this be done? In order to shrink it I need to reduce the size of the PV, right? I have successfully removed an LV (from the end on the VG) and there is no mention of it with lvdisplay or in the file i get with vgcfgbackup. I think the next step is to reduce the size of the VG and remove the now unallocated 3884 PEs from it. I can't find a command for that. I have tried pvresize. How do I solve the problem with "metadata areas"? vgdisplay says VG Status is "resizable".

pvresize /dev/sda2 --test --setphysicalvolumesize 49256M
Test mode: Metadata will NOT be updated.
/dev/sda2: too many metadata areas for pvresize
0 physical volume(s) resized / 1 physical volume(s) not resized

vgdisplay
--- Volume group ---
VG Name nonxpvg
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 6
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 3
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 63.27 GiB
PE Size 4.00 MiB
Total PE 16198
Alloc PE / Size 12314 / 48.10 GiB
Free PE / Size 3884 / 15.17 GiB
VG UUID 7nSsEo-Hend-4Xi8-2Udy-hFTR-2s8K-7Z7bbm



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]