-
Notifications
You must be signed in to change notification settings - Fork 39
Create Space on Target
DO NOT EDIT: This page has been migrated to Confluence: https://openxt.atlassian.net/wiki/display/DC/Create+Space+on+Target
This works within the 1G that is spare on a default install.
df -h lvresize -L +1G /dev/xenclient/root resize2fs -p /dev/xenclient/root df -h
This is for when you need more expansion than will fit in the spare room of the install.
If SELinux is enforcing you need to turn that off:
$ nr
$ setenforce 0
First you have to stop the monit daemon (don't ask):
$ /etc/init.d/monit stop
Stop xenmgr so nobody use storage anymore:
$ /etc/init.d/xenmgr stop
$ umount /storage
Resize storage filesystem (shrink it to 100G):
$ e2fsck -f /dev/xenclient/storage
$ resize2fs /dev/xenclient/storage 100G
Make the storage lv 101G to be on the safe side:
$ lvresize /dev/xenclient/storage -L101G
Remount storage and restart xenmgr:
$ mount /storage
$ /etc/init.d/xenmgr start
Make more space on root (10G):
$ lvresize /dev/xenclient/root -L10G
Do the online resize in the background:
$ resize2fs /dev/xenclient/root &
df will tell you live how big root is:
$ df -h
NOTE: it takes a while for the root resize. Don't start installing packages etc. until it is done.
NOTE: it should be possible to restart xenmgr but this may not always work out for you. It is better to just reboot when you are done.
# Stop xenmgr so nobody use storage anymore: /etc/init.d/monit stop /etc/init.d/xenmgr stop umount /storage # Resize storage filesystem (shrink it to 100G): e2fsck -f /dev/xenclient/storage || exit 1 resize2fs /dev/xenclient/storage 100G || exit 1 # Make the storage lv 101G to be on the safe side: lvresize /dev/xenclient/storage -L101G # Remount storage and restart xenmgr: mount /storage /etc/init.d/xenmgr start # Make more space on root (10G): lvresize /dev/xenclient/root -L10G # Do the online resize in the background: resize2fs /dev/xenclient/root & # df will tell you live how big root is: df -h