User Tools

Site Tools


resize_increase_the_size_of_a_file_based_domu_xen_filesystem

Resize/Increase_the_Size_of_a_File_Based_DomU_Xen_Filesystem

Background

File based Images are sometimes used as a quick method to getting a DomU guest Xen up and running. LVM is the production method allowing for simple resizing. File based Images however, can be increased in size.

Method

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


That should be it all ok. It is a very fast method. It would be possible to simply mount the old image, and mount a newly created larger image and to copy across everything manually, however the above should work fine.

Reference: http://jailtime.org/howto:filesystem

resize_increase_the_size_of_a_file_based_domu_xen_filesystem.txt · Last modified: 2022/07/19 21:13 by 127.0.0.1