Date: Wed, 3 Feb 1999 10:01:57 -0500 (EST)
   From: Scott Smyth <[EMAIL PROTECTED]>

   Our group is wondering about the feasibility of expanding the
   filesystem (ext2fs).  For instance, if we export a block device
   over the network, we can use the linear RAID to expand the
   device, but are there utilities or safe means to expand the
   filesystem.  Is it safe or even possible to alter the superblock
   of produce a new filesystem size?  Could you explain the steps
   you would have to take to do such a thing?  What are other
   possible routes?

I have written a program that does exactly this.  It allows you to
expand or shrink an existing ext2 filesystem, and it's called resize2fs.
However, you have to purchase the current version of Partition Magic in
order get a copy of that program, as it was developed under contract for
Powerquest.  This will get you a version of Partition Magic which can
operate on ext2 filesystems, but which runs under Windows or Windows
NT.  It will also get you a linux binary for the resize2fs program
(packaged in an RPM) which you can use on your Unix system.

The Partition Magic program will handle editing the partition table for
you, and possibly relocating the blocks of the filesystem if you wish to
move a partition or change the starting boundary of the ext2 partition.
However, it will not handle md (RAID) devices.

The resize2fs program does not require Windows or Windows NT, but it
does not handle partition table issues.  You have to edit the partition
table either before you run resize2fs or after you run resize2fs,
depending on whether you are enlarging or shrinking the filesystem.
Resize2fs also doesn't handle moving a partition or changing its
starting location; it will only resize an ext2 partition keeping the
starting block constant and changing the last block used by the
filesystem.  Resize2fs will work on any Linux block device, including
the MD devices, so that's what you'll want to use.

When I negotiated my contract with Powerquest, we agreed that roughly a
year from now, the sources for resize2fs will be released under the GPL.
If you really badly want to use resize2fs before the year is up, you'll
have to purchase a copy of PartitionMagic; or if you want to save
yourselves $50 bucks, you can wait until the GPL'ed version of resize2fs
becomes available.  (BTW, Partition Magic is a really good product; I
heartily recommend it if you need to deal with both Linux and DOS or
NTFS filesystems on the same disk.)

                                                - Ted

Reply via email to