|NEWFS(8)||System Manager's Manual||NEWFS(8)|
— construct a new file system
newfs, 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.
The special file should be a raw device, for example /dev/rsd0a; if a relative path like sd0a is specified, the corresponding raw device is used.
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.)
mount_mfs now have the functionality of
fsirand(8) built in, so it is not
necessary to run fsirand(8) manually
unless you wish to re-randomize the file system (or list the inode
The options to
newfs are as follows:
newfswill not print extraneous information like superblock backups.
newfsto 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 this from its default will make it impossible for fsck(8) to find the alternate superblocks automatically if the standard superblock is lost.
-S). Alternatively size may instead use a multiplier, as documented in scan_scaled(3), to specify size in bytes; in this case size is rounded up to the next sector boundary. The maximum size of an FFS file system is 2,147,483,647 (2^31 - 1) of 512-byte blocks, slightly less than 1 TB. FFS2 file systems can be as large as 64 PB. Note however that for
mount_mfsthe practical limit is based on datasize in login.conf(5), and ultimately depends on the per-arch
newfswill be smart enough to run the alternate newfs_XXX program instead.
The options to
mount_mfs are as described
newfs, except for the
Those options are as follows:
-oflag followed by a comma separated string of options. See the mount(8) man page for possible options and their meanings.
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.
newfsdefaults to the terminal width, or 80 columns if the output is not a terminal.
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).
M. McKusick, M. Karels, and K. Bostic, A Pageable Memory Based Filesystem, USENIX Summer Conference Proceedings, 1990.
newfs command appeared in
|April 23, 2019||OpenBSD-current|