4

I have noticed this in kernel logs (with 20.10):

xfs filesystem being mounted at XYZ supports timestamps until 2038 (0x7fffffff)

This was V4 of the XFS file system. So I thought, I would buy a new disk, and I would format with 20.10 to V5 version of XFS and this would be fixed.

I have done that but the kernel still complains:

[ 1361.140829] XFS (nvme0n1p2): Mounting V5 Filesystem
[ 1361.143400] XFS (nvme0n1p2): Ending clean mount
[ 1361.144543] xfs filesystem being mounted at XYZ supports timestamps until 2038 (0x7fffffff)

For some reason I thought this would be fixed in V5 of XFS but it is not.

Am I right this is not fixed in any released Ubuntu version?

wilx
  • 636
  • 1
  • 8
  • 22
  • 3
    It's to do with signed 32 bit integers and there's a long way yet to go. You can read about it [here](https://en.wikipedia.org/wiki/Year_2038_problem) – graham Dec 26 '20 at 15:10
  • The kernel warning seems rather useless if there is no action that I can do to remedy it. – wilx Dec 26 '20 at 16:38
  • Without the kernel warning, you wouldn't know about it until 2038 when xfs timestamps would break. The Warning (not Error) message is probably part of the kernel's upgrade from 32 bit time to 64 bit time. – waltinator Dec 26 '20 at 19:15

1 Answers1

9

Introduced in kernel 5.10 is the XFS feature "bigtime" that supports dates until 2486. Ubuntu 21.04 uses kernel 5.11 so if you're using that version or newer of Ubuntu then you should be set. The latest LTS Ubuntu 20.04 is still using too old of a kernel. This will change with time of course.

To use this feature you must have a kernel v5.10 or newer and a similarly new version of mkfs.xfs.

When creating the filesystem do (mkfs.xfs 5.15 and newer has this set by default now):

mkfs.xfs -m bigtime=1 device

To convert an existing filesystem (must be unmounted) do:

xfs_admin -O bigtime=1 device

This is explained in the Arch Linux XFS wiki. Also according to the man page make sure to run xfs_repair -n on the filesystem before converting an existing filesystem. This checks to make sure there are no errors. If there are errors found then do not convert the filesystem.

Since it's easy to convert an existing filesystem I'm just going to wait until close to 2038 before converting my old filesystems. This leaves lots of time to work out any bugs. By then I will have probably recreated all my filesystems on new hardware anyway.

CR.
  • 246
  • 2
  • 5
  • OK. I have updated to 21.04, which has 5.11 kernel, but it appears the `xfs_admin` tool does not know about the `-O` option. – wilx Jun 12 '21 at 09:48
  • I have [created a bug report](https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/1931761) on Launchpad for this. They need to update the xfstools package to 5.11. – wilx Jun 12 '21 at 09:58
  • Yes. I was also just reading the man page for the new xfs_admin and it says to run `xfs_repair -n` on the filesystem to check for errors before converting it. I have updated my original post. – CR. Jun 13 '21 at 00:27