Skip to content

Instantly share code, notes, and snippets.

@cocoy
Created April 15, 2011 06:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cocoy/921226 to your computer and use it in GitHub Desktop.
Save cocoy/921226 to your computer and use it in GitHub Desktop.
Resize/Increase the Size of a File Based DomU Xen Filesystem
Backup the File based image firstly, making sure it is not mounted nor running as a xen domU.
dd if=/dev/zero of=file.img bs=1M conv=notrunc count=1 seek=2000
#This resizes the file.img to 2GB.
losetup /dev/loop1 file.img
#loop1 had to be used as xen was already running a different domU via loop0.
e2fsck -f /dev/loop1
resize2fs /dev/loop1
e2fsck -f /dev/loop1
losetup -d /dev/loop1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment