mkfs_vxfs - construct a VxFS file system
mkfs [ -t vxfs ] [ -mV ] [ -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 and uses the entire device.
size can also be specified with a suffix to indicate a unit of measure other than sectors. k or K indicates that the value is in kilobytes, m or M indicates megabytes, g or G indicates gigabytes, and t or T indicates terabytes. The appended letter can be separated from the number by a space if the letter and number are enclosed in quotation marks. See the EXAMPLES section.
The mkfs command builds a file system with a root directory and a lost+found directory. See the fsck(8) manual page.
VxFS allocates inodes dynamically. The mkfs command creates an initial set of inodes, then VxFS allocates additional inodes as-needed during file system use.
The Logical Volume Manager (LVM) and the Multiple Device (MD) drivers are not supported in this release.
The size argument is ignored when the device is a VxVM 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 -m command gives this warning if the device given is a VxVM volume set. The mkfs command fails if the -m options output is used for this purpose.
The mkfs command reserves a shared volume when invoked. If the shared volume is in use by another command, the mkfs command fails.
Be careful when accessing shared volumes with other utilities, such as dd, that can write data to disk. Such utilities can destroy data that is being accessed from other nodes.
generic_options Supported by the generic mkfs command. See the mkfs(8) manual page. specific_options Supported by the VxFS-specific mkfs. If you specify more than one option, separate each option with a comma. -t vxfs Specifies the VxFS file system type. -m Displays the command line that was used to create the file system. The file system must already exist. The output can be used to reconstruct the file system. -V Echoes 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. -o Specifies the VxFS-specific options in a comma-separated list. The following options are available:
bsize=bsize bsize is the block size in bytes for files on the file system and represents the smallest amount of disk space allocated to a file. bsize must be 1024, 2048, 4096, or 8192. If bsize is not specified, the block size defaults to the appropriate value when a file system is created. The value is determined by the size of the file system being created, according to the following table: File system size Default block size ---------------- ------------------ 0 TB to 1 TB 1k >1 TB 8k Similarly, the block size determines the maximum possible file system size, as given on the following table: Block size Maximum file system size ---------- ------------------------ 1k 32 TB 2k 64 TB 4k 128 TB 8k 256 TB The exact maximum file system sizes are one file system block size smaller than the above values. These maximum sizes are for disk layout Version 7 and later; prior versions support smaller sizes. inosize=inosize 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 If largefiles is specified, files two gigabytes or larger can be created. If nolargefiles is specified, files on the file system are limited to less than two gigabytes. The default is largefiles. The largefiles setting can be changed online at any time after file system creation by using the fsadm_vxfs command. See the fsadm_vxfs(1M) manual page. With largefiles, be sure that system administration utilities used on VxFS file systems, such as backup, operate on files greater than two gigabytes. logsize=n n is the number of file system blocks to allocate for an activity logging area. The following table displays the minimum and maximum values: Block size Minimum log size Maximum log size ---------- ---------------- ---------------- 1k 256 blocks 262,144 blocks 2k 128 blocks 131,072 blocks 4k 64 blocks 65,536 blocks 8k 32 blocks 32,768 blocks The default log size increases with the file system size, as shown on the following table: File system size Default log size ---------------- ---------------- 0 MB to 8 MB 256k 8 MB to 512 MB 1 MB 512 MB to 16 GB 16 MB 16 GB to 512 GB 64 MB 512+ GB 256 MB Smaller file systems are given smaller logs to avoid wasting space and to leave more room for file data. Larger logs provide better performance on metadata-intensive workloads, such as NFS. The amount of virtual memory required by fsck to check a VxFS file system is proportional to the size of the log. See the fsck_vxfs(1M) manual page for more information. The maximum amount of virtual memory used is twice the log size. Therefore, the sum of physical memory and swap space must be at least 32 megabytes to ensure that a file system with a 16 megabyte log can be cleaned. On small systems, do not create a file system with a log larger than half of the available swap space. A maximum log size of one-third of the total of memory and swap space is a good general rule. See the swap(1M) manual page. N 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. rcqsize=n n is the number of file system blocks to allocate for the reference count queue (rcq). The reference count queue is used for delayed updates to the shared block reference count. The following table displays the minimum and maximum values: Block size Minimum rcq size Maximum rcq size ---------- ---------------- ---------------- 1k 1024 blocks 65536 blocks 2k 512 blocks 32768 blocks 4k 256 blocks 16384 blocks 8k 128 blocks 8192 blocks The default reference count queue size increases with the file system size, as shown on the following table: File system size Default rcq size ---------------- ---------------- 0 MB to 16 GB 1 MB 16 GB to 32 GB 2 MB 32 GB to 128 GB 4 MB 128 GB to 512 GB 8 MB 512 GB to 1 TB 16 MB 1+ TB 64 MB This option is supported only on disk layout Version 8 and later. version=n n is the VxFS disk layout version number. Valid values are 7, 8, and 9. The default is disk layout Version 9. Version 7 improves cluster file system performance and improves the file systems administrative history logging. Version 8 adds support for shared extents. Version 9 adds support for compression. X Creates a file system in a file. Used for debugging. size must be specified if the X option is specified.
To create a VxFS file system on the VxVM volume set at the special device file /dev/vx/rdsk/dg1/vol1, with the file system size the same as the special device size, enter:
# mkfs -t vxfs /dev/vx/rdsk/dg1/vol1
To create a VxFS file system with an 8k block size and a 256 MB log size, enter:
# mkfs -t vxfs -o bsize=8192,logsize=32768 /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 the following command:
# mkfs -t vxfs -m /dev/vx/rdsk/dg1/vol1
To create a VxFS file system on the VxVM volume set at the special device file /dev/vx/rdsk/dg1/vset1, enter the following command:
# mkfs -t vxfs /dev/vx/rdsk/dg1/vset1
To create a VxFS file system and specify a size of 1 gigabyte, enter the following command:You can instead enter the following command:
# mkfs -t vxfs /dev/vx/rdsk/dg1/vset1 1g
# mkfs -t vxfs /dev/vx/rdsk/dg1/vset1 "1 g"
fsadm_vxfs(1M), fsck_vxfs(1M), fsvoladm(1M), mount_vxfs(1M), vxvset(1M), fs_vxfs(4), fsck(8), mkfs(8)
Veritas Storage Foundation Administrators Guide
|VxFS 6.0||mkfs_vxfs (1M)|