size of uec images

Scott Moser smoser at ubuntu.com
Thu Oct 8 13:55:26 BST 2009


On Thu, 8 Oct 2009, Soren Hansen wrote:

> On Wed, Oct 07, 2009 at 11:35:58PM -0400, Scott Moser wrote:
> > Essentially, something like:
> >    truncate "--size=$new_size" "$new_image"
> >    mke2fs -j $new_image
> >    sudo mount -o loop,ro "${old_image}" /mnt/tmp1
> >    sudo mount -o loop "${new_image}" /mnt/tmp2
> >    rsync -a /mnt/tmp1/ /mnt/tmp2
> >    sudo umount /mnt/tmp1
> >    sudo umount /mnt/tmp2
>
> Why not just:
>   truncate --size="${new_size}" "${img}"
>   resize2fs "${img}"

The advantage was really in the making of a new filesystem in the 10G
image versus resizing the 2G up to 10.  I was afraid that actual use of a
2G fs resized to 10G might run out of inodes.  Entirely guesswork on my
part.

Both scripts are written and attached to bug 439868.



More information about the ubuntu-devel mailing list