1RESIZE2FS(8) System Manager's Manual RESIZE2FS(8)
2
3
4
6 resize2fs - ext2/ext3 file system resizer
7
9 resize2fs [ -d debug-flags ] [ -S RAID-stride ] [ -f ] [ -F ] [ -p ]
10 device [ size ]
11
13 The resize2fs program will resize ext2 or ext3 file systems. It can be
14 used to enlarge or shrink an unmounted file system located on device.
15 If the filesystem is mounted, it can be used to expand the size of the
16 mounted filesystem, assuming the kernel supports on-line resizing. (As
17 of this writing, the Linux 2.6 kernel supports on-line resize for
18 filesystems mounted using ext3 only.).
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 first make sure you can
31 expand the size of the underlying partition first. This can be done
32 using fdisk(8) by deleting the partition and recreating it with a
33 larger size or using lvextend(8), if you're using the logical volume
34 manager lvm(8). When recreating the partition, make sure you create it
35 with the same starting disk cylinder as before! Otherwise, the resize
36 operation will certainly not work, and you may lose your entire
37 filesystem. After running fdisk(8), run resize2fs to resize the ext2
38 filesystem to 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 1 - Print out all disk I/O
52 2 - Debug block relocations
53 8 - Debug inode relocations
54 16 - Debug moving the inode table
55
56 -S RAID-stride
57 The resize2fs program will heuristically determine the RAID
58 stride that was specified when the filesystem was created. This
59 option allows the user to explicitly specify a RAID stride set‐
60 ting to be used by resize2fs instead.
61
62 -p Prints out a percentage completion bars for each resize2fs oper‐
63 ation, so that the user can keep track of what the program is
64 doing.
65
66 -f Forces resize2fs to proceed with the filesystem resize opera‐
67 tion, overriding some safety checks which resize2fs normally
68 enforces.
69
70 -F Flush the filesystem device's buffer caches before beginning.
71 Only really useful for doing resize2fs time trials.
72
74 resize2fs was written by Theodore Ts'o <tytso@mit.edu>.
75
77 Resize2fs is Copyright 1998 by Theodore Ts'o and PowerQuest, Inc. All
78 rights reserved. As of April, 2000 Resize2fs may be redistributed
79 under the terms of the GPL.
80
82 fdisk(8), e2fsck(8), mke2fs(8), lvm(8), lvextend(8)
83
84
85
86E2fsprogs version 1.40.2 July 2007 RESIZE2FS(8)