|mkfs.xfs(8)||System Manager's Manual||mkfs.xfs(8)|
In its simplest (and most commonly used form), the size of the filesystem is determined from the disk driver. As an example, to make a filesystem with an internal log on the first partition on the first SCSI disk, use:
The metadata log can be placed on another device to reduce the number of disk seeks. To create a filesystem on the first partition on the first SCSI disk with a 10MiB log located on the first partition on the second SCSI disk, use:
mkfs.xfs -l logdev=/dev/sdb1,size=10m /dev/sda1
Each of the option elements in the argument list above can be given as multiple comma-separated suboptions if multiple suboptions apply to the same option. Equivalently, each main option can be given multiple times with different suboptions. For example, -l internal,size=10m and -l internal -l size=10m are equivalent.
In the descriptions below, sizes are given in sectors, bytes, blocks, kilobytes, megabytes, gigabytes, etc. Sizes are treated as hexadecimal if prefixed by 0x or 0X, octal if prefixed by 0, or decimal otherwise. The following lists possible multiplication suffixes:
s - multiply by sector size (default = 512, see -s option below).
b - multiply by filesystem block size (default = 4K, see -b option below).
k - multiply by one kilobyte (1,024 bytes).
m - multiply by one megabyte (1,048,576 bytes).
g - multiply by one gigabyte (1,073,741,824 bytes).
t - multiply by one terabyte (1,099,511,627,776 bytes).
p - multiply by one petabyte (1,024 terabytes).
e - multiply by one exabyte (1,048,576 terabytes).
When specifying parameters in units of sectors or filesystem blocks, the -s option or the -b option may be used to specify the size of the sector or block. If the size of the block or sector is not specified, the default sizes (block: 4KiB, sector: 512B) will be used.
Many feature options allow an optional argument of 0 or 1, to explicitly disable or enable the functionality.
The value is either 0 or 1, with 1 signifying that filetype information will be stored in the directory structure. The default value is 1.
When CRCs are enabled (the default), the ftype functionality is always enabled, and cannot be turned off.
1 /stand/diskboot 2 4872 110 3 d--777 3 1 4 usr d--777 3 1 5 sh ---755 3 1 /bin/sh 6 ken d--755 6 1 7 $ 8 b0 b--644 3 1 0 0 9 c0 c--644 3 1 0 0 10 fifo p--644 3 1 11 slink l--644 3 1 /a/symbolic/link 12 : This is a comment line 13 $ 14 $
When the file is a directory, the mkfs.xfs command creates the entries dot (.) and dot-dot (..) and then reads the list of names and file specifications in a recursive manner for all of the entries in the directory. A scan of the protofile is always terminated with the dollar ( $ ) token.