User Tools

Site Tools


wiki:lvm_commands

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:lvm_commands [2025/11/21 13:26] – created antisawiki:lvm_commands [2026/05/11 11:52] (current) – add VM instructions antisa
Line 13: Line 13:
 Checking with ''df -h'' now should show increased size. Checking with ''df -h'' now should show increased size.
  
-====== Tested on ======+==== Tested on ====
   * AlmaLinux 9   * 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 ====== ====== See also ======
Line 20: Line 41:
 ====== References ====== ====== References ======
   * http://www.datadisk.co.uk/html_docs/redhat/rh_lvm.htm   * 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
  
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