[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [Fedora-xen] enlarge file backed filesystem

It's possible but not nice.

Obviously the first step is to back up your existing file before you try
any of this ....

First step is you need to enlarge the file itself.
Use dd to to this for example
dd if=/dev/zero of=myImage.img seek=***** bs=1M count=1

The seek value should be big enough to seek past the current data so we
don't overwrite anything - so for example make it a 2gb past the end of
the file.
You now have a larger sparse file.
At this point you have a larger disk but your partition table is out of
So you need to use a tool like parted/gparted to change the partition
table. You can also use fdisk if you're feeling brave.
These tools won't work directly on a file, so you'll need to create a
block device for that image, you can use kpartx for this, see the link

When you've enlarged the partition to the correct size then you'll need
to resize the ntfs file system - for this you'll need ntfsresize.

Good luck, don't forget the backup !


On Tue, 2006-11-07 at 06:04 -0600, Jeff wrote:
> I have created an xp domain and fc6 domain but I picked too small of 
> size for the image.
> My xp domain is using a physical device (logical volume) and my fc6 
> domain is using a file for the mapped disk.
> Isn't there a way to enlarge the filesystem of the guest by enlarging 
> the backing file/device?  If so, what exactly do you do to enlarge the 
> backing file/dev?
> ---
> Thanks,
> Jeff
> --
> Fedora-xen mailing list
> Fedora-xen redhat com
> https://www.redhat.com/mailman/listinfo/fedora-xen

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]