Increasing the size of an existing partition based on a Logical Volume is very simple, but first you need to understand the hierarchy in LVM. This diagram can help us visualize the layers and the order in which we should work, which will be from bottom to top.

First, we need to identify the device with free space. This device must be a block device, either a complete disk or a partition. This difference is not important for LVM because it can work with both types.
To identify the block devices available on the machine, we will use the lsblk command.

The block device to be used in our case is the sdb1 partition.
To make it available to the LVM system, we must assign it that type of partition. We can do this with fdisk or cfdisk.

We go up to the Physical volumes level. To create one in our space, we will use the pvcreate command followed by the path to the device.

We will check that it has been created with pvdisplay.

The device path will be used as the PV name.
Once we have defined the PV, we must add it to the corresponding Virtual group (VG). In our case, it will be the VG called rhel. We can see the available VGs with the vgdisplay command.

To add the PV to the VG, we will use the vgextend command as follows.

If we look at the VG information again, we will see that the total space has increased and 100GB is shown as free.

We move up one layer to the Logical Volumes (LV) level. We can also list the available LVs with lvdisplay. In our case, we want to expand the LV called root.

As we can see in the info, the root LV is fed by the rhel VG, which is where we have added the new space.
To increase it with all the available space in the VG, we will use the lvextend command as follows.

Finally, we will have to extend the file system that is hosted on the LV. The command to use varies depending on the file system we are using.
In our case, it is EXT4, and it will be as follows.

And the space will finally be available in the corresponding filesystem.
If the filesystem were XFS, we would use the xfs_growfs command.
The -D parameter is optional and indicates the size to which the file system should be expanded. If not specified, all available space will be used, which is the most common case.
Translated with DeepL.com (free version)
Comments