[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] Increasing ext3 image file partition
From: |
Jerzy Grzegorek |
Subject: |
Re: [Qemu-discuss] Increasing ext3 image file partition |
Date: |
Sat, 11 Aug 2012 14:11:17 +0200 |
Dnia 11-08-2012 o godz. 4:46 address@hidden napisaĆ(a):
> On 11-08-2012 00:32, Jerzy Grzegorek wrote:
> >
> > Hi,
> >
> > I've 128M disk.img with one ext3 partition on it, created by qemu-img
> > create disk.img 128M command. Now, I'd like to increase this partition
> > to 256M. I ran
> >
> > qemu-img resize disk.img +128M
> >
> > and next
> >
> > parted disk.img
> >
> > (parted) resize 1 32K 256M
> >
> > and ...
> >
> > Error: /File system has/ an /incompatible feature/ enabled...
> >
> > Any idea how to resolve this?
> >
> > Jurek
> >
> >
> Yes, boot a virtual machine connected to the 256M disk image as a
> second virtual hard drive (or boot your usual virtual machine from
> a live CD such as the gparted live CD iso). Then from inside the
> virtual machine, use basic ext3 tools (such as tune2fs) to examine
> the partition, find out which option is in the way and turn it off,
> then resize the partition as you originally wanted.
>
>
> Enjoy
>
> Jakob
> --
> Jakob Bohm, CIO, Partner, WiseMo A/S. http://www.wisemo.com
> Transformervej 29, 2730 Herlev, Denmark. Direct +45 31 13 16 10
> This public discussion message is non-binding and may contain errors.
> WiseMo - Remote Service Management for PCs, Phones and Embedded
Thanks for your clarification.
It works but I had to use debugfs because tune2fs doesn't support ext_attr
option.
Other solution is (Ubuntu):
qemu-img resize disk.img +128M
sudo losetup /dev/loop0 disk.img
sudo losetup -o 32256 /dev/loop1 /dev/loop0
sudo e2fsck -f -y /dev/loop1
sudo debugfs -R "feature" /dev/loop1
sudo debugfs -w -R "feature -ext_attr -resize_inode -dir_index large_file"
/dev/loop1
sudo e2fsck -f -y /dev/loop1
sudo losetup -d /dev/loop1
sudo losetup -d /dev/loop0
parted disk.img
(parted) unit b
(parted) resize 1 32256 263208959
(parted) q
sudo losetup /dev/loop0 disk.img
sudo losetup -o 32256 /dev/loop1 /dev/loop0
sudo e2fsck -f -y /dev/loop1
sudo debugfs -w -R "feature ext_attr resize_inode dir_index -large_file"
/dev/loop1
sudo e2fsck -f -y /dev/loop1
sudo losetup -d /dev/loop1
sudo losetup -d /dev/loop0
Jurek