2003-08-07 14:04:22 +04:00
|
|
|
.\" $NetBSD: newfs_lfs.8,v 1.20 2003/08/07 10:04:35 agc Exp $
|
1995-03-18 17:54:19 +03:00
|
|
|
.\"
|
1994-06-08 23:27:32 +04:00
|
|
|
.\" 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.
|
2003-08-07 14:04:22 +04:00
|
|
|
.\" 3. Neither the name of the University nor the names of its contributors
|
1994-06-08 23:27:32 +04:00
|
|
|
.\" 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.
|
|
|
|
.\"
|
1994-06-14 02:50:46 +04:00
|
|
|
.\" @(#)newlfs.8 8.1 (Berkeley) 6/19/93
|
1994-06-08 23:27:32 +04:00
|
|
|
.\"
|
Merge the short-lived perseant-lfsv2 branch into the trunk.
Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default. Changes for the v2 layout include:
- Segments of non-PO2 size and arbitrary block offset, so these can be
matched to convenient physical characteristics of the partition (e.g.,
stripe or track size and offset).
- Address by fragment instead of by disk sector, paving the way for
non-512-byte-sector devices. In theory fragments can be as large
as you like, though in reality they must be smaller than MAXBSIZE in size.
- Use serial number and filesystem identifier to ensure that roll-forward
doesn't get old data and think it's new. Roll-forward is enabled for
v2 filesystems, though not for v1 filesystems by default.
- The inode free list is now a tailq, paving the way for undelete (undelete
is not yet implemented, but can be without further non-backwards-compatible
changes to disk structures).
- Inode atime information is kept in the Ifile, instead of on the inode;
that is, the inode is never written *just* because atime was changed.
Because of this the inodes remain near the file data on the disk, rather
than wandering all over as the disk is read repeatedly. This speeds up
repeated reads by a small but noticeable amount.
Other changes of note include:
- The ifile written by newfs_lfs can now be of arbitrary length, it is no
longer restricted to a single indirect block.
- Fixed an old bug where ctime was changed every time a vnode was created.
I need to look more closely to make sure that the times are only updated
during write(2) and friends, not after-the-fact during a segment write,
and certainly not by the cleaner.
2001-07-14 00:30:18 +04:00
|
|
|
.Dd July 12, 2001
|
1999-07-15 23:09:40 +04:00
|
|
|
.Dt NEWFS_LFS 8
|
2001-06-05 15:22:41 +04:00
|
|
|
.Os
|
1994-06-08 23:27:32 +04:00
|
|
|
.Sh NAME
|
1999-03-18 20:18:04 +03:00
|
|
|
.Nm newfs_lfs
|
1994-06-08 23:27:32 +04:00
|
|
|
.Nd construct a new LFS file system
|
|
|
|
.Sh SYNOPSIS
|
1997-09-15 10:55:39 +04:00
|
|
|
.Nm
|
1999-03-18 20:18:04 +03:00
|
|
|
.Op Ar newfs_lfs-options
|
1994-06-08 23:27:32 +04:00
|
|
|
.Ar special
|
|
|
|
.Sh DESCRIPTION
|
1997-09-15 10:55:39 +04:00
|
|
|
.Nm
|
1994-06-08 23:27:32 +04:00
|
|
|
builds a log-structured file system on the specified special
|
|
|
|
device basing its defaults on the information in the disk label.
|
2001-11-16 13:25:42 +03:00
|
|
|
Before running
|
1997-09-15 10:55:39 +04:00
|
|
|
.Nm
|
2001-11-16 13:25:42 +03:00
|
|
|
the disk must be labeled using
|
2000-01-16 03:44:59 +03:00
|
|
|
.Xr disklabel 8 ,
|
2002-10-01 17:40:23 +04:00
|
|
|
the proper fstype is 4.4LFS.
|
|
|
|
Reasonable values for the
|
2001-11-16 15:05:00 +03:00
|
|
|
.Li fsize ,
|
|
|
|
.Li bsize ,
|
2000-01-19 00:57:59 +03:00
|
|
|
and
|
2000-12-05 22:51:14 +03:00
|
|
|
.Li sgs
|
|
|
|
fields are 1024, 8192, and 7 respectively.
|
1994-06-08 23:27:32 +04:00
|
|
|
.Pp
|
|
|
|
The following options define the general layout policies.
|
|
|
|
.Bl -tag -width Fl
|
2000-12-05 22:51:14 +03:00
|
|
|
.It Fl A
|
|
|
|
Attempt to compute the appropriate segment size using the formula
|
2002-01-21 21:23:09 +03:00
|
|
|
.Em 4 * bandwidth * access time .
|
|
|
|
The disk is tested for twenty seconds
|
2001-11-16 13:25:42 +03:00
|
|
|
to discover its bandwidth and seek time.
|
2000-02-05 14:57:30 +03:00
|
|
|
.It Fl B Ar logical-segment-size
|
2002-10-01 17:40:23 +04:00
|
|
|
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.
|
1994-06-08 23:27:32 +04:00
|
|
|
.It Fl b Ar block-size
|
2002-10-01 17:40:23 +04:00
|
|
|
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.
|
2000-02-13 02:58:09 +03:00
|
|
|
.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.
|
1999-07-15 23:09:40 +04:00
|
|
|
.It Fl f Ar fragment-size
|
2002-10-01 17:40:23 +04:00
|
|
|
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.
|
Merge the short-lived perseant-lfsv2 branch into the trunk.
Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default. Changes for the v2 layout include:
- Segments of non-PO2 size and arbitrary block offset, so these can be
matched to convenient physical characteristics of the partition (e.g.,
stripe or track size and offset).
- Address by fragment instead of by disk sector, paving the way for
non-512-byte-sector devices. In theory fragments can be as large
as you like, though in reality they must be smaller than MAXBSIZE in size.
- Use serial number and filesystem identifier to ensure that roll-forward
doesn't get old data and think it's new. Roll-forward is enabled for
v2 filesystems, though not for v1 filesystems by default.
- The inode free list is now a tailq, paving the way for undelete (undelete
is not yet implemented, but can be without further non-backwards-compatible
changes to disk structures).
- Inode atime information is kept in the Ifile, instead of on the inode;
that is, the inode is never written *just* because atime was changed.
Because of this the inodes remain near the file data on the disk, rather
than wandering all over as the disk is read repeatedly. This speeds up
repeated reads by a small but noticeable amount.
Other changes of note include:
- The ifile written by newfs_lfs can now be of arbitrary length, it is no
longer restricted to a single indirect block.
- Fixed an old bug where ctime was changed every time a vnode was created.
I need to look more closely to make sure that the times are only updated
during write(2) and friends, not after-the-fact during a segment write,
and certainly not by the cleaner.
2001-07-14 00:30:18 +04:00
|
|
|
.It Fl I Ar interleave
|
2002-10-01 17:40:23 +04:00
|
|
|
Specify the interleave between segments.
|
|
|
|
The default is zero.
|
Merge the short-lived perseant-lfsv2 branch into the trunk.
Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default. Changes for the v2 layout include:
- Segments of non-PO2 size and arbitrary block offset, so these can be
matched to convenient physical characteristics of the partition (e.g.,
stripe or track size and offset).
- Address by fragment instead of by disk sector, paving the way for
non-512-byte-sector devices. In theory fragments can be as large
as you like, though in reality they must be smaller than MAXBSIZE in size.
- Use serial number and filesystem identifier to ensure that roll-forward
doesn't get old data and think it's new. Roll-forward is enabled for
v2 filesystems, though not for v1 filesystems by default.
- The inode free list is now a tailq, paving the way for undelete (undelete
is not yet implemented, but can be without further non-backwards-compatible
changes to disk structures).
- Inode atime information is kept in the Ifile, instead of on the inode;
that is, the inode is never written *just* because atime was changed.
Because of this the inodes remain near the file data on the disk, rather
than wandering all over as the disk is read repeatedly. This speeds up
repeated reads by a small but noticeable amount.
Other changes of note include:
- The ifile written by newfs_lfs can now be of arbitrary length, it is no
longer restricted to a single indirect block.
- Fixed an old bug where ctime was changed every time a vnode was created.
I need to look more closely to make sure that the times are only updated
during write(2) and friends, not after-the-fact during a segment write,
and certainly not by the cleaner.
2001-07-14 00:30:18 +04:00
|
|
|
.It Fl i
|
2002-10-01 17:40:23 +04:00
|
|
|
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.
|
1994-06-08 23:27:32 +04:00
|
|
|
.It Fl L
|
2002-10-01 17:40:23 +04:00
|
|
|
Create a log-structured file system (LFS).
|
|
|
|
This is the default, and this
|
1999-07-15 23:09:40 +04:00
|
|
|
option is provided for compatibility only.
|
2000-07-05 02:35:04 +04:00
|
|
|
.It Fl M Ar nsegs
|
|
|
|
Reserve this many segments for use exclusively by the cleaner, instead
|
|
|
|
of letting
|
|
|
|
.Nm
|
2002-10-01 17:40:23 +04:00
|
|
|
do the computation.
|
|
|
|
Do not use this option.
|
Merge the short-lived perseant-lfsv2 branch into the trunk.
Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default. Changes for the v2 layout include:
- Segments of non-PO2 size and arbitrary block offset, so these can be
matched to convenient physical characteristics of the partition (e.g.,
stripe or track size and offset).
- Address by fragment instead of by disk sector, paving the way for
non-512-byte-sector devices. In theory fragments can be as large
as you like, though in reality they must be smaller than MAXBSIZE in size.
- Use serial number and filesystem identifier to ensure that roll-forward
doesn't get old data and think it's new. Roll-forward is enabled for
v2 filesystems, though not for v1 filesystems by default.
- The inode free list is now a tailq, paving the way for undelete (undelete
is not yet implemented, but can be without further non-backwards-compatible
changes to disk structures).
- Inode atime information is kept in the Ifile, instead of on the inode;
that is, the inode is never written *just* because atime was changed.
Because of this the inodes remain near the file data on the disk, rather
than wandering all over as the disk is read repeatedly. This speeds up
repeated reads by a small but noticeable amount.
Other changes of note include:
- The ifile written by newfs_lfs can now be of arbitrary length, it is no
longer restricted to a single indirect block.
- Fixed an old bug where ctime was changed every time a vnode was created.
I need to look more closely to make sure that the times are only updated
during write(2) and friends, not after-the-fact during a segment write,
and certainly not by the cleaner.
2001-07-14 00:30:18 +04:00
|
|
|
.It Fl m Ar free space \&%
|
|
|
|
The percentage of space reserved from normal users; the minimum
|
2002-10-01 17:40:23 +04:00
|
|
|
free space threshold.
|
|
|
|
The default value used is 10%.
|
1999-07-15 23:09:40 +04:00
|
|
|
.It Fl N
|
|
|
|
Do not actually create the filesystem.
|
Merge the short-lived perseant-lfsv2 branch into the trunk.
Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default. Changes for the v2 layout include:
- Segments of non-PO2 size and arbitrary block offset, so these can be
matched to convenient physical characteristics of the partition (e.g.,
stripe or track size and offset).
- Address by fragment instead of by disk sector, paving the way for
non-512-byte-sector devices. In theory fragments can be as large
as you like, though in reality they must be smaller than MAXBSIZE in size.
- Use serial number and filesystem identifier to ensure that roll-forward
doesn't get old data and think it's new. Roll-forward is enabled for
v2 filesystems, though not for v1 filesystems by default.
- The inode free list is now a tailq, paving the way for undelete (undelete
is not yet implemented, but can be without further non-backwards-compatible
changes to disk structures).
- Inode atime information is kept in the Ifile, instead of on the inode;
that is, the inode is never written *just* because atime was changed.
Because of this the inodes remain near the file data on the disk, rather
than wandering all over as the disk is read repeatedly. This speeds up
repeated reads by a small but noticeable amount.
Other changes of note include:
- The ifile written by newfs_lfs can now be of arbitrary length, it is no
longer restricted to a single indirect block.
- Fixed an old bug where ctime was changed every time a vnode was created.
I need to look more closely to make sure that the times are only updated
during write(2) and friends, not after-the-fact during a segment write,
and certainly not by the cleaner.
2001-07-14 00:30:18 +04:00
|
|
|
.It Fl O Ar offset
|
|
|
|
Start the first segment this many sectors from the beginning of the
|
2002-10-01 17:40:23 +04:00
|
|
|
partition.
|
|
|
|
The default is zero.
|
Merge the short-lived perseant-lfsv2 branch into the trunk.
Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default. Changes for the v2 layout include:
- Segments of non-PO2 size and arbitrary block offset, so these can be
matched to convenient physical characteristics of the partition (e.g.,
stripe or track size and offset).
- Address by fragment instead of by disk sector, paving the way for
non-512-byte-sector devices. In theory fragments can be as large
as you like, though in reality they must be smaller than MAXBSIZE in size.
- Use serial number and filesystem identifier to ensure that roll-forward
doesn't get old data and think it's new. Roll-forward is enabled for
v2 filesystems, though not for v1 filesystems by default.
- The inode free list is now a tailq, paving the way for undelete (undelete
is not yet implemented, but can be without further non-backwards-compatible
changes to disk structures).
- Inode atime information is kept in the Ifile, instead of on the inode;
that is, the inode is never written *just* because atime was changed.
Because of this the inodes remain near the file data on the disk, rather
than wandering all over as the disk is read repeatedly. This speeds up
repeated reads by a small but noticeable amount.
Other changes of note include:
- The ifile written by newfs_lfs can now be of arbitrary length, it is no
longer restricted to a single indirect block.
- Fixed an old bug where ctime was changed every time a vnode was created.
I need to look more closely to make sure that the times are only updated
during write(2) and friends, not after-the-fact during a segment write,
and certainly not by the cleaner.
2001-07-14 00:30:18 +04:00
|
|
|
.It Fl r Ar ident
|
|
|
|
For a v2 filesystem, specify the roll-forward identifier for the
|
2002-10-01 17:40:23 +04:00
|
|
|
filesystem.
|
|
|
|
This identifier, a 32-bit numeric quantity,
|
Merge the short-lived perseant-lfsv2 branch into the trunk.
Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default. Changes for the v2 layout include:
- Segments of non-PO2 size and arbitrary block offset, so these can be
matched to convenient physical characteristics of the partition (e.g.,
stripe or track size and offset).
- Address by fragment instead of by disk sector, paving the way for
non-512-byte-sector devices. In theory fragments can be as large
as you like, though in reality they must be smaller than MAXBSIZE in size.
- Use serial number and filesystem identifier to ensure that roll-forward
doesn't get old data and think it's new. Roll-forward is enabled for
v2 filesystems, though not for v1 filesystems by default.
- The inode free list is now a tailq, paving the way for undelete (undelete
is not yet implemented, but can be without further non-backwards-compatible
changes to disk structures).
- Inode atime information is kept in the Ifile, instead of on the inode;
that is, the inode is never written *just* because atime was changed.
Because of this the inodes remain near the file data on the disk, rather
than wandering all over as the disk is read repeatedly. This speeds up
repeated reads by a small but noticeable amount.
Other changes of note include:
- The ifile written by newfs_lfs can now be of arbitrary length, it is no
longer restricted to a single indirect block.
- Fixed an old bug where ctime was changed every time a vnode was created.
I need to look more closely to make sure that the times are only updated
during write(2) and friends, not after-the-fact during a segment write,
and certainly not by the cleaner.
2001-07-14 00:30:18 +04:00
|
|
|
should be different from that of any LFS that may previously
|
2002-10-01 17:40:23 +04:00
|
|
|
have existed on the same disk.
|
|
|
|
By default the identifier is chosen at random.
|
1994-06-08 23:27:32 +04:00
|
|
|
.It Fl s Ar size
|
|
|
|
The size of the file system in sectors.
|
Merge the short-lived perseant-lfsv2 branch into the trunk.
Kernels and tools understand both v1 and v2 filesystems; newfs_lfs
generates v2 by default. Changes for the v2 layout include:
- Segments of non-PO2 size and arbitrary block offset, so these can be
matched to convenient physical characteristics of the partition (e.g.,
stripe or track size and offset).
- Address by fragment instead of by disk sector, paving the way for
non-512-byte-sector devices. In theory fragments can be as large
as you like, though in reality they must be smaller than MAXBSIZE in size.
- Use serial number and filesystem identifier to ensure that roll-forward
doesn't get old data and think it's new. Roll-forward is enabled for
v2 filesystems, though not for v1 filesystems by default.
- The inode free list is now a tailq, paving the way for undelete (undelete
is not yet implemented, but can be without further non-backwards-compatible
changes to disk structures).
- Inode atime information is kept in the Ifile, instead of on the inode;
that is, the inode is never written *just* because atime was changed.
Because of this the inodes remain near the file data on the disk, rather
than wandering all over as the disk is read repeatedly. This speeds up
repeated reads by a small but noticeable amount.
Other changes of note include:
- The ifile written by newfs_lfs can now be of arbitrary length, it is no
longer restricted to a single indirect block.
- Fixed an old bug where ctime was changed every time a vnode was created.
I need to look more closely to make sure that the times are only updated
during write(2) and friends, not after-the-fact during a segment write,
and certainly not by the cleaner.
2001-07-14 00:30:18 +04:00
|
|
|
.It Fl v Ar version
|
2002-10-01 17:40:23 +04:00
|
|
|
Make a filesystem with the specified disk layout version.
|
|
|
|
Valid options are 1 or 2 (the default).
|
2003-02-23 07:53:17 +03:00
|
|
|
.Em Note ,
|
|
|
|
however, that LFS version 1 is deprecated.
|
1994-06-08 23:27:32 +04:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr disktab 5 ,
|
1999-07-15 23:09:40 +04:00
|
|
|
.\" .Xr fs 5 ,
|
1994-06-08 23:27:32 +04:00
|
|
|
.Xr disklabel 8 ,
|
2001-11-16 15:05:00 +03:00
|
|
|
.Xr diskpart 8 ,
|
|
|
|
.Xr dumplfs 8
|
1999-07-15 23:09:40 +04:00
|
|
|
.\" .Xr tunefs 8
|
1994-06-08 23:27:32 +04:00
|
|
|
.Rs
|
1999-07-15 23:09:40 +04:00
|
|
|
.%A M. Seltzer
|
|
|
|
.%A K. Bostic
|
1994-06-08 23:27:32 +04:00
|
|
|
.%A M. McKusick
|
1999-07-15 23:09:40 +04:00
|
|
|
.%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
|
1994-06-08 23:27:32 +04:00
|
|
|
.Re
|
2000-12-05 22:51:14 +03:00
|
|
|
.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
|
1994-06-08 23:27:32 +04:00
|
|
|
.Sh HISTORY
|
2001-11-16 15:05:00 +03:00
|
|
|
A
|
|
|
|
.Ic newlfs
|
1994-06-08 23:27:32 +04:00
|
|
|
command appeared in
|
1999-07-15 23:09:40 +04:00
|
|
|
.Bx 4.4 ,
|
2001-11-16 13:25:42 +03:00
|
|
|
and was renamed to
|
1999-07-15 23:09:40 +04:00
|
|
|
.Nm
|
|
|
|
for
|
2001-11-16 15:05:00 +03:00
|
|
|
.Nx 1.4 .
|