xref: /illumos-gate/usr/src/man/man8/growfs.8 (revision 37e2cd25d56b334a2403f2540a0b0a1e6a40bcd1)
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]
GROWFS 8 "Apr 20, 2009"
NAME
growfs - non-destructively expand a UFS file system
SYNOPSIS

/usr/sbin/growfs [-M mount-point] [newfs-options]
 [raw-device]
DESCRIPTION

growfs non-destructively expands a mounted or unmounted UNIX file system (UFS) to the size of the file system's slice(s).

Typically, disk space is expanded by first adding a slice to a metadevice, then running the growfs command. When adding space to a mirror, you expand each submirror before expanding the file system.

growfs will ``write-lock'' (see lockfs(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 -s option to specify the total size of the new file system at each stage. The argument for -s 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 newfs(8) man page for information on the options available when growing a file system.

growfs displays the same information as mkfs during the expansion of the file system.

If growfs is aborted, recover any lost free space by unmounting the file system and running the fsck command, or run the growfs command again.

Note: If growfs is aborted and the file system is used before fsck 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.

OPTIONS

Root privileges are required for all of the following options. -M mount-point

The file system to be expanded is mounted on mount-point. File system locking (lockfs) will be used.

newfs-options

The options are documented in the newfs man page.

raw-device

Specifies the name of a raw metadevice or raw special device, residing in /dev/md/rdsk, or /dev/rdsk, respectively, including the disk slice, where you want the file system to be grown.

EXIT STATUS

The following exit values are returned: 0

Successful completion.

>0

An error occurred.

SEE ALSO

attributes (7), fsck (8), lockfs (8), mkfs (8), newfs (8)

LIMITATIONS

Only UFS file systems (either mounted or unmounted) can be expanded using the growfs command. Once a file system is expanded, it cannot be decreased in size. The following conditions prevent you from expanding file systems: When acct 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 swap file in the target file system. When the file system is root (/), /usr, or swap.