Bootstrap FreeKB - LVM (Logical Volume Manager) - pvresize command (resize an LVM physical volume)
LVM (Logical Volume Manager) - pvresize command (resize an LVM physical volume)


The pvresize command followed by the physical volume will update the physical volume to have the same amount of space as the partition. For example, let's say the /dev/sda2 partition has 16 GB, and the /dev/sda2 physical volume has 8 GB. If you need to increase the size of the partition, refer to this article.

The following command will update the physical volume to have 16 GB.

pvresize /dev/sda2

 

The pvdisplay command can be used to display the physical volumes in a volume group.

~]# pvdisplay
--- Physical volume ---
  PV Name               /dev/sda1
  VG Name               MyVG
  PV Size               500 GB / not usable 79.0 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              4388
  Free PE               4375
  Allocated PE          13
  PV UUID               7016c299-b6b1-40ad-80f0-e4dd0b3def65

--- Physical volume ---
  PV Name               /dev/sdb1
  VG Name               MyVG
  PV Size               500 GB / not usable 79.0 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              4388
  Free PE               4375
  Allocated PE          13
  PV UUID               7016c299-b6b1-40ad-80f0-e4dd0b3def66

--- Physical volume ---
  PV Name               /dev/sdc1
  VG Name               MyVG
  PV Size               500 GB / not usable 79.0 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              4388
  Free PE               4375
  Allocated PE          13
  PV UUID               7016c299-b6b1-40ad-80f0-e4dd0b3def67

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 111c05 in the box below so that we can be sure you are a human.