Skip to content

Instantly share code, notes, and snippets.

@csghone
Created September 6, 2024 03:09
Show Gist options
  • Save csghone/6fbabe9bc8b7a1476aa3f89497df1afa to your computer and use it in GitHub Desktop.
Save csghone/6fbabe9bc8b7a1476aa3f89497df1afa to your computer and use it in GitHub Desktop.
LVM resizing
exit 1 # DONT RUN DIRECTLY
# Original system: "/" and "/local/mnt" with 20 GB and 2000 GB
# Target: Increase "/" to 200 GB
# Do reboot since some random processes keep accessing /local/mnt
# Run following as root as soon as you reboot
df -h # Note down / and /local/mnt partition sizes
umount /local/mnt
lvresize -L -180G /dev/vg00/lv_local_mnt -r
lvextend -l +100%FREE /dev/vg00/rootvol -r
mount /local/mnt
df -h # Check if the partitions have changed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment