mkfs(1M) DG/UX 5.4.2 mkfs(1M)
NAME
mkfs, newfs - create a file system
SYNOPSIS
/usr/sbin/mkfs [options] special [proto]
[-m freespace]
[-r regionsize]
[-i inodedensity]
[-s dataelementlog]
[-x indexelementlog]
[-S dirdataelementlog]
[-X dirindexelementlog]
[-e firstanniversarysize]
[-E secondanniversarysize]
[density]
[{"pc"|"dos"}]
[gap]
[blockspercyl]]
DESCRIPTION
Mkfs creates an empty file system on a logical, software mirrored, or
physical disk. The required argument special specifies a block-
special or character-special device node, such as those nodes found
in /dev/dsk or /dev/rdsk. The created file system will span the
entire disk indicated by special. To create a file system of a
particular size, first create a logical disk of the desired size,
then run mkfs on that disk. To create a logical disk, use the
admldisk(1M) command, or the Device->Disk->Logical->Create operation
in sysadm(1M). If you must create the logical disk in standalone
mode, use the diskman(1M) command.
Most invocations of mkfs will not need to alter the defaults, so no
option arguments need to be specified:
# /usr/sbin/mkfs special
In such cases, you may use the Create or Add operation in the
File_System->Local_Filesys menu of sysadm instead of mkfs.
Newfs is identical to mkfs and is retained for Berkeley
compatibility.
MS-DOS Diskette Options
To format an MS-DOS diskette, type:
# /usr/sbin/mkfs density "dos" special
where special specifies the diskette device. The density argument
specifies the diskette capacity. The valid densities for 5.25 inch
diskettes are 360kb or 1220kb; for 3.5 inch diskettes, 720kb and
1440kb. The argument "dos" or "pc" indicates that the diskette
should be formatted for use by the DFM file system manager, dfm(4),
which reads and writes MS-DOS diskettes. If present, mkfs will do a
hard format of the diskette and lay down the file system format, and
Licensed material--property of copyright holder(s) 1
mkfs(1M) DG/UX 5.4.2 mkfs(1M)
ignore any other DG/UX file system options. If the "dos" or "pc"
option is not specified, a DG/UX file system is created on the
diskette.
DG/UX Options
The DG/UX file system options and option arguments are:
-m freespace: The minimum percentage of free space the file
system must have. If the file system's free space drops below
this level, only a superuser can allocate more space. The
value for free space must be an integer in the range 0 to 99,
inclusive. The default value is 10.
-r regionsize: Determines how many blocks each Disk Allocation
Region (DAR) in the file system will occupy (including the
bitmap, inode table, and data blocks). This number must be an
integer greater than or equal to 4032; the default value is
based on the size of the file system. The last DAR created
may be smaller than all others due to the target logical disk
being an uneven multiple of DAR size. Each DAR (except the
last one) is required to be large enough to hold the DAR
bitmap, at least 64 inodes, and at least one default sized
data element for files.
-i inodedensity: Determines how many inode slots (potential
files) the file system will have. The value specified is the
ratio of usable data bytes in the logical disk to the number
of inodes; the default is 3500. Any integer greater than zero
may be specified, but the actual density will be rounded down
to an integral multiple of 64 inodes per DAR. The maximum
possible number of inodes occurs when every usable block of
the DAR is occupied by inode slots, except for the required
space mention under regionsize.
-s dataelementlog: Determines the default data element size of
files to be created in the new file system. The value
specified is the element size in disk blocks, expressed as a
base 2 logarithm. This number must be an integer from 0 to
31, inclusive. The default value is 4 (meaning data elements
of 16 blocks).
-x indexelementlog: Determines the default index element size
of files to be created in the new file system. The value
specified is the element size in disk blocks, expressed as a
base 2 logarithm. This number must be an integer from 0 to
15, inclusive; the default value is 0 (meaning index elements
of 1 block).
-S dirdataelementlog: Determines the default data element size
of directories to be created in the new file system. The
value specified is the element size in disk blocks, expressed
as a base 2 logarithm. This number must be an integer from 0
to 31, inclusive; the default value is 4 (meaning data
elements of 16 blocks).
Licensed material--property of copyright holder(s) 2
mkfs(1M) DG/UX 5.4.2 mkfs(1M)
-X dirindexelementlog: Determines the default index element
size of directories to be created in the new file system. The
value specified is the element size in disk blocks, expressed
as a base 2 logarithm. This number must be an integer from 0
to 15, inclusive; the default value is 0 (meaning index
elements of 1 block).
-e firstanniversarysize: Determines the maximum number of
blocks a file can allocate in its initial disk allocation
region before subsequent allocation requests are redirected to
a different region. This number must be a positive integer;
the default is determined based on the size of the disk
allocation region.
-E secondanniversarysize: Determines the maximum number of
blocks a file can allocate in any noninitial disk allocation
region before subsequent allocation requests are redirected to
a different region. This number must be a positive integer
greater than first_anniversary_size; the default is determined
based on the size of the disk allocation region.
proto If the argument following special is a name of a file that can
be opened, it is taken as the pathname of a prototype file.
gap This argument has no effect. Under System V, the argument can
specify characteristics of the target physical disk, a purpose
that is irrelevant under the DG/UX system.
blockspercyl
This argument has no effect. Under System V, the argument can
specify characteristics of the target physical disk, a purpose
that is irrelevant under the DG/UX system.
Prototype File Format
The prototype file format is as follows. The file contains tokens
separated by spaces or new lines. The first token is the name of the
bootstrap program; this is completely ignored since mkfs does not
need to install bootstraps.
The second token is the size of the file system in disk blocks.
DG/UX file systems must occupy the entire logical disk, so if this
number is not equal to the disk size, mkfs will fail.
The third token is the number of inodes to be created in the file
system. The specified number will be rounded up so that each DAR is
given an equal number (which is itself a multiple of 64) of inodes.
The next set of tokens compose the specification for the root
directory: the mode, the user id, the group id and the initial
contents. The syntax of the contents field depends on the file mode.
The mode token for a file is a six-character string. The first
character specifies the file type using the same rules as ls(1). The
second character is either "u" or "-" to specify setuid or not. The
third character is either "g" or "-" to specify setgid or not. The
Licensed material--property of copyright holder(s) 3
mkfs(1M) DG/UX 5.4.2 mkfs(1M)
rest of the mode is a 3 digit octal number in the same manner as
ls(1). Two decimal number tokens follow the mode; they specify the
user and group ids of the file's owner.
If the file is an ordinary file, the next token is a pathname from
which the contents and size are copied. If the file is a block-
special or character special file, two decimal tokens follow which
give the file's major and minor device numbers. If the file is a
directory, mkfs makes the entries specified. This specification may
be recursive; each directory is terminated with the token "$".
DIAGNOSTICS
Mkfs will have no output except for diagnostic output in the case of
errors. mkfs will return an exit status of 0 if and only if the
specified file system was successfully created. Otherwise, mkfs will
return 1.
SEE ALSO
admpdisk(1M), admldisk(1M), admmdisk(1M), dfm(4), diskman(1M),
fsck(1M), sysadm(1M), tunefs(1M), fs(4).
Licensed material--property of copyright holder(s) 4