Creating and Mounting an XFS File System
Use the mkfs.xfs
command to create an XFS file system on a block
device, such as a partition, an LVM volume, a disk, or a similar hardware device.
You create XFS file systems by using the mkfs.xfs
command. The default
options for the command are appropriate for most common use cases. For more information, see
the mkfs.xfs(8)
manual page.
Notable XFS Feature Options
You can set some notable options when creating an XFS file system. Options are also
described in more detail in the mkfs.xfs(8)
manual page.
Table 3-1 Notable XFS Feature Options
Option | Description |
---|---|
logdev
|
Using an external log device for the XFS journal can reduce disk contention and improve the file system's I/O throughput. A suitable host device for the journal is a solid-state drive (SSD) device or a RAID device with a battery-backed, write-back cache. The default location for an XFS journal is on the same block device as the data. To reserve an external journal with a specified size when you create
an XFS file system, specify the |
bigtime
|
The Older XFS file systems might be formatted without this option
enabled. To enable the option on an existing file system, use the
|
inobtcount
|
The Older XFS file systems might be formatted without this option
enabled. To enable the option on an existing file system, use the
|
reflink
|
The See Copying Files By Using Shared Data Blocks for more information. |
su , sw |
The su option, for stripe unit, and the
sw option, for stripe width, can be specified when
formatting an XFS file system for a RAID device or a striped logical
volume. Specify the -d
su=<size>,sw=<width>
option to the mkfs.xfs command when you need to
specify particular device geometry. The stripe unit is specified as a
multiple of the file system block size. The stripe width is expressed as
a multiplier of the stripe unit value and is usually the same as the
number of members in the striped logical volume configuration or number
of disks in the RAID device.
|