HPlogo HP-UX Reference Volume 2 of 5 > m

mkfs_vxfs(1M)

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

NAME

mkfs (vxfs) — construct a VxFS file system

SYNOPSIS

/usr/sbin/mkfs [-F vxfs] [-V] -m special

/usr/sbin/mkfs [-F vxfs] [-V] [-o [N] [X] [ninode= n] [nau= n] [bsize= n] [logsize= n] [ausize= n] [aufirst= n] [aupad= n] [version= n] [inosize= n] [largefiles|nolargefiles] ] special size

DESCRIPTION

The mkfs command creates a VxFS file system by writing on the special device file. special must be the first argument after the options are given. The file system is created based on the options and size specified on the command line. The size specifies the number of sectors in the file system. By default, size is specified in units of DEV_BSIZE sectors. However, the letter k, m, or g can be appended to the number to indicate that the value is in kilobytes, megabytes, or gigabytes, respectively. The mkfs command builds a file system with a root directory and a lost+found directory.

Options

mkfs recognizes the following options:

-F vxfs

Specify the VxFS file system type.

-m

Display the command line which was used to create the file system. The file system must already exist. This option provides a means of determining the command used in constructing the file system.

-o specific_options

Specify options specific to the VxFS file system type. specific_options is a comma separated list of suboptions and/or keyword/attribute pairs intended for the VxFS-specific module of the command.

The following specific_options are valid on a VxFS file system:

N

Do not write the file system to the special file. This option gives all the information needed to create a file system but does not create it.

X

Create a file system in a file. This is used for debugging purposes only.

version=n

n is the VxFS disk layout version number. n can be 2 or 3 to indicate the Version 2 or Version 3 disk layout. Version 2 supports dynamic inode allocation. Version 3 adds support for large files and large UIDs. The default is the Version 3.

inosize=n

n is the on-disk inode structure size for files on the file system. The only allowed value is 256 bytes.

bsize=n

n is the block size for files on the file system and represents the smallest amount of disk space that will be allocated to a file. n must be a power of 2 selected from the range 1024 to 8192. The default is 1024.

ninode=n

n is the maximum number of inodes in the file system. The actual maximum number of inodes is n rounded up to an appropriate boundary. For a Version 2 or 3 disk layout this is the maximum number of inodes, The number 0 and the string ``unlimited'' are interpreted to mean that the number of inodes is unlimited. The default is ``unlimited'' for a Version 2 or 3 disk layout.

nau=n

n is the number of allocation units on the file system. If nau is specified, then ausize is determined by evenly dividing the sectors among the allocation units. By default, the number of allocation units will be set based on the value of ausize. This option is ignored for a Version 3 disk layout.

ausize=n

n is the size, in blocks of size bsize, of an allocation unit. This is an alternate way of specifying the number of allocation units. This option may not be used in conjunction with the nau option. With this option, the last allocation unit on the file system may be shorter than the others. If the last allocation unit on the file system is not long enough to contain an entire allocation unit header, the resulting size of the file system will be to the end of the last complete allocation unit. This parameter may not exceed 262144 blocks.

The algorithm used to choose the default value is rather complicated, but is intended to balance the number of allocation units (4 to 16 is a good range), the size of the allocation units (at least 32768 blocks), and other factors. For a Version 3 disk layout the allocation unit size is fixed at 32768 blocks, and this option is ignored.

aufirst=n

n is the starting block number, in blocks of size bsize, of the first allocation unit. This option allows the allocation units to be aligned to a particular boundary, such as a cylinder boundary. For a Version 3 file system, aufirst is always 0, and this option is ignored.

aupad=n

n is the size, in blocks of size bsize, to leave between the end of the inode list and the first data block in each allocation unit. This option allows the data blocks of an allocation unit to be aligned to a particular boundary, such as a cylinder boundary. For a Version 3 file system, aupad is always 0, and this option is ignored.

logsize=n

n is the number of blocks to allocate for an activity logging area. n must be in the range 32 blocks to 16384 Kbytes. Although logsize is specified in blocks, the maximum value is 16384 Kbytes. This means that for a bsize of 1024, 2048, 4096, or 8192 bytes the maximum value of logsize is 16384, 8192, 4096, or 2048 blocks, respectively. To avoid wasting space, the default logsize is 1024 blocks for a file system 8 megabytes or larger, 128 blocks for a file system 2 megabytes or larger but less than 8 megabytes, and 32 blocks for a file system less than 2 megabytes.

largefiles|nolargefiles

Controls the largefile compatibility bit for the file system. By default 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 file size for files created on the file system is not limited to 2 gigabytes (see mount_vxfs(1M) and fsadm_vxfs(1M)). This option is only valid for a Version 3 disk layout. The default is nolargefiles, although the default may change in the future.

-V

Echo the completed command line, but performs no other action. 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.

EXAMPLES

Execute the mkfs command to create a VxFS file system on /dev/rdsk/c0t6d0:

mkfs -F vxfs /dev/rdsk/c0t6d0 1024

Execute the mkfs command on a VxFS file system, /dev/rdsk/c0t6d0, to determine the command that was used to create the file system on /dev/rdsk/c0t6d0:

mkfs -F vxfs -m /dev/rdsk/c0t6d0

WARNINGS

mkfs_vxfs(1M) cannot be executed on a device that belonged to a logical volume group, unless the device is initialized by mediainit(1).

The -o largefiles option should be used with care, since older applications will not react correctly when confronted with large files.

RETURN VALUE

Upon successful completion, the mkfs command returns a value of 0. The return value is 1 if a syntax error occurs. Other errors return a value of 32.

FILES

/etc/fstab

Default list of file systems to check.

STANDARDS CONFORMANCE

mkfs : SVID3

© Hewlett-Packard Development Company, L.P.