'\" te .\" Copyright (c) 2009, Sun Microsystems, Inc. .\" All Rights Reserved .\" 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. .\" 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. .\" 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] .TH GROWFS 8 "Apr 20, 2009" .SH NAME growfs \- non-destructively expand a UFS file system .SH SYNOPSIS .LP .nf \fB/usr/sbin/growfs\fR [\fB-M\fR \fImount-point\fR] [\fInewfs-options\fR] [\fIraw-device\fR] .fi .SH DESCRIPTION .LP \fBgrowfs\fR non-destructively expands a mounted or unmounted UNIX file system (UFS) to the size of the file system's slice(s). .sp .LP Typically, disk space is expanded by first adding a slice to a metadevice, then running the \fBgrowfs\fR command. When adding space to a mirror, you expand each submirror before expanding the file system. .sp .LP \fBgrowfs\fR will ``write-lock'' (see \fBlockfs\fR(8)) a mounted file system when expanding. The length of time the file system is write-locked can be shortened by expanding the file system in stages. For instance, to expand a 1 Gbyte file system to 2 Gbytes, the file system can be grown in 16 Mbyte stages using the \fB-s\fR option to specify the total size of the new file system at each stage. The argument for \fB-s\fR is the number of sectors, and must be a multiple of the cylinder size. Note: The file system cannot be grown if a cylinder size of less than 2 is specified. Refer to the \fBnewfs\fR(8) man page for information on the options available when growing a file system. .sp .LP \fBgrowfs\fR displays the same information as \fBmkfs\fR during the expansion of the file system. .sp .LP If \fBgrowfs\fR is aborted, recover any lost free space by unmounting the file system and running the \fBfsck\fR command, or run the \fBgrowfs\fR command again. .sp .LP \fBNote:\fR If \fBgrowfs\fR is aborted and the file system is used before \fBfsck\fR is run on it, UFS metadata might be left in an incomplete state, with the result that the file system would be corrupted. In such a circumstance, you would have to restore the file system from backups. .SH OPTIONS .LP Root privileges are required for all of the following options. .sp .ne 2 .na \fB\fB-M\fR \fImount-point\fR\fR .ad .RS 18n The file system to be expanded is mounted on \fImount-point\fR. File system locking (\fBlockfs\fR) will be used. .RE .sp .ne 2 .na \fB\fInewfs-options\fR\fR .ad .RS 18n The options are documented in the \fBnewfs\fR man page. .RE .sp .ne 2 .na \fB\fIraw-device\fR\fR .ad .RS 18n Specifies the name of a raw metadevice or raw special device, residing in \fB/dev/md/rdsk\fR, or \fB/dev/rdsk\fR, respectively, including the disk slice, where you want the file system to be grown. .RE .SH EXIT STATUS .LP The following exit values are returned: .sp .ne 2 .na \fB\fB0\fR\fR .ad .RS 6n Successful completion. .RE .sp .ne 2 .na \fB\fB>0\fR\fR .ad .RS 6n An error occurred. .RE .SH SEE ALSO .LP .BR attributes (7), .BR fsck (8), .BR lockfs (8), .BR mkfs (8), .BR newfs (8) .SH LIMITATIONS .LP Only UFS file systems (either mounted or unmounted) can be expanded using the \fBgrowfs\fR command. Once a file system is expanded, it cannot be decreased in size. The following conditions prevent you from expanding file systems: When \fBacct\fR is activated and the accounting file is on the target device. When C2 security is activated and the logging file is on the target file system. When there is a local \fBswap\fR file in the target file system. When the file system is root (\fB/\fR), \fB/usr\fR, or \fBswap\fR.