*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->OpenBSD man pages -> mfs (8)              
Title
Content
Arch
Section
 

NEWFS(8)

Contents


NAME    [Toc]    [Back]

     newfs, mount_mfs - construct a new file system

SYNOPSIS    [Toc]    [Back]

     newfs [-NO] [-S sector-size] [-a maxcontig] [-b block-size]
           [-c  cylinders]  [-d   rotdelay]   [-e   maxbpg]   [-f
frag-size]
           [-g  avgfilesize]  [-h  avgfpdir] [-i bytes] [-k skew]
[-l interleave]
           [-m free  space]  [-n  nrpos]  [-o  optimization]  [-p
sectors] [-q]
           [-r  revolutions]  [-s  size] [-t fstype] [-u sectors]
[-x sectors]
           [-z tracks] special

     mount_mfs [-P  file]  [-a  maxcontig]  [-b  block-size]  [-c
cylinders]
           [-d  rotdelay]  [-e  maxbpg] [-f frag-size] [-i bytes]
[-m free space]
           [-o options] [-s size] special node

DESCRIPTION    [Toc]    [Back]

     Before running newfs or mount_mfs, the disk must be  labeled
using
     disklabel(8).   newfs  builds a file system on the specified
special device,
 basing its defaults on the information in the disk label.  Typically
  the defaults are reasonable, although newfs has numerous
options to
     allow the defaults to be selectively overridden.

     mount_mfs is used to build a file system in  virtual  memory
and then mount
     it on a specified node.  mount_mfs exits and the contents of
the file
     system are lost when  the  file  system  is  unmounted.   If
mount_mfs is sent
     a  signal while running, for example during system shutdown,
it will attempt
 to unmount its corresponding file system.  The parameters to
     mount_mfs  are the same as those to newfs.  The special file
is only used
     to read the disk label which provides a set of configuration
parameters
     for the memory based file system.  The special file is typically that of
     the primary swap area, since that is where the  file  system
will be backed
     up  when  free memory gets low and the memory supporting the
file system
     has to be paged.  If the keyword ``swap'' is used instead of
a special
     file  name,  default  configuration parameters will be used.
(This option
     is useful when trying to use mount_mfs on a machine  without
any disks.)

     Both newfs and mount_mfs now have the functionality of fsirand(8) builtin
 so it is not necessary to run fsirand(8) manually  unless
you wish to
     re-randomize  the  file system (or list the inode generation
numbers).

     The following options define the general layout policies:

     -N          Causes the file system parameters to be  printed
out without
                 really creating the file system.

     -O           Creates  a 4.3BSD format file system.  This option is primarily
 used to build root file systems that  can  be
understood by
                 older boot ROMs.

     -q           Operate in quiet mode.  With this option, newfs
will not
                 print  extraneous  information  like  superblock
backups.

     -a maxcontig
                 This  specifies the maximum number of contiguous
blocks that
                 will be laid out before forcing a rotational delay (see the
                 -d  option).   The  default value depends on the
block size (4
                 for 16KB blocks, 8 for 8KB blocks,  and  16  for
4KB blocks).
                 See  tunefs(8)  for  more  details on how to set
this option.

     -b block-size
                 The block size of the  file  system,  in  bytes.
The default is
                 16KB.

     -c #cylinders/group
                 The  number of cylinders per cylinder group in a
file system.
                 The default is to use as many as  fit  with  the
other parameters
 given.

     -d rotdelay
                 This  specifies  the expected time (in milliseconds) to service
                 a transfer completion interrupt and  initiate  a
new transfer
                 on  the  same  disk.  The default is 0 milliseconds.  See
                 tunefs(8) for more details on how  to  set  this
option.

     -e  maxbpg   This indicates the maximum number of blocks any
single file
                 can allocate out of a cylinder group  before  it
is forced to
                 begin  allocating  blocks  from another cylinder
group.  The default
 is about one quarter of the  total  blocks
in a cylinder
                 group.  See tunefs(8) for more details on how to
set this option.


     -f frag-size
                 The fragment size of the file system  in  bytes.
The default
                 is 2048.

     -g avgfilesize
                 The expected average file size for the file system in bytes.

     -h avgfpdir
                 The expected average number of files per  directory on the
                 file system.

     -i number of bytes per inode
                 This specifies the density of inodes in the file
system.  The
                 default is to create  an  inode  for  each  4096
bytes of data
                 space.   If  fewer  inodes are desired, a larger
number should
                 be used; to create more inodes a smaller  number
should be
                 given.

     -m free space %
                 The  percentage  of  space  reserved from normal
users; the minimum
 free space  threshold.   The  default  value
used is 5%.  See
                 tunefs(8)  for  more  details on how to set this
option.

     -n number of rotational positions
                 The number  of  distinct  rotational  positions.
The default is
                 1.

     -o optimization preference
                 space  or  time.   The file system can either be
instructed to
                 try  to  minimize  the  time  spent   allocating
blocks, or to try
                 to minimize the space fragmentation on the disk.
