Adding storage and growing an LVM volume

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.

Getting ready

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.

How to do it...

Follow these steps to add storage and increase the size of an LVM volume:

  1. Register the new partition as a physical volume:
    pvcreate ...

Get CentOS 7 Server Deployment Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.