1RESIZE2FS(8) System Manager's Manual RESIZE2FS(8)
2
3
4
6 resize2fs - ext2/ext3/ext4 file system resizer
7
9 resize2fs [ -fFpPM ] [ -d debug-flags ] [ -S RAID-stride ] device [
10 size ]
11
13 The resize2fs program will resize ext2, ext3, or ext4 file systems. It
14 can be used to enlarge or shrink an unmounted file system located on
15 device. If the filesystem is mounted, it can be used to expand the
16 size of the mounted filesystem, assuming the kernel supports on-line
17 resizing. (As of this writing, the Linux 2.6 kernel supports on-line
18 resize for filesystems mounted using ext3 and ext4.).
19
20 The size parameter specifies the requested new size of the filesystem.
21 If no units are specified, the units of the size parameter shall be the
22 filesystem blocksize of the filesystem. Optionally, the size parameter
23 may be suffixed by one of the following the units designators: 's',
24 'K', 'M', or 'G', for 512 byte sectors, kilobytes, megabytes, or giga‐
25 bytes, respectively. The size of the filesystem may never be larger
26 than the size of the partition. If size parameter is not specified, it
27 will default to the size of the partition.
28
29 The resize2fs program does not manipulate the size of partitions. If
30 you wish to enlarge a filesystem, you must make sure you can expand the
31 size of the underlying partition first. This can be done using
32 fdisk(8) by deleting the partition and recreating it with a larger size
33 or using lvextend(8), if you're using the logical volume manager
34 lvm(8). When recreating the partition, make sure you create it with
35 the same starting disk cylinder as before! Otherwise, the resize oper‐
36 ation will certainly not work, and you may lose your entire filesystem.
37 After running fdisk(8), run resize2fs to resize the ext2 filesystem to
38 use all of the space in the newly enlarged partition.
39
40 If you wish to shrink an ext2 partition, first use resize2fs to shrink
41 the size of filesystem. Then you may use fdisk(8) to shrink the size
42 of the partition. When shrinking the size of the partition, make sure
43 you do not make it smaller than the new size of the ext2 filesystem!
44
46 -d debug-flags
47 Turns on various resize2fs debugging features, if they have been
48 compiled into the binary. debug-flags should be computed by
49 adding the numbers of the desired features from the following
50 list:
51 2 - Debug block relocations
52 4 - Debug inode relocations
53 8 - Debug moving the inode table
54
55 -f Forces resize2fs to proceed with the filesystem resize opera‐
56 tion, overriding some safety checks which resize2fs normally
57 enforces.
58
59 -F Flush the filesystem device's buffer caches before beginning.
60 Only really useful for doing resize2fs time trials.
61
62 -M Shrink the filesystem to the minimum size.
63
64 -p Prints out a percentage completion bars for each resize2fs oper‐
65 ation, so that the user can keep track of what the program is
66 doing.
67
68 -P Print the minimum size of the filesystem and exit.
69
70 -S RAID-stride
71 The resize2fs program will heuristically determine the RAID
72 stride that was specified when the filesystem was created. This
73 option allows the user to explicitly specify a RAID stride set‐
74 ting to be used by resize2fs instead.
75
77 The minimum size of the filesystem as estimated by resize2fs may be
78 incorrect, especially for filesystems with 1k and 2k blocksizes.
79
81 resize2fs was written by Theodore Ts'o <tytso@mit.edu>.
82
84 Resize2fs is Copyright 1998 by Theodore Ts'o and PowerQuest, Inc. All
85 rights reserved. As of April, 2000 Resize2fs may be redistributed
86 under the terms of the GPL.
87
89 fdisk(8), e2fsck(8), mke2fs(8), lvm(8), lvextend(8)
90
91
92
93E2fsprogs version 1.41.12 May 2010 RESIZE2FS(8)