Whamcloud - gitweb
Many files:
[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 file system resizer
8 .SH SYNOPSIS
9 .B resize2fs
10 [
11 .B \-d 
12 .I debug-flags
13 ]
14 [
15 .B \-f
16 ]
17 [
18 .B \-F
19 ]
20 [
21 .B \-p
22 ]
23 .I device
24 [
25 .I size
26 ]
27 .SH DESCRIPTION
28 The 
29 .B resize2fs 
30 program will resize ext2 file systems.  It can be used to enlarge or
31 shrink an ext2 file system located on
32 .I device 
33 so that it will have 
34 .I size 
35 blocks.
36 If the
37 .I size
38 parameter is not specified, it will default to the size of the partition.
39 The 
40 .I size
41 parameter may never be larger than the size of the partition.
42 .PP
43 The
44 .B resize2fs
45 program does not manipulate the size of partitions.  If you wish to enlarge
46 a filesystem, you must first make sure you can expand the size of the
47 underlying partition first.  This can be done using 
48 .BR fdisk (8)
49 by deleting the partition and recreating it with a larger size.  When 
50 recreating the partition, make sure you create it with the same starting
51 disk cylinder as before!  Otherwise, the resize operation will 
52 certainly not work, and you may lose your entire filesystem.
53 .PP
54 If you wish to shrink the an ext2 partition, first use 
55 .B resize2fs
56 to shrink the size of filesystem.  Then you may use 
57 .BR fdisk (8)
58 to shrink the size of the partition.  When shrinking the size of 
59 the partition, make sure you do not make it smaller than the new size 
60 of the ext2 filesystem!
61 .SH OPTIONS
62 .TP
63 .I \-d debug-flags
64 Turns on various resize2fs debugging features, if they have been compiled 
65 into the binary.
66 .I debug-flags
67 should be computed by adding the numbers of the desired features 
68 from the following list:
69 .br
70 \       1\      \-\ Print out all disk I/O 
71 .br
72 \       2\      \-\ Debug block relocations
73 .br
74 \       8\      \-\ Debug inode relocations
75 .br
76 \       16\     \-\ Debug moving the inode table
77 .TP
78 .I \-p
79 Prints out a percentage completion bars for each 
80 .B resize2fs
81 operation, so that the user can keep track of what
82 the program is doing.
83 .TP 
84 .I \-f
85 Forces resize2fs to proceed with the filesystem resize operation, overriding 
86 some safety checks which resize2fs normally enforces.
87 .TP
88 .I \-F
89 Flush the filesystem device's buffer caches before beginning.  Only
90 really useful for doing 
91 .B resize2fs
92 time trials.
93 .SH AUTHOR
94 .B resize2fs
95 was written by Theodore Ts'o <tytso@mit.edu>.
96 .SH COPYRIGHT
97 Resize2fs is Copyright 1998 by Theodore Ts'o and PowerQuest, Inc.  All
98 rights reserved.  
99 As of April, 2000
100 .B Resize2fs
101 may be redistributed under the terms of the GPL.
102 .SH SEE ALSO
103 .BR fdisk (8),
104 .BR e2fsck (8),
105 .BR mke2fs (8)