1*3fb18954Senami.\" $NetBSD: newfs_lfs.8,v 1.6 2000/02/05 11:57:30 enami Exp $ 20a849c91Sperseant.\" 30a849c91Sperseant.\" Copyright (c) 1993 40a849c91Sperseant.\" The Regents of the University of California. All rights reserved. 50a849c91Sperseant.\" 60a849c91Sperseant.\" Redistribution and use in source and binary forms, with or without 70a849c91Sperseant.\" modification, are permitted provided that the following conditions 80a849c91Sperseant.\" are met: 90a849c91Sperseant.\" 1. Redistributions of source code must retain the above copyright 100a849c91Sperseant.\" notice, this list of conditions and the following disclaimer. 110a849c91Sperseant.\" 2. Redistributions in binary form must reproduce the above copyright 120a849c91Sperseant.\" notice, this list of conditions and the following disclaimer in the 130a849c91Sperseant.\" documentation and/or other materials provided with the distribution. 140a849c91Sperseant.\" 3. All advertising materials mentioning features or use of this software 150a849c91Sperseant.\" must display the following acknowledgement: 160a849c91Sperseant.\" This product includes software developed by the University of 170a849c91Sperseant.\" California, Berkeley and its contributors. 180a849c91Sperseant.\" 4. Neither the name of the University nor the names of its contributors 190a849c91Sperseant.\" may be used to endorse or promote products derived from this software 200a849c91Sperseant.\" without specific prior written permission. 210a849c91Sperseant.\" 220a849c91Sperseant.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 230a849c91Sperseant.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 240a849c91Sperseant.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 250a849c91Sperseant.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 260a849c91Sperseant.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 270a849c91Sperseant.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 280a849c91Sperseant.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 290a849c91Sperseant.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 300a849c91Sperseant.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 310a849c91Sperseant.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 320a849c91Sperseant.\" SUCH DAMAGE. 330a849c91Sperseant.\" 340a849c91Sperseant.\" @(#)newlfs.8 8.1 (Berkeley) 6/19/93 350a849c91Sperseant.\" 367fa66164Sperseant.Dd July 15, 1999 377fa66164Sperseant.Dt NEWFS_LFS 8 380a849c91Sperseant.Os BSD 4.4 390a849c91Sperseant.Sh NAME 400a849c91Sperseant.Nm newfs_lfs 410a849c91Sperseant.Nd construct a new LFS file system 420a849c91Sperseant.Sh SYNOPSIS 430a849c91Sperseant.Nm 440a849c91Sperseant.Op Ar newfs_lfs-options 450a849c91Sperseant.Ar special 460a849c91Sperseant.Sh DESCRIPTION 470a849c91Sperseant.Nm 480a849c91Sperseantbuilds a log-structured file system on the specified special 490a849c91Sperseantdevice basing its defaults on the information in the disk label. 5043a7fde6SperseantBefore running 510a849c91Sperseant.Nm 520a849c91Sperseantthe disk must be labeled using 5354713442Shubertf.Xr disklabel 8 , 5443a7fde6Sperseantthe proper fstype is 4.4LFS. Reasonable values for the 5543a7fde6Sperseant.Li fsize, 5643a7fde6Sperseant.Li bsize, 5743a7fde6Sperseantand 5843a7fde6Sperseant.Li cpg 5943a7fde6Sperseant(really 6043a7fde6Sperseant.Li sgs, 6143a7fde6Sperseantsegment shift) fields are 1024, 8192, and 7 respectively. 620a849c91Sperseant.Pp 630a849c91SperseantThe following options define the general layout policies. 640a849c91Sperseant.Bl -tag -width Fl 65*3fb18954Senami.It Fl B Ar logical-segment-size 66f1dfdc69SperseantThe logical segment size of the file system in bytes. If not specified, 67f1dfdc69Sperseantthe segment size is computed by left-shifting the partition label's block 6843a7fde6Sperseantsize by the amount indicated in the partition table's segshift. If the 6943a7fde6Sperseantdisklabel indicates a zero block size or segment shift, a compile-time default 7043a7fde6Sperseantsegment size of 1M is used. 710a849c91Sperseant.It Fl b Ar block-size 72f1dfdc69SperseantThe block size of the file system in bytes. If not specified, the block 73f1dfdc69Sperseantsize is taken from the partition label, or if the partition label 74f1dfdc69Sperseantindicates 0, a compile-time default of 8K is used. 757fa66164Sperseant.It Fl f Ar fragment-size 76f1dfdc69SperseantThe fragment size of the file system in bytes. If not specified, 77f1dfdc69Sperseantthe fragment size is taken from the partition label, or if the partition 78f1dfdc69Sperseantlabel indicates 0, a compile-time default of 1K is used. 790a849c91Sperseant.It Fl L 807fa66164SperseantCreate a log-structured file system (LFS). This is the default, and this 817fa66164Sperseantoption is provided for compatibility only. 820a849c91Sperseant.It Fl m Ar free space \&% 830a849c91SperseantThe percentage of space reserved from normal users; the minimum 840a849c91Sperseantfree space threshold. The default value used is 10%. 850a849c91SperseantSee 860a849c91Sperseant.Xr tunefs 8 870a849c91Sperseantfor more details on how to set this option. 887fa66164Sperseant.It Fl N 897fa66164SperseantDo not actually create the filesystem. 900a849c91Sperseant.It Fl s Ar size 910a849c91SperseantThe size of the file system in sectors. 920a849c91Sperseant.El 930a849c91Sperseant.Sh SEE ALSO 940a849c91Sperseant.Xr disktab 5 , 957fa66164Sperseant.\" .Xr fs 5 , 960a849c91Sperseant.Xr dumplfs 8 , 970a849c91Sperseant.Xr disklabel 8 , 98*3fb18954Senami.Xr diskpart 8 997fa66164Sperseant.\" .Xr tunefs 8 1000a849c91Sperseant.Rs 1017fa66164Sperseant.%A M. Seltzer 1027fa66164Sperseant.%A K. Bostic 1030a849c91Sperseant.%A M. McKusick 1047fa66164Sperseant.%A C. Staelin 1057fa66164Sperseant.%T "An Implementation of a Log-Structured File System for UNIX" 1067fa66164Sperseant.%J "Proceedings of the Winter 1993 USENIX Conference" 1077fa66164Sperseant.%D January 25-29, 1993 1087fa66164Sperseant.%P pp. 315-331 1090a849c91Sperseant.Re 1100a849c91Sperseant.Sh HISTORY 1117fa66164SperseantA \fBnewlfs\fR 1120a849c91Sperseantcommand appeared in 1137fa66164Sperseant.Bx 4.4 , 1147fa66164Sperseantand was renamed to 1157fa66164Sperseant.Nm 1167fa66164Sperseantfor 1177fa66164Sperseant.Nx 1.4. 118