Last active
February 3, 2017 09:22
-
-
Save kaloprominat/cbfa74e786b6dd7d35619854d318891e to your computer and use it in GitHub Desktop.
linux: resize reduce shrink lvm lxc container size
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
# resize LXC by lxctl | |
lxctl set <container> --rootsz 150g | |
# or | |
lxctl stop <container> | |
e2fsck -f /dev/vg00/container | |
resize2fs -p /dev/mapper/vg00-container <newsize>G | |
lvresize -L [+/-<deltasize>G | <newsize>G ] /dev/vg00/container | |
resize2fs -p /dev/mapper/vg00-container | |
e2fsck -f /dev/vg00/container | |
lxctl start <container> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment