2

I found a similar question here, but there's one different point on my server:

 --- Volume group ---
  VG Name               vg
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  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               465.50 GiB
  PE Size               32.00 MiB
  Total PE              14896
  Alloc PE / Size       14896 / 465.50 GiB
  Free  PE / Size       0 / 0
  VG UUID               xxxxx     




 pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               vg
  PV Size               465.51 GiB / not usable 15.00 MiB
  Allocatable           yes (but full)
  PE Size               32.00 MiB
  Total PE              14896
  Free PE               0
  Allocated PE          14896
  PV UUID               xxxxx

I would like to install virtualizor on the server and using volume group storage configuration, but with this preinstalled OS configuration (volume group root) it is not possible and my skills are not enough to know how to do to shrink the volume group and create a new one.

2 Answers 2

0

Before starting, be sure to create a good, retrievable image or expect to lose your data.

In the examples section of my pvresize man page (assuming we have the same version of LVM!): Shrink the PV on /dev/partition-name prior to shrinking the partition with fdisk (ensure that the PV size is appropriate for your intended new partition size):

pvresize --setphysicalvolumesize 40G /dev/partition-name

It may fail, the user is further warned, if there are allocated extents in the area you seek to free, and that pvmove might solve that problem.

Finally, vgreduce --removemissing volgrp should clear up the volume group inconsistencies as regards the now missing PEs, and then modify the partition.

Assuming it works as documented, you won't need the backup. Before trying do take back... try below link for knowledge about LVM.. LVM link

2
  • I don't understand the downvote.
    – peterh
    Sep 22, 2017 at 20:31
  • 2
    Vgdisplay output indicates that all the capacity of the VG is currently allocated to one or more LVs. In other words, there is no unallocated space you could free with just pvresize. At least one logical volume would have to be reduced or removed first.
    – telcoM
    Dec 11, 2019 at 13:50
-1

For extend, you have to do top down and for reduce you have do down top.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .