mkfs_vxfs - construct a VxFS file system
mkfs [ -t vxfs ] [ generic_options ] [ -o specific_options ] special [ size ]
The mkfs command constructs a file system by writing on the special device file (for example, dev/vx/rdsk/dg1/vol1) unless the -o N flag is provided. special specifies the special device file location (or character device node) of a particular storage device. The numeric size specifies the number of 512-byte sectors in the file system. 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, g or G to indicate gigabytes, or t or T to indicate terabytes. 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").
The mkfs command builds a file system with a root directory and a lost+found directory (see the fsck(8) manual page). The file system can have disk layout Version 4, Version 6, or Version 7. Version 6 adds support for 8 exabyte file systems and various extended VxFS features such as multi-volume support and cross-platform data sharing. Version 7 adds support for variable and large size history log records. File systems larger than 32 terabytes can be created only on 64-bit kernel operating systems and on a Veritas Volume Manager volume. The default is Version 7.
The number of inodes allocated to a file system depends on the disk layout version. Inodes are allocated 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.
The size argument is ignored when the volume is part of a volume set. The full size of each volume is used instead.
The output of the -m option is not sufficient to recreate a multi-volume file system. The mkfs_vxfs command fails if the -m option's output is used for this purpose.
The Logical Volume Manager (LVM) and the Multiple Device (MD) driver are not supported in this release.
The mkfs command reserves a shared volume when invoked. If the shared volume is in use by another command, the mkfs command will fail.
Be careful when accessing shared volumes with other utilities, such as dd, that can write data to disk. It is possible to destroy data being accessed from other nodes.
Supported by the generic mkfs command (see the mkfs(8) manual page).
Supported by the VxFS-specific mkfs.
Specifies the VxFS file system type.
Displays the command line that was used to create the file system. The file system must already exist. This option also enables you to determine the parameters used to construct the file system.
Echos the completed command line, but does not perform the action. The command line is generated by incorporating the specified options and arguments with other information derived from /etc/fstab. This option allows the user to verify the command line.
Specifies the VxFS-specific options in a comma-separated list. The following options are available:
Does 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.
Creates a file system in a file. Used for debugging. size must be specified if the X option is specified.
bsize is the block size for files on the file system and represents the smallest amount of disk space allocated to a file. bsize must be a power of 2 selected from the range 1024 bytes to 8192 bytes. The default is 1024 bytes for file systems smaller than two terabytes. For file systems larger than two terabytes, the maximum file system size is dependent on the block size. A block size of 1K allows a maximum file system size of up to 32 terabytes, a block size of 2K allows a maximum file system size of up to 64 terabytes, a block size of 4K allows a maximum file system size of up to 128 terabytes, and a block size of 8K allows for a file system up to 256 terabytes. These maximum sizes are for disk layout Version 7. The actual maximum file system sizes are slightly less than the above values. The exact values can be found in the Veritas File System Administrator's Guide. If bsize, is not specified, the block size defaults to the appropriate value when a file system is created.
When specifying the -o bsize= option, ensure that you have a space between the -o and bsize=.
inosize is the on-disk inode structure size for files on the file system. The valid values are 256 and 512. The default is 256. There is generally no reason to increase the inode size, and not using the default value can adversely affect file system performance.
largefiles | nolargefiles
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 largefiles. See the mkfs(8) and fsadm_vxfs(1M) manual page.
VxFS file systems are created by default with the largefiles option enabled. Be sure that any system administration utilities used on VxFS file systems, such as backup, operate on large files.
n is the number of file system blocks to allocate for an activity logging area. The minimum value 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 262,144 kilobytes (256 MB). The default logsize is 16 megabytes for file systems that are 512 megabytes or larger. For a small file system, the default may be smaller to avoid wasting space.
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, an NFS-intensive workload performs better with a large log; a small floppy device requires a small log.
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, be careful 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 general rule.
n is the VxFS disk layout version number. Valid values are 4, 6, and 7. Version 6 and 7 disk layouts support file systems up to 256 terabytes in size, although file systems currently cannot be created with a size of 8 exabytes. The default is disk layout Version 7.
To determine the block size, disk layout version, inode size, log size, and device size of a VxFS file system, enter:
# mkfs -t vxfs -m /dev/vx/rdsk/dg1/vol1
fsadm_vxfs(1M), fsck_vxfs(1M), mount_vxfs(1M), fs_vxfs(4), fsck(8), mkfs(8)
Veritas Volume Manager Administrator's Guide