newfs_hfs(1M) newfs_hfs(1M)
NAME [Toc] [Back]
newfs_hfs: newfs - construct a new HFS file system
SYNOPSIS [Toc] [Back]
/usr/sbin/newfs [-F hfs] [-B] [-d] [-L|-S] [-O disk_type] [-R swap]
[-v] [-V] [mkfs-options] special
DESCRIPTION [Toc] [Back]
The newfs command builds a file system by invoking the mkfs command.
The newfs command creates the file system with a rotational delay
value of zero (see tunefs(1M)).
special represents a character (raw) special device.
Options [Toc] [Back]
newfs recognizes the following options:
-F hfs Specify the HFS file system type.
-B Reserve space for boot programs past the end of
the file system. If file /usr/lib/uxbootlf is
present on the system then sufficient space to
accommodate that file is reserved, otherwise 691
KB sectors are reserved. This option decreases
the size of the file system to be created. This
option cannot be used if the -s option is given;
see "mkfs Options" below.
-d This option allows the newfs command to make the
new file system in an ordinary file. In this
case, special is the name of an existing file in
which to create the file system. The -s option
(see "mkfs Options") must be provided with this
option.
-L|-S There are two types of HFS file systems,
distinguished mainly by directory formats that
place different limits on the length of file
names.
If -L is specified, build a long-file-name file
system that allows directory entries (file names)
to be up to MAXNAMLEN (255) bytes long.
If -S is specified, build a short-file-name file
system that allows directory entries (file names)
to be up to DIRSIZ (14) bytes long.
If neither -L nor -S is specified, build a file
system of the same type as the root file system.
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
newfs_hfs(1M) newfs_hfs(1M)
-O disk_type Use disk parameters from the entry for the named
disk type in /etc/disktab. This option is
provided for backward compatibility with previous
HP-UX releases. Any parameters specified in the
command line will override the corresponding
values in /etc/disktab. Any values not given in
the command line or in /etc/disktab will be
defaulted.
-R swap Reserve swap megabytes (MB) of swap space past the
end of the file system. This option decreases the
size of the file system to be created by the given
amount. This option cannot be used if the -s
option is given; see "mkfs Options" below.
-v Verbose; the newfs command prints out its actions,
including the parameters passed to the mkfs
command.
-V Echo the completed command line, but perform no
other actions. The command line is generated by
incorporating the user-specified options and other
information derived from /etc/fstab. This option
allows the user to verify the command line.
Both the -R and -B options can be given in the same command line. In
this case, both the requested swap space and the space needed for boot
programs are reserved. These options are for use when the file system
size defaults to the size of the entire disk.
mkfs Options
The mkfs-options argument can be zero or more of the following options
that can be used to override default values passed to the mkfs
command:
-b blksize The primary block size for files on the file
system. Valid values are: 4096, 8192, 16384,
32768, and 65536. The default value is 8192
bytes.
-c cylinders_per_group
The number of disk cylinders per cylinder group.
This number must be in the range 1 to 32. The
default value is 16 cylinders per group.
-f fragsize The fragment size for files on the file system.
fragsize represents the smallest amount of disk
space to be allocated to a file. It must be a
power of two no smaller than DEV_BSIZE and no
smaller than one-eighth of the file system block
size. The default value is 1024 bytes.
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
newfs_hfs(1M) newfs_hfs(1M)
-i number_of_bytes_per_inode
The density of inodes in the file system specified
as the number of bytes per inode. The default is
6144 bytes per inode.
This number should reflect the expected average
size of files in the file system. If fewer inodes
are desired, a larger number should be used; if
more inodes are desired, a smaller number should
be used.
Note: The number of inodes that will be created in
each cylinder group of a file system is
approximately the size of the cylinder group
divided by the number of bytes per inode, up to a
limit of 2048 inodes per cylinder group. If the
size of the cylinder group is large enough to
reach this limit, the default number of bytes per
inode will be increased.
-m free_space_percent
The minimum percentage of free disk space allowed.
The default value is 10 percent.
Once the file system capacity reaches this
threshold, only users with appropriate privileges
can allocate disk blocks.
-r revolutions_per_minute
The disk speed in revolutions per minute (rpm).
The default value is 3600 revolutions per minute.
-s size The number of DEV_BSIZE blocks in the file system.
DEV_BSIZE is defined in <sys/param.h>. The
default value is the size of the entire disk or
disk section minus any swap or boot space
requested. See mkfs_hfs(1M) for limits on the
size of HFS file systems.
-t tracks_per_cylinder
The number of tracks per cylinder. The default
value depends on the size of the file system. For
file systems of less than 500 MB, the default is
7; for file systems between 500 MB and 1 GB, the
default is 12; for file systems larger than 1 GB
the default is 16.
-o specific_options
Specify a list of comma separated suboptions
and/or keyword/attribute pairs from the list
below.
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003
newfs_hfs(1M) newfs_hfs(1M)
largefiles |nolargefiles
Controls the largefile featurebit for the
file system. The default is nolargefiles.
This means the bit is not set and files
created on the file system will be limited to
less than 2 gigabytes in size. If largefiles
is specified, the bit is set and the maximum
size for files created on the file system is
not limited to 2 gigabytes (see mount_hf
).
Access Control Lists [Toc] [Back]
Every file with one or more optional ACL entries consumes an extra
(continuation) inode. If you anticipate significant use of ACLs on a
new file system, you can allocate more inodes by reducing the value of
the argument to the -i option appropriately. The small default value
typically causes allocation of many more inodes than are actually
necessary, even with ACLs. To evaluate the need for extra inodes, run
the bdf -i command on existing file systems. For more information on
access control lists, see acl(5).
EXAMPLES [Toc] [Back]
Execute the newfs command to create an HFS file system on a non-LVM
disk /dev/rdsk/c1t0d2 and reserve 40 megabytes of swap space.
newfs -F hfs -R 40 /dev/rdsk/c1t0d2
Create an HFS file system within a logical volume, my_lvol, whose size
is identical to that of the logical volume. (Note the use of the
character (raw) special device.)
newfs -F hfs /dev/vg01/rmy_lvol
WARNINGS [Toc] [Back]
The old -F option, from prior releases of newfs(1M), is no longer
supported.
newfs(1M) cannot be executed specifying creation of a file system on a
whole disk if that disk was previously used as an LVM disk. If you
wish to do this, use mediainit(1) to reinitialize the disk first.
AUTHOR [Toc] [Back]
newfs was developed by HP and the University of California, Berkeley.
FILES [Toc] [Back]
/etc/disktab
/etc/fstab Static information about the file systems.
SEE ALSO [Toc] [Back]
bdf(1M), fsadm_hfs(1M), mkboot(1M), mkfs(1M), mkfs_hfs(1M),
mount_hfs(1M), newfs(1M), tunefs(1M), disktab(4), acl(5).
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: August 2003 [ Back ] |