Created
March 7, 2018 07:52
-
-
Save szymonlopaciuk/88866b202e74c886ecf62fe5bc34ac19 to your computer and use it in GitHub Desktop.
LVM: shrink one volume for another
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Unmount /home | |
umount /home | |
# Shrink the /home filesystem | |
fsck -f /dev/mapper/fedora-hmoe | |
resize2fs /dev/mapper/fedora-home 100G | |
# Shrink the /home logical volume | |
lvreduce -L -40G /dev/mapper/fedora-home | |
# Resize the /home partition to the size of the LV | |
resize2fs /dev/mapper/fedora-home | |
# Extend the /root logical volume | |
lvextend -L +40G /dev/mapper/fedora-root | |
# Extend the /root filesystem | |
fsck -f /dev/mapper/fedora-root | |
resize2fs /dev/mapper/fedora-root | |
# Mount /home | |
mount /home |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment