Previous  |  Next  >  
Product: File System Manual Pages for Storage Foundation   
Manual: Maintenance Commands (1m)   

mkfs_vxfs

NAME

mkfs_vxfs - construct a VxFS file system

SYNOPSIS


mkfs [ -F vxfs ] [ generic_options ] [ -o specific_options ] special [ size ]

AVAILABILITY

VRTSvxfs

DESCRIPTION

The mkfs command constructs a file system by writing on the special file special unless the -o N flag has been specified. The numeric size specifies the number of 1024-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(1M) manual page). The file system can have disk layout Version 4, Version 5, or Version 6. Version 4 adds support for large files and Access Control Lists. Version 5 adds support for 32 terabyte file systems and group quotas. Version 6 adds support for 8 exabyte file systems and various extended VxFS features such as multi-volume support and cross-platform data sharing. 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 6.

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.

NOTES

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.

OPTIONS

generic_options

Supported by the generic mkfs command (see the mkfs(1M) manual page).

specific_options

Supported by the VxFS-specific mkfs.

-F vxfs

Specifies the VxFS file system type.

-o

Specifies the VxFS-specific options in a comma-separated list.

The arguments aufirst, aupad, ausize, nau, and ninode are no longer supported.

The following options are available:

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.

X

Creates a file system in a file. Used for debugging. size must be specified if the X option is specified.

bsize=bsize

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

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

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(1M) and fsadm_vxfs(1M) manual page.

If the largefiles option is not set, and inosize is 256, the maximum number of inodes on the file system is approximately 8,380,000. If the largefiles option is not set, and inosize is 512, the maximum number of inodes on the file system is approximately 4,190,000.


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

logsize=n

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) on a file system with disk layout Version 6, or 16,384 kilobytes (16 MB) on a file system with disk layout Version 4 or 5. 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.


Note   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, 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. See swapinfo(1M).

version=n

n is the VxFS disk layout version number. Valid values are 4, 5, and 6. The Version 5 disk layout supports file systems up to 32 terabytes in size. The Version 6 disk layout supports file systems up to 8 exabytes in size, although file systems currently cannot be created with a size of 8 exabytes. The default is disk layout Version 6.

EXAMPLES

To create a VxFS file system on VERITAS Volume Manager volume, enter:


# mkfs -F 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 -F vxfs -m /dev/vx/rdsk/dg1/vol1

SEE ALSO

fsadm_vxfs (1M), fsck(1M), fsck_vxfs (1M), mkfs(1M), mount_vxfs (1M), swapinfo(1M), dir(4), fs_vxfs (4)
VERITAS Volume Manager Administrator's Guide
 ^ Return to Top Previous  |  Next  >  
Product: File System Manual Pages for Storage Foundation  
Manual: Maintenance Commands (1m)  
VERITAS Software Corporation
www.veritas.com