Re: Loop fs expand

From: Michele Andreoli (m.andreoli@tin.it)
Date: Tue Mar 19 2002 - 18:58:34 CET


On Tue, Mar 19, 2002 at 03:22:05PM +0100, Manuel Garcia Rodriguez nicely wrote:
> Hi.
>
> I've choosed LOOP+EXT2 cloning, partition size is 20
> MB. Can I increase this size with any ext2fs tool,
> without loosing data?

There is a, simple, better method:

create your new loopfs (40M)
# dd if=/dev/zero of=/tmp/new.img bs=1k count=40000

mount new
# mkdir /tmp/dest
# mount -o loop new.img /tmp/dest -t ext2

mount old loopfs image
# mount -o loop old.img /mnt -t ext2

copy old on new
# cp -a /mnt/* /tmp/dest
# umount /tmp/dest /mnt

Now, you have a a new bigger loopfs image.
Hope this helps.

Michele

-- 
I keep trying to locate a meeting of Quantum Physicists. But everytime
they set a meeting time, the location changes. And vice versa -- Anonymous
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.dk
For additional commands, e-mail: mulinux-help@sunsite.dk


This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:21 CET