Symantec logo



mkfs_vxfs - construct a VxFS file system


mkfs [ -V vxfs ] [ -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 manual page). The file system can have disk layout Version 4, Version 6, or Version 7. Filesystems up to 8 terabytes can be created on the 64-bit versions of the 5.2 or 5.3 operating systems. 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.

Cluster File System Issues

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.


-V vxfs

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. On a disk layout Version 4 file system, the default is 1024 bytes. On a disk layout Version 6 or 7 file system, the default is 1024 bytes for file systems smaller than or equal to one terabyte. A file system larger than one terabyte requires an 8K block size. If bsize, is not specified, the block size defaults to the appropriate value when a file system is created.


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 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 disk layout Version 4 file system, the default logsize is 10 megabytes if the file system is less than 512 megabytes, or 16 megabytes if the file system is 512 megabytes or larger. For a disk layout Version 6 or 7 file system, the default logsize is 10 megabytes if the file system is less than 512 megabytes, 16 megabytes if the file system is 512 megabytes or larger up to 8 gigabytes, 32 megabytes if the file system is 8 gigabytes or larger up to 64 gigabytes, or 256 megabytes if the file system is 64 gigabytes 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.


# mkfs -V vxfs /dev/vx/rdsk/dg1/vol1

To determine the block size, disk layout version, inode size, log size, and device size of a VxFS file system, enter:

# mkfs -V vxfs -m /dev/vx/rdsk/dg1/vol1


fsck, mkfs, fsadm_vxfs(1M), fsck_vxfs(1M), mount_vxfs(1M), fs_vxfs(4)

Veritas Volume Manager Administrator's Guide