Theodore Tso tytso at MIT.EDU
Mon Mar 24 22:23:08 UTC 2008

On Mon, Mar 24, 2008 at 03:48:04PM -0400, John Nelson wrote:
> hi
> Why does resize2fs have to scan the whole partition when expanding? it 
> dosent do this when it shrinks

Resize2fs sometimes, when either expanding or shrinking a partition,
will need to scan the inode table so it can move blocks.  It may need
to do this if it is shrinking a partition, and there are files which
are using blocks at the end of partition which will no longer be
available at the end of the srhink operation, so it needs to scan the
inode tables to determine which inodes need to be updated as part of
moving the data blocks.

When resize2fs is expanding the filesystem, if the filesystem grows
enough that more blocks need to be reserved for the block group
descriptors, then similarly it will need to scan the inode table to
determine which inodes will need to be updated when moving blocks out
of the way so the block group descriptors can be expanded.


							- Ted

More information about the Ext3-users mailing list