Prepare To Re-Format If You Are Using An Older XFS Filesystem
Linux 5.10 brings several new features to the XFS filesystem. It solves the year 2038 problem, it supports metadata checksumming and it has better metadata verification. There's also a new configuration option: CONFIG_XFS_SUPPORT_V4
. Older XFS filesystems using the v4 layout are now deprecated and there is no upgrade path beyond "backup and re-format". The Linux kernel will support older XFS v4 filesystems by default until 2025 and optional support will remain available until 2030.
written by 林慧 (Wai Lin) 2020-10-28 - last edited 2020-10-28. © CC BY
A new CONFIG_XFS_SUPPORT_V4
option in Linux 5.10. In case you want to.. still be able to mount existing XFS filesystems if/when you upgrade to Linux 5.10.
We previously reported that XFS patches for Linux 5.10 delay the 2038 problem to 2486. That's not the only new feature Linux 5.10 brings to the XFS filesystem when it is released early December: It supports metadata checksumming, it has better built-in metadata verification and there is a new CONFIG_XFS_SUPPORT_V4
configuration option. Make sure you don't accidentally say N
to that one if you have an older XFS filesystem you'd like to keep using if/when you upgrade your kernel. The help text for this option reads:
"The V4 filesystem format lacks certain features that are supported by the V5 format, such as metadata checksumming, strengthened metadata verification, and the ability to store timestamps past the year 2038. Because of this, the V4 format is deprecated. All users should upgrade by backing up their files, reformatting, and restoring from the backup.
Administrators and users can detect a V4 filesystem by running xfs_info against a filesystem mountpoint and checking for a string beginning with "crc=". If the string "crc=0" is found, the filesystem is a V4 filesystem. If no such string is found, please upgrade xfsprogs to the latest version and try again.
This option will become default N in September 2025. Support for the V4 format will be removed entirely in September 2030. Distributors can say N here to withdraw support earlier."
CONFIG_XFS_SUPPORT_V4
help text in Linux 5.10 rc1Yes, that really is the helpful help text for CONFIG_XFS_SUPPORT_V4
and yes, the proposed upgrade-path for existing XFS filesystems using the old layout really is take a backup of all existing files, recreate the filesystem and copy the backed up files onto the new filesystem. There's no "just run xfs_admin
(or xfs_repair
) option, you can't use xfs_metadump
and xfs_mdrestore
, wiping and recreating the existing XFS filesystem is the only option.
The good news is that there is a fair chance your XFS filesystem is using the "new" and still supported V5 filesystem layout.
xfs_info showing that a XFS filesystem is using the v5 format.
The XFS v5 on-disk format was introduced with the release of xfsprogs
version 3.2.0 and V5 become the default on-disk layout for new XFS filesystems with the release of xfsprogs
version 3.2.3 on October 18th, 2016. There is a fair chance that a XFS filesystem created the last three years is using the modern v5 on-disk format. It is also guaranteed that a XFS filesystem created more than four years is using the older v4 format.
You can easily check what on-disk format you are using by running xfs_info /mount/point
. It will say crc=0
if you are using v4 and crc=1
if you are using v5.
The good news for anyone who's got a 20 TiB RAID array using an older XFS filesystem is that the v4 layout will remain supported until 2030. The Linux kernels new CONFIG_XFS_SUPPORT_V4
configuration option will only default to Y
until 2025 but Linux distributions and end-users will still be able to choose Y
for five more years after that.
Enable comment auto-refresher