User Tools

Site Tools


wiki:lvm_commands

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

wiki/lvm_commands.txt · Last modified: by antisa

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki