...
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.
Here it is as a script
Code Block | ||
---|---|---|
| ||
#!/bin/bash # 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 |