linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
* [linux-lvm] shrink VG and PV
@ 2010-05-17 19:44 Dael Elcar
  2010-05-17 20:56 ` Malahal Naineni
  2010-05-17 21:14 ` Malahal Naineni
  0 siblings, 2 replies; 7+ messages in thread
From: Dael Elcar @ 2010-05-17 19:44 UTC (permalink / raw)
  To: linux-lvm

[-- Attachment #1: Type: text/plain, Size: 1169 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1601 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-05-18  9:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-17 19:44 [linux-lvm] shrink VG and PV Dael Elcar
2010-05-17 20:56 ` Malahal Naineni
2010-05-17 21:14 ` Malahal Naineni
2010-05-17 21:30   ` Stuart D. Gathman
2010-05-18  5:29     ` kanonmatswe
2010-05-18  9:13       ` Bryn M. Reeves
2010-05-18  9:38         ` Bryn M. Reeves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).