Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > m

mkfs_vxfs(1M)

HP-UX 11i Version 1.6: June 2002
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

NAME

mkfs_vxfs: mkfs — 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

mkfs creates a VxFS file system by writing on the special device file, unless either the -o N or -m option is specified. 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 numeric size specifies the number of sectors in the file system. By default, size is specified in units of DEV_BSIZE sectors (currently, 1024 bytes). If size is not specified, mkfs determines the size of the special device.

size can also be specified with a suffix to indicate a unit of measure other than sectors. Append k or K to indicate the value is in kilobytes, m or M to indicate megabytes, or g or G to indicate gigabytes. An appended letter can be separated from the number by a space. In that case, enclose the letter and number in a set of quotes, for example:

"512 k"

mkfs builds a file system with a root directory and a lost+found directory (see fsck_vxfs(1M)). The file system can have disk layout Version 2, disk layout Version 3, or disk layout Version 4. Version 2 supports dynamic inode allocation. Version 3 adds support for large files and large UIDs. Version 4 adds support for Access Control Lists. On HP-UX 11.1x systems, the default is Version 4. On HP-UX 11.0 systems, the default is Version 3. You can choose the disk layout version with the version=n option (see below).

Inode allocation is done dynamically. There are a minimum number of inodes allocated to the file system by mkfs, and any other inode allocations are done on an as-needed basis during file system use.

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.

-V

Echo the completed command line, but do not execute the command. 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.

-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.

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. Used for debugging only.

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. This option is not applicable to Version 3 and 4 disk layouts, which always set the starting block number to zero.

aupad=n

n is the size, in blocks of size bsize, of the padding 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. This option is ignored for Version 3 and 4 disk layouts.

ausize=n

n is the size, in blocks of size bsize, of an allocation unit. This option is not applicable to the Version 3 and 4 disk layouts, which fix the allocation unit size at 32768. For disk layout Version 2, this is an alternate way of specifying the number of allocation units. This option cannot be used with the nau option. With ausize, the last allocation unit on the file system can 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 size of the resulting file system is shortened 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.

bsize=n

n is the block size for files on the file system and represents the smallest amount of disk space allocated to a file. n must be a power of 2 selected from the range 1024 to 8192. The default is 1024 for file systems less than 8 gigabytes, 2048 for file systems less than 16 gigabytes, 4096 for file systems less than 32 gigabytes, and 8192 for larger file systems.

inosize=n

n is the on-disk inode structure size for files on the file system. The valid values are 256 and 512 bytes. The default is 256. There is usually no reason to increase the inode size, and not using the default value can adversely affect file system performance.

largefiles|nolargefiles

Valid only for the Version 3 and 4 disk layouts. Controls the largefiles flag for the file system. If largefiles is specified, the bit is set and files two gigabytes or larger can be created. If nolargefiles is specified, the bit is cleared and files created on the file system are limited to less than two gigabytes. The default is nolargefiles. See fsadm_vxfs(1M).

NOTE: Large files are supported on HP-UX 10.20 systems and above. Be careful when implementing large file system capability. System administration utilities such as backup may not operate correctly if they are not large-file aware.

logsize=n

n is the number of file system blocks to allocate for an activity logging area. The minimum value for Version 2 and 3 disk layouts is 32 blocks. The minimum value for Version 4 disk layouts is the number of blocks that make the log no less than 256K. The maximum value for n is the number of blocks that make the log no greater than 16384K. 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.

A large log provides better performance on metadata-intensive workloads. A small log uses less space on the disk and leaves more room for file data. for example, and NFS-intensive workload performs better with a large log; a small floppy device requires a small log.

NOTE: The amount of virtual memory required by fsck (see fsck_vxfs(1M)) to check a VxFS file system is proportional to the size of the log. The maximum amount of virtual memory used is twice the size of the log. Therefore, the sum of physical memory and swap space must be at least 32 MB to ensure that a file system with a 16384K log can be cleaned. On small systems, take care not to create a file system with a log larger than half the available swap space. A maximum log size of one third the total of memory and swap space is a good rule of thumb (see swapinfo(1M)).

nau=n

n is the number of allocation units on the file system. This option is not applicable to the Version 3 and 4 disk layouts. For disk layout Version 2, if nau is specified, then ausize is determined by evenly dividing the sectors among the allocation units. By default, the number of allocation units is based on the value of ausize.

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. The digit 0 and the string unlimited both mean that the number of inodes is unlimited. The default is unlimited.

version=n

n is the VxFS disk layout version number. Valid values are 2, 3, and 4.

EXAMPLES

To use mkfs to create a VxFS file system on /dev/rdsk/c0t6d0:

mkfs -F vxfs /dev/rdsk/c0t6d0 1024

To use mkfs to determine the command that was used to create the VxFS file system on /dev/rdsk/c0t6d0:

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

To create a VxFS file system on /dev/vgqa/lvol1, with a Version 4 disk layout and largefiles capability:

mkfs -F vxfs -o version=4,largefiles /dev/vgqa/lvol1

WARNINGS

If you want to reuse a special device that was previously used by LVM, you must first wipe out all the LVM information remaining on the disk. Use pvremove(1M) to remove the LVM information before executing mkfs_vxfs(1M). (You can also remove the LVM information by initializing the device with mediainit(1), but that is slower.)

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.

STANDARDS CONFORMANCE

mkfs : SVID3

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2002 Hewlett-Packard Development Company, L.P.