Table of Contents

lvm commands

Increase logical volume

Add 100 Gigabytes to LV

lvextend -L +100G /dev/mapper/almalinux-lv_var

You also have to resize the partition table, e.g. for xfs filesystem

fsadm resize /dev/mapper/almalinux-lv_var

Checking with df -h now should show increased size.

Tested on

Increasing disk of virtual machine

On base host (add 50 GB of space)

lvextend -L +50G /dev/mapper/centos-mailserver--mailserver_docker

Restart VM then inside VM run (install cloud-utils-growpart and change the disk path accordingly)

growpart /dev/sda 1
pvresize /dev/sda1
lvextend -l +100%FREE /dev/docker/docker

For ext4 FS

resize2fs /dev/mapper/docker-docker

For XFS FS

xfs_growfs /

Tested on

See also

References