92 lines
3.3 KiB
Groff
92 lines
3.3 KiB
Groff
.\" $NetBSD: resize_lfs.8,v 1.2 2005/04/25 11:47:37 wiz Exp $
|
|
.\"
|
|
.\" Copyright (c) 2005 The NetBSD Foundation, Inc.
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" This code is derived from software contributed to The NetBSD Foundation
|
|
.\" by Konrad E. Schroder <perseant@hhhh.org>.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by the NetBSD
|
|
.\" Foundation, Inc. and its contributors.
|
|
.\" 4. Neither the name of The NetBSD Foundation nor the names of its
|
|
.\" contributors may be used to endorse or promote products derived
|
|
.\" from this software without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
.\"
|
|
.Dd April 20, 2005
|
|
.Dt RESIZE_LFS 8
|
|
.Sh NAME
|
|
.Nm resize_lfs
|
|
.Nd resize a mounted log-structured filesystem
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Fl v
|
|
.Op Fl n Ar new-size
|
|
.Ar mounted-file-system
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
grows or shrinks a mounted log-structured filesystem to the specified size.
|
|
.Ar mounted-file-system
|
|
is the name of the filesystem to be resized, and
|
|
.Ar new-size
|
|
is the desired new filesystem size, in sectors.
|
|
If
|
|
.Ar new-size
|
|
is not specified,
|
|
.Nm
|
|
will default to the current size of the partition containing the filesystem
|
|
in question.
|
|
.Pp
|
|
When growing, the partition must be large enough to contain a filesystem
|
|
of the specified size; when shrinking,
|
|
.Nm
|
|
must first
|
|
.Dq clean
|
|
the segments that will be invalid when the filesystem is shrunk.
|
|
If this cleaning process results in these segments becoming redirtied,
|
|
this indicates that the given new size is not large enough to contain the
|
|
existing filesystem data, and
|
|
.Nm
|
|
will return an error.
|
|
.Sh EXAMPLES
|
|
To resize the file system mounted at
|
|
.Pa /home
|
|
to 32576 sectors:
|
|
.Dl resize_lfs -n 32576 /home
|
|
.Sh SEE ALSO
|
|
.Xr fsck_lfs 8 ,
|
|
.Xr lfs_cleanerd 8 ,
|
|
.Xr newfs_lfs 8
|
|
.Sh HISTORY
|
|
The
|
|
.Nm
|
|
command first appeared in
|
|
.Nx 3.0 .
|
|
.Sh AUTHORS
|
|
.An Konrad Schroder
|
|
.Aq perseant@NetBSD.org
|
|
.Sh BUGS
|
|
.Nm
|
|
should be able to resize an unmounted filesystem as well.
|