The size of logical volumes doesn't need to be fixed and we're free to allocate more storage for one from its volume group. This recipe teaches us how to add more storage to the group and then grow the size of the logical volume to take advantage of it.
This recipe requires a CentOS system with administrative privileges provided by logging in with the root
account or using sudo
. It assumes that a new disk has been installed and partitioned (identified as /dev/sdd1
) and a logical group and volume have been configured as described in previous recipes.
Follow these steps to add storage and increase the size of an LVM volume:
Register the new partition as a physical volume:
pvcreate /dev/sdd1
Review the output of
pvs
to confirm that the volume was registered:pvs
Use
vgextend
to add the physical volume to the desired volume group:vgextend vg0 /dev/sdd1
Review the output of
vgs
to confirm that the volume was added to the group...