XFS 文件系统是一个高性能日志文件系统。它兼容 ACL (POSIX)，可与 Linux 一起使用。
XFS has a particularly strong reputation for reliability and led to the creation of the venerable xfstests Linux kernel test suite which now tests regressions in various filesystems.
File systems ---> <*> XFS filesystem support
File systems ---> [*] XFS Quota support [*] XFS POSIX ACL support [*] XFS Realtime subvolume support [ ] XFS Verbose Warnings [ ] XFS Debugging support
XFS用户空间实用程序 需要 sys-fs/xfsprogs 软件包：
emerge --ask sys-fs/xfsprogs
使用 mount 命令挂载 XFS 文件系统。
Make an XFS filesystem with mkfs.xfs from xfsprogs:
mkfs.xfs -L 'label'
XFS supports SSD discards in /etc/fstab.
支持 2038 年时间戳（bigtime）
Older partitions (created with <xfsprogs-5.15) will not have bigtime enabled by default. Mounting such partitions results in a warning like:
... [ 4.036258] xfs filesystem being mounted at /home supports timestamps until 2038 (0x7fffffff) ...
To check the current version of xfsprogs, run mkfs.xfs -V. There's no need for this on up-to-date Gentoo systems, but it might be necessary if using install media from another distribution with older userland.
The bigtime code support was enabled by default in xfsprogs 5.15, so manual setting is not required in newer versions.
To upgrade an older filesystem to
bigtime, first cleanly unmount the file system. The upgrade will refuse to run if the unmount was not completely clean.
xfs_admin -O bigtime=1 /dev/sda1
XFS on the root mount will require an initramfs or other live environment with the necessary tools to perform an upgrade to the metadata.
Using Dracut initramfs to perform the upgrade
First, Dracut needs additional files included in the initramfs in order to perform the upgrade. This can be accomplished with either the
--install option or inside a configuration file using the
dracut --install "/usr/sbin/xfs_admin /usr/bin/expr" ...
Then, the kernel command line option can be modified to include
rd.break=pre-mount to stop the initramfs just before it would mount the root filesystem. Ensure this is done temporarily and removed on subsequent reboots after upgrade.
To schedule removal at the next run:
emerge --ask --depclean --verbose sys-fs/xfsprogs