Whamcloud - gitweb
debugfs: Fix format string warnings in htree_dump_leaf_node()
[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 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 or ext3 file systems.  It can be used to enlarge or
29 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 supports on-line resizing.  (As
33 of this writing, the Linux 2.6 kernel supports on-line resize for
34 filesystems mounted using ext3 only.).
35 .PP
36 The 
37 .I size
38 parameter specifies the requested new size of the filesystem.
39 If no units are specified, the units of the
40 .I size
41 parameter shall be the filesystem blocksize of the filesystem.
42 Optionally, the 
43 .I size
44 parameter may be suffixed by one of the following the units 
45 designators: 's', 'K', 'M', or 'G',
46 for 512 byte sectors, kilobytes, megabytes, or gigabytes, respectively.
47 The 
48 .I size
49 of the filesystem may never be larger than the size of the partition.
50 If 
51 .I size
52 parameter is not specified, it will default to the size of the partition.
53 .PP
54 The
55 .B resize2fs
56 program does not manipulate the size of partitions.  If you wish to enlarge
57 a filesystem, you must make sure you can expand the size of the
58 underlying partition first.  This can be done using 
59 .BR fdisk (8)
60 by deleting the partition and recreating it with a larger size or using
61 .BR lvextend (8),
62 if you're using the logical volume manager
63 .BR lvm (8).
64 When 
65 recreating the partition, make sure you create it with the same starting
66 disk cylinder as before!  Otherwise, the resize operation will 
67 certainly not work, and you may lose your entire filesystem.  
68 After running
69 .BR fdisk (8),
70 run resize2fs to resize the ext2 filesystem 
71 to use all of the space in the newly enlarged partition.
72 .PP
73 If you wish to shrink an ext2 partition, first use 
74 .B resize2fs
75 to shrink the size of filesystem.  Then you may use 
76 .BR fdisk (8)
77 to shrink the size of the partition.  When shrinking the size of 
78 the partition, make sure you do not make it smaller than the new size 
79 of the ext2 filesystem!
80 .SH OPTIONS
81 .TP
82 .B \-d \fIdebug-flags
83 Turns on various resize2fs debugging features, if they have been compiled 
84 into the binary.
85 .I debug-flags
86 should be computed by adding the numbers of the desired features 
87 from the following list:
88 .br
89 \       2\      \-\ Debug block relocations
90 .br
91 \       4\      \-\ Debug inode relocations
92 .br
93 \       8\      \-\ Debug moving the inode table
94 .TP 
95 .B \-f
96 Forces resize2fs to proceed with the filesystem resize operation, overriding 
97 some safety checks which resize2fs normally enforces.
98 .TP
99 .B \-F
100 Flush the filesystem device's buffer caches before beginning.  Only
101 really useful for doing 
102 .B resize2fs
103 time trials.
104 .TP
105 .B \-M
106 Shrink the filesystem to the minimum size.
107 .TP
108 .B \-p
109 Prints out a percentage completion bars for each
110 .B resize2fs
111 operation, so that the user can keep track of what
112 the program is doing.
113 .TP
114 .B \-P
115 Print the minimum size of the filesystem and exit.
116 .TP
117 .B \-S \fIRAID-stride
118 The
119 .B resize2fs
120 program will heuristically determine the RAID stride that was specified
121 when the filesystem was created.  This option allows the user to
122 explicitly specify a RAID stride setting to be used by resize2fs instead.
123 .SH KNOWN BUGS
124 The minimum size of the filesystem as estimated by resize2fs may be
125 incorrect, especially for filesystems with 1k and 2k blocksizes.
126 .SH AUTHOR
127 .B resize2fs
128 was written by Theodore Ts'o <tytso@mit.edu>.
129 .SH COPYRIGHT
130 Resize2fs is Copyright 1998 by Theodore Ts'o and PowerQuest, Inc.  All
131 rights reserved.  
132 As of April, 2000
133 .B Resize2fs
134 may be redistributed under the terms of the GPL.
135 .SH SEE ALSO
136 .BR fdisk (8),
137 .BR e2fsck (8),
138 .BR mke2fs (8),
139 .BR lvm (8), 
140 .BR lvextend (8)