growing filesystem image files

Net Llama! netllama
Fri Dec 3 15:01:46 PST 2004


I've got some ext2 and ext3 filesystem images with RH-7.3 in them.  I'm 
trying to grow them non-destructively by 500M, and i'm getting 
undesirable results.

Here are the steps i'm taking:
dd if=/dev/zero bs=1M count=500 >> filesystem.iso
resize2fs -p -f `du filesystem.iso| awk "{print $1}"`

While this seems to work, i always end up with a file that is completely 
corrupted when i try to mount it loop back.

Anyone done this successfully before?  I only need it for ext2 and ext3. 
  thanks.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
L. Friedman                       	       netllama at linux-sxs.org
Linux Step-by-step & TyGeMo: 		    http://netllama.ipfox.com

  15:55:01 up 96 days,  6:37,  8 users,  load average: 1.06, 1.19, 1.10


More information about the Linux-users mailing list