276d62f603
Patches provided by Joel Baker in PR 22308, verified by myself.
165 lines
5.4 KiB
Groff
165 lines
5.4 KiB
Groff
.\" $NetBSD: newfs_lfs.8,v 1.20 2003/08/07 10:04:35 agc Exp $
|
|
.\"
|
|
.\" Copyright (c) 1993
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
.\"
|
|
.\" 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. Neither the name of the University 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 REGENTS 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 REGENTS 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.
|
|
.\"
|
|
.\" @(#)newlfs.8 8.1 (Berkeley) 6/19/93
|
|
.\"
|
|
.Dd July 12, 2001
|
|
.Dt NEWFS_LFS 8
|
|
.Os
|
|
.Sh NAME
|
|
.Nm newfs_lfs
|
|
.Nd construct a new LFS file system
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Op Ar newfs_lfs-options
|
|
.Ar special
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
builds a log-structured file system on the specified special
|
|
device basing its defaults on the information in the disk label.
|
|
Before running
|
|
.Nm
|
|
the disk must be labeled using
|
|
.Xr disklabel 8 ,
|
|
the proper fstype is 4.4LFS.
|
|
Reasonable values for the
|
|
.Li fsize ,
|
|
.Li bsize ,
|
|
and
|
|
.Li sgs
|
|
fields are 1024, 8192, and 7 respectively.
|
|
.Pp
|
|
The following options define the general layout policies.
|
|
.Bl -tag -width Fl
|
|
.It Fl A
|
|
Attempt to compute the appropriate segment size using the formula
|
|
.Em 4 * bandwidth * access time .
|
|
The disk is tested for twenty seconds
|
|
to discover its bandwidth and seek time.
|
|
.It Fl B Ar logical-segment-size
|
|
The logical segment size of the file system in bytes.
|
|
If not specified, the segment size is computed by left-shifting
|
|
the partition label's block size by the amount indicated in the
|
|
partition table's segshift.
|
|
If the disklabel indicates a zero block size or segment shift,
|
|
a compile-time default segment size of 1M is used.
|
|
.It Fl b Ar block-size
|
|
The block size of the file system in bytes.
|
|
If not specified, the block size is taken from the partition label,
|
|
or if the partition label indicates 0,
|
|
a compile-time default of 8K is used.
|
|
.It Fl F
|
|
Force creation of an LFS even on a partition labeled as another type.
|
|
.Nm
|
|
will use compile-time default values for block and fragment size, and segment
|
|
shift, unless these are overridden by command-line flags.
|
|
.It Fl f Ar fragment-size
|
|
The fragment size of the file system in bytes.
|
|
If not specified, the fragment size is taken from the partition label,
|
|
or if the partition label indicates 0,
|
|
a compile-time default of 1K is used.
|
|
.It Fl I Ar interleave
|
|
Specify the interleave between segments.
|
|
The default is zero.
|
|
.It Fl i
|
|
The size of an inode block, in bytes.
|
|
The default is to use the same size as a fragment,
|
|
or in a v1 filesystem, the same size as a data block.
|
|
.It Fl L
|
|
Create a log-structured file system (LFS).
|
|
This is the default, and this
|
|
option is provided for compatibility only.
|
|
.It Fl M Ar nsegs
|
|
Reserve this many segments for use exclusively by the cleaner, instead
|
|
of letting
|
|
.Nm
|
|
do the computation.
|
|
Do not use this option.
|
|
.It Fl m Ar free space \&%
|
|
The percentage of space reserved from normal users; the minimum
|
|
free space threshold.
|
|
The default value used is 10%.
|
|
.It Fl N
|
|
Do not actually create the filesystem.
|
|
.It Fl O Ar offset
|
|
Start the first segment this many sectors from the beginning of the
|
|
partition.
|
|
The default is zero.
|
|
.It Fl r Ar ident
|
|
For a v2 filesystem, specify the roll-forward identifier for the
|
|
filesystem.
|
|
This identifier, a 32-bit numeric quantity,
|
|
should be different from that of any LFS that may previously
|
|
have existed on the same disk.
|
|
By default the identifier is chosen at random.
|
|
.It Fl s Ar size
|
|
The size of the file system in sectors.
|
|
.It Fl v Ar version
|
|
Make a filesystem with the specified disk layout version.
|
|
Valid options are 1 or 2 (the default).
|
|
.Em Note ,
|
|
however, that LFS version 1 is deprecated.
|
|
.El
|
|
.Sh SEE ALSO
|
|
.Xr disktab 5 ,
|
|
.\" .Xr fs 5 ,
|
|
.Xr disklabel 8 ,
|
|
.Xr diskpart 8 ,
|
|
.Xr dumplfs 8
|
|
.\" .Xr tunefs 8
|
|
.Rs
|
|
.%A M. Seltzer
|
|
.%A K. Bostic
|
|
.%A M. McKusick
|
|
.%A C. Staelin
|
|
.%T "An Implementation of a Log-Structured File System for UNIX"
|
|
.%J "Proceedings of the Winter 1993 USENIX Conference"
|
|
.%D January 25-29, 1993
|
|
.%P pp. 315-331
|
|
.Re
|
|
.Rs
|
|
.%A J. Matthews
|
|
.%A D. Roselli
|
|
.%A A. Costello
|
|
.%A R. Wang
|
|
.%A T. Anderson
|
|
.%T "Improving the Performance of Log-Structured File Systems with Adaptive Methods"
|
|
.%J "Proceedings of the Sixteenth ACM SOSP"
|
|
.%D October 1997
|
|
.Re
|
|
.Sh HISTORY
|
|
A
|
|
.Ic newlfs
|
|
command appeared in
|
|
.Bx 4.4 ,
|
|
and was renamed to
|
|
.Nm
|
|
for
|
|
.Nx 1.4 .
|