2009-03-11 16:35:21 +03:00
|
|
|
.\" $NetBSD: resize_lfs.8,v 1.6 2009/03/11 13:35:21 joerg Exp $
|
2005-04-23 23:47:51 +04:00
|
|
|
.\"
|
|
|
|
.\" 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.
|
|
|
|
.\"
|
|
|
|
.\" 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.
|
|
|
|
.\"
|
2006-09-04 22:34:42 +04:00
|
|
|
.Dd September 4, 2006
|
2005-04-23 23:47:51 +04:00
|
|
|
.Dt RESIZE_LFS 8
|
2009-03-11 16:35:21 +03:00
|
|
|
.Os
|
2005-04-23 23:47:51 +04:00
|
|
|
.Sh NAME
|
|
|
|
.Nm resize_lfs
|
|
|
|
.Nd resize a mounted log-structured filesystem
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
|
|
|
.Op Fl v
|
2006-09-04 19:45:29 +04:00
|
|
|
.Op Fl s Ar new-size
|
2005-04-23 23:47:51 +04:00
|
|
|
.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
|
2005-04-25 15:47:37 +04:00
|
|
|
the segments that will be invalid when the filesystem is shrunk.
|
|
|
|
If this cleaning process results in these segments becoming redirtied,
|
2005-04-23 23:47:51 +04:00
|
|
|
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
|
2005-04-25 15:47:37 +04:00
|
|
|
To resize the file system mounted at
|
|
|
|
.Pa /home
|
|
|
|
to 32576 sectors:
|
2006-09-04 19:45:29 +04:00
|
|
|
.Dl resize_lfs -s 32576 /home
|
2005-04-23 23:47:51 +04:00
|
|
|
.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 .
|
2005-04-25 15:47:37 +04:00
|
|
|
.Sh AUTHORS
|
2005-04-23 23:47:51 +04:00
|
|
|
.An Konrad Schroder
|
|
|
|
.Aq perseant@NetBSD.org
|
|
|
|
.Sh BUGS
|
|
|
|
.Nm
|
|
|
|
should be able to resize an unmounted filesystem as well.
|