Linux "resize2fs" Command Line Options and Examples
ext2/ext3/ext4 file system resizer

The resize2fs program will resize ext2, ext3, or ext4 file systems. It can be used to enlarge or shrink an unmounted file system located on device. If the filesystem is mounted, it can be used to expand the size of the mounted filesystem, assuming the kernel and the file system supports on-line resizing.


Usage:

resize2fs [ -fFpPMbs ] [ -d debug-flags ] [ -S RAID-stride ] [ -z undo_file ] device [ size ]






Command Line Options:

-d
Turns on various resize2fs debugging features, if they have been compiled into the binary. debug-flagsshould be computed by adding the numbers of the desired features from the following list:
resize2fs -d ...
-
Debug block relocations
resize2fs - ...
-s
Turns off the 64bit feature and frees blocks that are no longer in use.
resize2fs -s ...
-S
The resize2fs program will heuristically determine the RAID stride that was specified when the filesys‐tem was created. This option allows the user to explicitly specify a RAID stride setting to be used byresize2fs instead.
resize2fs -S ...
-z
Before overwriting a file system block, write the old contents of the block to an undo file. This undofile can be used with e2undo(8) to restore the old contents of the file system should something gowrong. If the empty string is passed as the undo_file argument, the undo file will be written to afile named resize2fs-device.e2undo in the directory specified via the E2FSPROGS_UNDO_DIR environmentvariable.WARNING: The undo file cannot be used to recover from a power or system crash.KNOWN BUGSThe minimum size of the filesystem as estimated by resize2fs may be incorrect, especially for filesystems with1k and 2k blocksizes.AUTHORresize2fs was written by Theodore Ts'o <tytso@mit.edu>.COPYRIGHTResize2fs is Copyright 1998 by Theodore Ts'o and PowerQuest, Inc. All rights reserved. As of April, 2000Resize2fs may be redistributed under the terms of the GPL.
resize2fs -z ...