8980 BIOS clock is sometimes one hour fast
[unleashed.git] / usr / src / man / man1m / growfs.1m
blob4421fa12ed7d0e98a6302f8ca128db37880e33ad
1 '\" te
2 .\" Copyright (c) 2009, Sun Microsystems, Inc.
3 .\"  All Rights Reserved
4 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
5 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
6 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
7 .TH GROWFS 1M "Apr 20, 2009"
8 .SH NAME
9 growfs \- non-destructively expand a UFS file system
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fB/usr/sbin/growfs\fR [\fB-M\fR \fImount-point\fR] [\fInewfs-options\fR]
14      [\fIraw-device\fR]
15 .fi
17 .SH DESCRIPTION
18 .LP
19 \fBgrowfs\fR non-destructively expands a mounted or unmounted UNIX file system
20 (UFS) to the size of the file system's slice(s).
21 .sp
22 .LP
23 Typically, disk space is expanded by first adding a slice to a metadevice, then
24 running the \fBgrowfs\fR command. When adding space to a mirror, you expand
25 each submirror before expanding the file system.
26 .sp
27 .LP
28 \fBgrowfs\fR will ``write-lock'' (see \fBlockfs\fR(1M)) a mounted file system
29 when expanding. The length of time the file system is write-locked can be
30 shortened by expanding the file system in stages. For instance, to expand a 1
31 Gbyte file system to 2 Gbytes, the file system can be grown in 16 Mbyte stages
32 using the \fB-s\fR option to specify the total size of the new file system at
33 each stage. The argument for \fB-s\fR is the number of sectors, and must be a
34 multiple of the cylinder size. Note: The file system cannot be grown if a
35 cylinder size of less than 2 is specified. Refer to the \fBnewfs\fR(1M) man
36 page for information on the options available when growing a file system.
37 .sp
38 .LP
39 \fBgrowfs\fR displays the same information as \fBmkfs\fR during the expansion
40 of the file system.
41 .sp
42 .LP
43 If \fBgrowfs\fR is aborted, recover any lost free space by unmounting the file
44 system and running the \fBfsck\fR command, or run the \fBgrowfs\fR command
45 again.
46 .sp
47 .LP
48 \fBNote:\fR If \fBgrowfs\fR is aborted and the file system is used before
49 \fBfsck\fR is run on it, UFS metadata might be left in an incomplete state,
50 with the result that the file system would be corrupted. In such a
51 circumstance, you would have to restore the file system from backups.
52 .SH OPTIONS
53 .LP
54 Root privileges are required for all of the following options.
55 .sp
56 .ne 2
57 .na
58 \fB\fB-M\fR \fImount-point\fR\fR
59 .ad
60 .RS 18n
61 The file system to be expanded is mounted on \fImount-point\fR. File system
62 locking (\fBlockfs\fR) will be used.
63 .RE
65 .sp
66 .ne 2
67 .na
68 \fB\fInewfs-options\fR\fR
69 .ad
70 .RS 18n
71 The options are documented in the \fBnewfs\fR man page.
72 .RE
74 .sp
75 .ne 2
76 .na
77 \fB\fIraw-device\fR\fR
78 .ad
79 .RS 18n
80 Specifies the name of a raw metadevice or raw special device, residing in
81 \fB/dev/md/rdsk\fR, or \fB/dev/rdsk\fR, respectively, including the disk slice,
82 where you want the file system to be grown.
83 .RE
85 .SH EXIT STATUS
86 .LP
87 The following exit values are returned:
88 .sp
89 .ne 2
90 .na
91 \fB\fB0\fR\fR
92 .ad
93 .RS 6n
94 Successful completion.
95 .RE
97 .sp
98 .ne 2
99 .na
100 \fB\fB>0\fR\fR
102 .RS 6n
103 An error occurred.
106 .SH SEE ALSO
108 \fBfsck\fR(1M), \fBlockfs\fR(1M), \fBmkfs\fR(1M), \fBnewfs\fR(1M),
109 \fBattributes\fR(5)
110 .SH LIMITATIONS
112 Only UFS file systems (either mounted or unmounted) can be expanded using the
113 \fBgrowfs\fR command. Once a file system is expanded, it cannot be decreased in
114 size. The following conditions prevent you from expanding file systems: When
115 \fBacct\fR is activated and the accounting file is on the target device. When
116 C2 security is activated and the logging file is on the target file system.
117 When there is a local \fBswap\fR file in the target file system. When the file
118 system is root (\fB/\fR), \fB/usr\fR, or \fBswap\fR.