Howto: Resize Xen Loop Disk Image

Win4lin, KVM, QEMU, Virtualbox and Xen are all widely used technologies, used in virtual servers. Fairly often a virtual server run from within a loop filesystem and generally start with a fairly small file (1GB is big for a normal file, but not when it is pretending to be an entire filesystem!)

However things often grow over time.

Here is a nice simple procedure for increasing the size of a loop filesystem, if the filesystem is ext2 or ext3 (the procedure should work for ext4 too, but I havn’t tested it yet)

1. Stop the virtual server that is using the loop filesystem
2. Add some extra space to your loop filesystem file
# dd if=/dev/zero bs=1024k count=1024 >> loop_image_file

This adds 1GB to the end of a file called loop_image_file (make sure to use the append output redirector >> not a single >, otherwise you’ll have an empty 1GB file!)

3. Force a check on the resized/increased filesystem
# e2fsck -f loop_image_file

4. Resize the filesystem within the loop filesystem file
# resize2fs loop_image_file

5. Start the virtual server again

VN:F [1.8.5_1061]
Rating: 10.0/10 (1 vote cast)

Related posts:

  1. Migrate existing Ext3 filesystems to Ext4
  2. Howto: How to Reset the MySQL Root Password
  3. Xen Howto: Install Windows
  4. How to mount bin / cue image files in Linux
  5. Howto Install Windows XP / Vista on Xen
  6. How to Mount a Remote Filesystem Using SSH and sshfs
  7. Importing / Exporting Virtual Disk Images with Virtual Box
  8. Ubuntu Howto: Install Xen
  9. Ubuntu Server Edition JeOS
  10. Installing Xen on Debian Etch 4.0

Comments (5)

Convert from VMWare To VirtualBox

Switching From VMWare To VirtualBox: .vmdk To .vdi Using Qemu + VdiTool – Ubuntu Wiki

# Switching From VMWare To VirtualBox: .vmdk To .vdi Using Qemu + VdiTool

VN:F [1.8.5_1061]
Rating: 0.0/10 (0 votes cast)

Related posts:

  1. The VMware house of cards
  2. Seamless Windows Applications on Ubuntu Linux Using VirtualBox
  3. Howto: Resize Xen Loop Disk Image
  4. VMware Killer: Xen With Graphical User Interface On A Fedora 7 Desktop
  5. Ubuntu Howto: Install Xen
  6. Howto Access via ssh a Virtualbox Guest machine
  7. Top 10 Downloads for Ubuntu 9.04
  8. Ubuntu Netboot and Netinstall with PXE
  9. Ubuntu Studio
  10. Convert/Import from PDF and Keep the Formatting

Comments