Whamcloud - gitweb
resize2fs.8.in: clarify when on-line resizing is supported
[tools/e2fsprogs.git] / resize / resize2fs.8.in
1 .\" -*- nroff -*-
2 .\" Copyright 1997 by Theodore Ts'o.  All Rights Reserved.
3 .\" 
4 .\" .TH RESIZE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
5 .TH RESIZE2FS 8 "@E2FSPROGS_MONTH@ @E2FSPROGS_YEAR@" "E2fsprogs version @E2FSPROGS_VERSION@"
6 .SH NAME
7 resize2fs \- ext2/ext3/ext4 file system resizer
8 .SH SYNOPSIS
9 .B resize2fs
10 [
11 .B \-fFpPM
12 ]
13 [
14 .B \-d
15 .I debug-flags
16 ]
17 [
18 .B \-S
19 .I RAID-stride
20 ]
21 .I device
22 [
23 .I size
24 ]
25 .SH DESCRIPTION
26 The
27 .B resize2fs
28 program will resize ext2, ext3, or ext4 file systems.  It can be used to
29 enlarge or shrink an unmounted file system located on
30 .IR device .
31 If the filesystem is mounted, it can be used to expand the size of the
32 mounted filesystem, assuming the kernel and the file system supports
33 on-line resizing.  (Modern Linux 2.6 kernels will support on-line resize
34 for file systems mounted using ext3 and ext4; ext3 file systems will
35 require the use of file systems with the resize_inode feature enabled.)
36 .PP
37 The
38 .I size
39 parameter specifies the requested new size of the filesystem.
40 If no units are specified, the units of the
41 .I size
42 parameter shall be the filesystem blocksize of the filesystem.
43 Optionally, the
44 .I size
45 parameter may be suffixed by one of the following the units
46 designators: 's', 'K', 'M', or 'G',
47 for 512 byte sectors, kilobytes, megabytes, or gigabytes, respectively.
48 The
49 .I size
50 of the filesystem may never be larger than the size of the partition.
51 If
52 .I size
53 parameter is not specified, it will default to the size of the partition.
54 .PP
55 Note: when kilobytes is used above, I mean
56 .IR real ,
57 power-of-2 kilobytes, (i.e., 1024 bytes), which some politically correct
58 folks insist should be the stupid-sounding ``kibibytes''.  The same
59 holds true for megabytes, also sometimes known as ``mebibytes'', or
60 gigabytes, as the amazingly silly ``gibibytes''.  Makes you want to
61 gibber, doesn't it?
62 .PP
63 The
64 .B resize2fs
65 program does not manipulate the size of partitions.  If you wish to enlarge
66 a filesystem, you must make sure you can expand the size of the
67 underlying partition first.  This can be done using
68 .BR fdisk (8)
69 by deleting the partition and recreating it with a larger size or using
70 .BR lvextend (8),
71 if you're using the logical volume manager
72 .BR lvm (8).
73 When
74 recreating the partition, make sure you create it with the same starting
75 disk cylinder as before!  Otherwise, the resize operation will
76 certainly not work, and you may lose your entire filesystem.
77 After running
78 .BR fdisk (8),
79 run resize2fs to resize the ext2 filesystem
80 to use all of the space in the newly enlarged partition.
81 .PP
82 If you wish to shrink an ext2 partition, first use
83 .B resize2fs
84 to shrink the size of filesystem.  Then you may use
85 .BR fdisk (8)
86 to shrink the size of the partition.  When shrinking the size of
87 the partition, make sure you do not make it smaller than the new size
88 of the ext2 filesystem!
89 .SH OPTIONS
90 .TP
91 .B \-d \fIdebug-flags
92 Turns on various resize2fs debugging features, if they have been compiled
93 into the binary.
94 .I debug-flags
95 should be computed by adding the numbers of the desired features
96 from the following list:
97 .br
98         2       \-\ Debug block relocations
99 .br
100         4       \-\ Debug inode relocations
101 .br
102         8       \-\ Debug moving the inode table
103 .br
104         16      \-\ Print timing information
105 .br
106         32      \-\ Debug minimum filesystem size (\-M) calculation
107 .TP
108 .B \-f
109 Forces resize2fs to proceed with the filesystem resize operation, overriding
110 some safety checks which resize2fs normally enforces.
111 .TP
112 .B \-F
113 Flush the filesystem device's buffer caches before beginning.  Only
114 really useful for doing
115 .B resize2fs
116 time trials.
117 .TP
118 .B \-M
119 Shrink the filesystem to the minimum size.
120 .TP
121 .B \-p
122 Prints out a percentage completion bars for each
123 .B resize2fs
124 operation during an offline resize, so that the user can keep track
125 of what the program is doing.
126 .TP
127 .B \-P
128 Print the minimum size of the filesystem and exit.
129 .TP
130 .B \-S \fIRAID-stride
131 The
132 .B resize2fs
133 program will heuristically determine the RAID stride that was specified
134 when the filesystem was created.  This option allows the user to
135 explicitly specify a RAID stride setting to be used by resize2fs instead.
136 .SH KNOWN BUGS
137 The minimum size of the filesystem as estimated by resize2fs may be
138 incorrect, especially for filesystems with 1k and 2k blocksizes.
139 .SH AUTHOR
140 .B resize2fs
141 was written by Theodore Ts'o <tytso@mit.edu>.
142 .SH COPYRIGHT
143 Resize2fs is Copyright 1998 by Theodore Ts'o and PowerQuest, Inc.  All
144 rights reserved.
145 As of April, 2000
146 .B Resize2fs
147 may be redistributed under the terms of the GPL.
148 .SH SEE ALSO
149 .BR fdisk (8),
150 .BR e2fsck (8),
151 .BR mke2fs (8),
152 .BR lvm (8),
153 .BR lvextend (8)