How to add physical volume and resize LVM

I have a LVM partition that uses 3 physical drives. I need to increase size of this LVM partition by adding a new disk.

I have a drive with 452 GB free disk space.

Create Physical volume with pvcreate comand

Extend Volume Group

Current volume group size is 4.19 TB

Lets extend the volume group vg1 by adding the newly created physical volume

Now the volume group size is 4.6 TB

Increase size of LVM

Lets find details about the current logical volumes

We have one logical volume with name data1, size is 4.9 TB.

To extend the logical volume, rune the command

This will extend logical volume “data1” to use all available free disk space on the volume group vg1.

Lets check the new size of LVM with lvs command

Now LVM size is increased to 4.6 TB.

Reszie filesystem

Let us find more info on the logical volume using blkid command

The volume is formatted as xfs file system.

Let us find out the mount point.

The volume is mounted at /usr/share/nginx/html

To resize the xfs filesystem, run the command

If the file system is not mounted, you need to mount it before resizing.

Let us verify the size

Size of the volume now changed from 4.2T to 4.7T.

Back to lvm

Need help with Linux Server or WordPress? We can help!

Leave a Reply

Your email address will not be published. Required fields are marked *