{{tag>lvm}} ====== 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 ==== * AlmaLinux 9 ===== 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 ==== * CentOS Linux 7 (Core) host and guest ====== See also ====== ====== References ====== * http://www.datadisk.co.uk/html_docs/redhat/rh_lvm.htm * https://www.redhat.com/en/blog/resize-lvm-simple * https://serverfault.com/questions/138756/running-resize2fs-on