Installation guide

Chapter 9. The XFS File System
50
log =internal log bsize=4096 blocks=6400, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
Note
After an XFS file system is created, its size cannot be reduced. However, it can still be enlarged
using the xfs_growfs command (refer to Section 9.4, “Increasing the Size of an XFS File
System”).
For striped block devices (e.g., RAID5 arrays), the stripe geometry can be specified at the time of
file system creation. Using proper stripe geometry greatly enhances the performance of an XFS
filesystem.
When creating filesystems on lvm or md volumes, mkfs.xfs chooses an optimal geometry. This may
also be true on some hardware RAIDs which export geometry information to the operating system.
To specify stripe geometry, use the following mkfs.xfs sub-options:
su=value
Specifies a stripe unit or RAID chunk size. The value must be specified in bytes, with an optional
k, m, or g suffix.
sw=value
Specifies the number of data disks in a RAID device, or the number of stripe units in the stripe.
The following example specifies a chunk size of 64k on a RAID device containing 4 stripe units:
mkfs.xfs -d su=64k,sw=4 /dev/device
For more information about creating XFS file systems, refer to man mkfs.xfs.
9.2. Mounting an XFS File System
An XFS file system can be mounted with no extra options, for example:
mount /dev/device /mount/point
XFS also supports several mount options to influence behavior.
By default, XFS allocates inodes to reflect their on-disk location. However, because some 32-bit
userspace applications are not compatible with inode numbers greater than 2
32
, XFS will allocate all
inodes in disk locations which result in 32-bit inode numbers. This can lead to decreased performance
on very large filesystems (i.e. larger than 2 terabytes), because inodes are skewed to the beginning of
the block device, while data is skewed towards the end.
To address this, use the inode64 mount option. This option configures XFS to allocate inodes and
data across the entire file system, which can improve performance:
mount -o inode64 /dev/device /mount/point
Write Barriers
By default, XFS uses write barriers to ensure file system integrity even when power is lost to a device
with write caches enabled. For devices without write caches, or with battery-backed write caches,
disable barriers using the nobarrier option, as in: