1 .\" $NetBSD: newfs_lfs.8,v 1.21 2006/05/04 04:39:15 perseant Exp $
4 .\" The Regents of the University of California. All rights reserved.
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
9 .\" 1. Redistributions of source code must retain the above copyright
10 .\" notice, this list of conditions and the following disclaimer.
11 .\" 2. Redistributions in binary form must reproduce the above copyright
12 .\" notice, this list of conditions and the following disclaimer in the
13 .\" documentation and/or other materials provided with the distribution.
14 .\" 3. Neither the name of the University nor the names of its contributors
15 .\" may be used to endorse or promote products derived from this software
16 .\" without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
19 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
22 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
26 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
27 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30 .\" @(#)newlfs.8 8.1 (Berkeley) 6/19/93
37 .Nd construct a new LFS file system
40 .Op Ar newfs_lfs-options
44 builds a log-structured file system on the specified special
45 device basing its defaults on the information in the disk label.
48 the disk must be labeled using
50 the proper fstype is 4.4LFS.
51 Reasonable values for the
56 fields are 1024, 8192, and 7 respectively.
58 The following options define the general layout policies.
61 Attempt to compute the appropriate segment size using the formula
62 .Em 4 * bandwidth * access time .
63 The disk is tested for twenty seconds
64 to discover its bandwidth and seek time.
65 .It Fl B Ar logical-segment-size
66 The logical segment size of the file system in bytes.
67 If not specified, the segment size is computed by left-shifting
68 the partition label's block size by the amount indicated in the
69 partition table's segshift.
70 If the disklabel indicates a zero block size or segment shift,
71 a compile-time default segment size of 1M is used.
72 .It Fl b Ar block-size
73 The block size of the file system in bytes.
74 If not specified, the block size is taken from the partition label,
75 or if the partition label indicates 0,
76 a compile-time default of 8K is used.
78 Force creation of an LFS even on a partition labeled as another type.
80 will use compile-time default values for block and fragment size, and segment
81 shift, unless these are overridden by command-line flags.
82 .It Fl f Ar fragment-size
83 The fragment size of the file system in bytes.
84 If not specified, the fragment size is taken from the partition label,
85 or if the partition label indicates 0,
86 a compile-time default of 1K is used.
87 .It Fl I Ar interleave
88 Specify the interleave between segments.
91 The size of an inode block, in bytes.
92 The default is to use the same size as a fragment,
93 or in a v1 filesystem, the same size as a data block.
95 Create a log-structured file system (LFS).
96 This is the default, and this
97 option is provided for compatibility only.
101 the number of segments left out of the amount allocated to user data.
102 A higher number increases cleaner performance, while a lower number
103 gives more usable space.
104 The default is based on the size of the filesystem, either 5% of the
105 total number of segments or 20 segments, whichever is larger.
106 .It Fl m Ar free space \&%
107 The percentage of space reserved from normal users; the minimum
108 free space threshold.
109 The default value used is 10%.
111 Do not actually create the filesystem.
113 Start the first segment this many sectors from the beginning of the
119 the number of segments set aside for the exclusive use of the cleaner.
120 A larger figure reduces the likelihood of running out of clean segments,
125 the cleaner will run without ceasing when the filesystem becomes close to
126 full. The default is the larger of 15 or the quantity
130 For a v2 filesystem, specify the roll-forward identifier for the
132 This identifier, a 32-bit numeric quantity,
133 should be different from that of any LFS that may previously
134 have existed on the same disk.
135 By default the identifier is chosen at random.
137 The size of the file system in sectors.
139 Make a filesystem with the specified disk layout version.
140 Valid options are 1 or 2 (the default).
142 however, that LFS version 1 is deprecated.
156 .%T "An Implementation of a Log-Structured File System for UNIX"
157 .%J "Proceedings of the Winter 1993 USENIX Conference"
158 .%D January 25-29, 1993
167 .%T "Improving the Performance of Log-Structured File Systems with Adaptive Methods"
168 .%J "Proceedings of the Sixteenth ACM SOSP"