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 Note: when kilobytes is used above, I mean real, power-of-2 kilobytes,
30 (i.e., 1024 bytes), which some politically correct folks insist should
31 be the stupid-sounding ``kibibytes''. The same holds true for
32 megabytes, also sometimes known as ``mebibytes'', or gigabytes, as the
33 amazingly silly ``gibibytes''. Makes you want to gibber, doesn't it?
34
35 The resize2fs program does not manipulate the size of partitions. If
36 you wish to enlarge a filesystem, you must make sure you can expand the
37 size of the underlying partition first. This can be done using
38 fdisk(8) by deleting the partition and recreating it with a larger size
39 or using lvextend(8), if you're using the logical volume manager
40 lvm(8). When recreating the partition, make sure you create it with
41 the same starting disk cylinder as before! Otherwise, the resize oper‐
42 ation will certainly not work, and you may lose your entire filesystem.
43 After running fdisk(8), run resize2fs to resize the ext2 filesystem to
44 use all of the space in the newly enlarged partition.
45
46 If you wish to shrink an ext2 partition, first use resize2fs to shrink
47 the size of filesystem. Then you may use fdisk(8) to shrink the size
48 of the partition. When shrinking the size of the partition, make sure
49 you do not make it smaller than the new size of the ext2 filesystem!
50
52 -d debug-flags
53 Turns on various resize2fs debugging features, if they have been
54 compiled into the binary. debug-flags should be computed by
55 adding the numbers of the desired features from the following
56 list:
57 2 - Debug block relocations
58 4 - Debug inode relocations
59 8 - Debug moving the inode table
60 16 - Print timing information
61 32 - Debug minimum filesystem size (-M) calculation
62
63 -f Forces resize2fs to proceed with the filesystem resize opera‐
64 tion, overriding some safety checks which resize2fs normally
65 enforces.
66
67 -F Flush the filesystem device's buffer caches before beginning.
68 Only really useful for doing resize2fs time trials.
69
70 -M Shrink the filesystem to the minimum size.
71
72 -p Prints out a percentage completion bars for each resize2fs oper‐
73 ation during an offline resize, so that the user can keep track
74 of what the program is doing.
75
76 -P Print the minimum size of the filesystem and exit.
77
78 -S RAID-stride
79 The resize2fs program will heuristically determine the RAID
80 stride that was specified when the filesystem was created. This
81 option allows the user to explicitly specify a RAID stride set‐
82 ting to be used by resize2fs instead.
83
85 The minimum size of the filesystem as estimated by resize2fs may be
86 incorrect, especially for filesystems with 1k and 2k blocksizes.
87
89 resize2fs was written by Theodore Ts'o <tytso@mit.edu>.
90
92 Resize2fs is Copyright 1998 by Theodore Ts'o and PowerQuest, Inc. All
93 rights reserved. As of April, 2000 Resize2fs may be redistributed
94 under the terms of the GPL.
95
97 fdisk(8), e2fsck(8), mke2fs(8), lvm(8), lvextend(8)
98
99
100
101E2fsprogs version 1.42.9 December 2013 RESIZE2FS(8)