Need to shrink a VG https://www.softaculous.com/board/index.php?tid=9970 <![CDATA[Need to shrink a VG]]> https://www.softaculous.com/board/index.php?tid=9970&tpg=1#p35513 More info: https://www.centos.org/docs/5/html/Cluster_Logical_Volume_Manager/PV_resize.html]]> Wed, 10 May 2017 19:40:22 GMT https://www.softaculous.com/board/index.php?tid=9970&tpg=1#p35513 <![CDATA[]]> https://www.softaculous.com/board/index.php?tid=9970&tpg=0#p33952 Softalicious Virtualizor with dual virtualization (KVM & OpenVZ)
- KVMData LVM /dev/vg Size:1862.63 GB Free:940.63 GB
- OVZData OpenVZ /vz Size:590.46 GB Free:21.38 GB (This number is the basis of my need)
I need to increase the size of "OVZData" which means I need to shrink "KVMData". Can this be done and if so, how? I'm comfortable with resizing LV groups but not so sure about a VG.
Any help is greatly appreciated.
A little more specifics:
Quote
[root@nc /]# pvdisplay
--- Physical volume ---
PV Name /dev/md1
VG Name vg
PV Size 1.82 TiB / not usable 22.00 MiB
Allocatable yes
PE Size 32.00 MiB
Total PE 59604
Free PE 30100
Allocated PE 29504
PV UUID xxxxxx-Y2Zl-1VIz-3AWg-xxxx-xxxx-xxxxxx

[root@nc /]# vgdisplay
--- Volume group ---
VG Name vg
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 530
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 5
Open LV 3
Max PV 0
Cur PV 1
Act PV 1
VG Size 1.82 TiB
PE Size 32.00 MiB
Total PE 59604
Alloc PE / Size 29504 / 922.00 GiB
Free PE / Size 30100 / 940.62 GiB
VG UUID xxxxxx-qdNB-LRu6-ILbT-xxxx-xxxx-xxxxxx

[root@nc /]# lvdisplay
--- Logical volume ---
LV Path /dev/vg/swap
LV Name swap
VG Name vg
LV UUID xxxxxx-xHt1-PAMe-fTTe-aFr7-xxxx-xxxxxx
LV Write Access read/write
LV Creation host, time nc.x.com, 2015-10-05 18:21:43 -0400
LV Status available
# open 1
LV Size 32.00 GiB
Current LE 1024
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0

--- Logical volume ---
LV Path /dev/vg/root
LV Name root
VG Name vg
LV UUID xxxxxx-kSYO-VvJY-ppWD-Dnxg-xxxx-xxxxxx
LV Write Access read/write
LV Creation host, time nc.x.com, 2015-10-05 18:21:43 -0400
LV Status available
# open 1
LV Size 160.00 GiB
Current LE 5120
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1

--- Logical volume ---
LV Path /dev/vg/vz
LV Name vz
VG Name vg
LV UUID xxxxxx-CJhp-abHu-hWPO-rKps-xxxx-xxxxxx
LV Write Access read/write
LV Creation host, time sysresccd, 2015-10-05 15:26:37 -0400
LV Status available
# open 1
LV Size 600.00 GiB
Current LE 19200
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:2

--- Logical volume ---
LV Path /dev/vg/vsv1001-0rb9-qymdkir2wjobdzn2
LV Name vsv1001-0rb9-qymdkir2wjobdzn2
VG Name vg
LV UUID xxxxxx-C6FB-rNRh-jbrF-ax2j-xxxx-xxxxxx
LV Write Access read/write
LV Creation host, time nc.x.com, 2015-10-22 11:38:03 -0400
LV Status available
# open 0
LV Size 100.00 GiB
Current LE 3200
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:3

--- Logical volume ---
LV Path /dev/vg/vsv1001-0hzc-uk1nvr2i8arfqyez
LV Name vsv1001-0hzc-uk1nvr2i8arfqyez
VG Name vg
LV UUID xxxxxx-lIRy-XfNY-TKHK-lOJ9-xxxx-xxxxxx
LV Write Access read/write
LV Creation host, time nc.x.com, 2015-10-25 11:20:01 -0400
LV Status available
# open 0
LV Size 30.00 GiB
Current LE 960
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:4

[root@nc /]# pvs
PV VG Fmt Attr PSize PFree
/dev/md1 vg lvm2 a--u 1.82t 940.62g
[root@nc /]# vgs
VG #PV #LV #SN Attr VSize VFree
vg 1 5 0 wz--n- 1.82t 940.62g
[root@nc /]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root vg -wi-ao---- 160.00g
swap vg -wi-ao---- 32.00g
vsv1001-0hzc-uk1nvr2i8arfqyez vg -wi-a----- 30.00g
vsv1001-0rb9-qymdkir2wjobdzn2 vg -wi-a----- 100.00g
vz vg -wi-ao---- 600.00g
[root@nc /]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg-root 158G 40G 110G 27% /
tmpfs 7.8G 0 7.8G 0% /dev/shm
/dev/md0 243M 170M 61M 74% /boot
/dev/mapper/vg-vz 591G 260G 331G 44% /vz
]]>
Thu, 05 Jan 2017 23:39:48 GMT https://www.softaculous.com/board/index.php?tid=9970&tpg=0#p33952