Unless an
                 optimization has been specified, if the value of
minfree (see
                 above)  is less than 5%, the default is to optimize for space;
                 if the value of minfree is greater than or equal
to 5%, the
                 default  is to optimize for time.  See tunefs(8)
for more details
 on how to set this option.

     -s size     The size of the file  system  in  sectors.   The
maximum size of
                 a  file  system is 2,147,483,647 (2^31 - 1) sectors, which is
                 slightly less than 1TB.

     The following options override the standard  sizes  for  the
disk geometry.
     Their  default values are taken from the disk label.  Changing these defaults
 is useful only when using newfs to build a file  system whose raw
     image  will  eventually  be used on a different type of disk
than the one on
     which it is initially created (for example on  a  write-once
disk).  Note
     that  changing  any of these values from their defaults will
make it impossible
 for fsck(8) to find the alternate superblocks  if  the
standard superblock
 is lost.

     -S sector-size
                 The size of a sector in bytes (almost never anything but
                 512).

     -k sector 0 skew, per track
                 Used to describe perturbations in the media format to compensate
  for  a slow controller.  Track skew is the
offset of sector
 0 on track N relative to sector 0  on  track
N-1 on the
                 same cylinder.

     -l hardware sector interleave
                 Used to describe perturbations in the media format to compensate
 for a slow controller.  Interleave is physical sector
                 interleave  on  each track, specified as the denominator of the
                 ratio:
                       sectors read/sectors passed over
                 Thus an interleave  of  1/1  implies  contiguous
layout, while
                 1/2 implies logical sector 0 is separated by one
sector from
                 logical sector 1.

     -p spare sectors per track
                 Spare  sectors  (bad  sector  replacements)  are
physical sectors
                 that  occupy  space  at  the  end of each track.
They are not
                 counted as part of the sectors/track (-u)  since
they are not
                 available  to  the  file system for data allocation.

     -r revolutions/minute
                 The speed of the disk in revolutions per minute.

     -z #tracks/cylinder
                 The number of tracks/cylinder available for data
allocation
                 by the file system.

     -t fstype   Set the file system type of  which  file  system
you wish to
                 create.   newfs  will be smart enough to run the
alternate
                 newfs_XXX program instead.

     -u sectors/track
                 The number of sectors per  track  available  for
data allocation
                 by  the file system.  This does not include sectors reserved
                 at the end of each track for bad block  replacement (see the
                 -p option).

     -x spare sectors per cylinder
                 Spare  sectors  (bad  sector  replacements)  are
physical sectors
                 that occupy space at the end of the  last  track
in the cylinder.
   They  are deducted from the sectors/track
(-u) of the
                 last track of each cylinder since they  are  not
available to
                 the file system for data allocation.

     The  options  to  the mount_mfs command are as described for
the newfs command,
 except for the -P option and the -o option.

     These options are as follows:

     -P file
             If file is a directory,  populate  the  created  mfs
file system with
             the  contents  of the directory.  If file is a block
device, populate
 the created mfs file system with  the  contents
of the FFS
             file system contained on the device.

     -o       Options  are specified with a -o flag followed by a
comma separated
 string of options.  See the mount(8) man page for
possible options
 and their meanings.

     If the -P file option is not used, the owner and mode of the
created mfs
     file system will be the same as the owner and  mode  of  the
mount point.

ENVIRONMENT    [Toc]    [Back]

     TMPDIR   Directory in which to create temporary mount points
for use by
             mount_mfs -P instead of /tmp.

SEE ALSO    [Toc]    [Back]

      
      
     disktab(5), fs(5), disklabel(8), dumpfs(8),  fsck(8),  fsirand(8),
     growfs(8), mount(8), tunefs(8)

     M.  McKusick, W. Joy, S. Leffler, and R. Fabry, "A Fast File
System for
     UNIX",  ACM  Transactions  on  Computer  Systems  2,  3,  pp
181-197, August
     1984, (reprinted in the BSD System Manager's Manual).

HISTORY    [Toc]    [Back]

     The newfs command appeared in 4.2BSD.

BUGS    [Toc]    [Back]

     Certain  combinations  of  block  and fragment sizes may not
produce a valid
     file system.  If a non-default block  or  fragment  size  is
specified,
     fsck(8) should be run on the newly created filesystem before
use.

OpenBSD     3.6                          March      27,      1994
[ Back ]
 Similar pages
Name OS Title
mkfs_hfs HP-UX construct an HFS file system
newfs_hfs HP-UX construct a new HFS file system
newfs_msdos OpenBSD construct a new MS-DOS (FAT) file system
newfs_msdos FreeBSD construct a new MS-DOS (FAT) file system
mkfs_vxfs HP-UX construct a VxFS file system
mkfs HP-UX construct a file system (generic)
newfs FreeBSD construct a new UFS1/UFS2 file system
tmpnam Tru64 Construct the name for a temporary file
tempnam Tru64 Construct the name for a temporary file
mktemp Tru64 Construct a unique file name or directory
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service