How to resize an LVM physical volume using the PVRESIZE command

Home > Search > How-to
  by

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

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




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




Comments