Whamcloud - gitweb
main.c (main): Add the ability to specify units to the size
[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 .IR device .
33 The 
34 .I size
35 parameter specifies the requested new size of the filesystem.
36 If no units are specified, the units of the
37 .I size
38 parameter shall be the filesystem blocksize of the filesystem.
39 Optionally, the 
40 .I size
41 parameter may be suffixed by one of the following the units 
42 designators: 's', 'K', 'M', or 'G',
43 for 512 byte sectors, kilobytes, megabytes, or gigabytes, respectively.
44 The 
45 .I size
46 of the filesystem may never be larger than the size of the partition.
47 If 
48 .I size
49 parameter is not specified, it will default to the size of the partition.
50 .PP
51 The
52 .B resize2fs
53 program does not manipulate the size of partitions.  If you wish to enlarge
54 a filesystem, you must first make sure you can expand the size of the
55 underlying partition first.  This can be done using 
56 .BR fdisk (8)
57 by deleting the partition and recreating it with a larger size.  When 
58 recreating the partition, make sure you create it with the same starting
59 disk cylinder as before!  Otherwise, the resize operation will 
60 certainly not work, and you may lose your entire filesystem.
61 .PP
62 If you wish to shrink an ext2 partition, first use 
63 .B resize2fs
64 to shrink the size of filesystem.  Then you may use 
65 .BR fdisk (8)
66 to shrink the size of the partition.  When shrinking the size of 
67 the partition, make sure you do not make it smaller than the new size 
68 of the ext2 filesystem!
69 .SH OPTIONS
70 .TP
71 .I \-d debug-flags
72 Turns on various resize2fs debugging features, if they have been compiled 
73 into the binary.
74 .I debug-flags
75 should be computed by adding the numbers of the desired features 
76 from the following list:
77 .br
78 \       1\      \-\ Print out all disk I/O 
79 .br
80 \       2\      \-\ Debug block relocations
81 .br
82 \       8\      \-\ Debug inode relocations
83 .br
84 \       16\     \-\ Debug moving the inode table
85 .TP
86 .I \-p
87 Prints out a percentage completion bars for each 
88 .B resize2fs
89 operation, so that the user can keep track of what
90 the program is doing.
91 .TP 
92 .I \-f
93 Forces resize2fs to proceed with the filesystem resize operation, overriding 
94 some safety checks which resize2fs normally enforces.
95 .TP
96 .I \-F
97 Flush the filesystem device's buffer caches before beginning.  Only
98 really useful for doing 
99 .B resize2fs
100 time trials.
101 .SH AUTHOR
102 .B resize2fs
103 was written by Theodore Ts'o <tytso@mit.edu>.
104 .SH COPYRIGHT
105 Resize2fs is Copyright 1998 by Theodore Ts'o and PowerQuest, Inc.  All
106 rights reserved.  
107 As of April, 2000
108 .B Resize2fs
109 may be redistributed under the terms of the GPL.
110 .SH SEE ALSO
111 .BR fdisk (8),
112 .BR e2fsck (8),
113 .BR mke2fs (8)