File Systems
In brief: Every file carries dates (when it was created, changed, read), and each file system stores those dates in a fixed number of bits. Some older formats run out in 2038 (ext2, ext3, older XFS), some in 2040 (Apple's HFS+), 2106 (NFS version 3) or 2107 (FAT, used on USB sticks and SD cards). Modern formats like NTFS, APFS, Btrfs, ZFS and properly configured ext4 and XFS are good for centuries. A file system can be safe in its newest version but still unsafe on a disk that was formatted years ago with old settings.
| Risk level | Medium (High on embedded devices with ext3/small-inode ext4 or non-bigtime XFS) |
| Status | ext4 (256-byte inodes) and XFS bigtime fixed; ext2/ext3 and HFS+ formats cannot be fixed in place; existing volumes need checking |
| Last reviewed | 2026-10-21 |
2038 status at a glance
- At risk Confirmedext2 / ext3 file systemsThese use a fixed 128-byte inode with 32-bit signed seconds.Do: Reformat as ext4 with 256-byte inodes.
- At risk Confirmedext4 created with 128-byte inodesThere is no room for the extra epoch bits. This is common in small and embedded images and older mke2fs profiles.Do: Check with tune2fs -l. Back up, recreate with mkfs.ext4 -I 256, and restore.
- At risk ConfirmedXFS without the bigtime featureThe classic on-disk format ends in January 2038. Volumes made with older xfsprogs lack bigtime.Do: Upgrade offline with xfs_admin -O bigtime=1 (kernel 5.10+).
Not affected or different deadline (4), and why
- Different deadlineFAT12/16/32 and ZIP core-header datesThese store a 7-bit year offset from 1980.Do: Use the ZIP NTFS extra field, or a modern file system.
- Different deadlineHFS+ and classic Mac OS volumesThese use unsigned 32-bit seconds since 1904, ending 2040-02-06 06:28:15 GMT.Do: Migrate to APFS.
- Different deadlineNFSv3The protocol carries unsigned 32-bit seconds.Do: Use NFSv4, which has 64-bit seconds.
- Not affectedext4 (256-byte inodes), XFS bigtime, Btrfs, ZFS, NTFS, APFSEach has 64-bit or extended timestamps. ext4 lasts to 2446 and XFS bigtime to 2486. Btrfs, ZFS, NTFS and APFS last centuries or more.
Overview
A file-system timestamp limit is an on-disk format limit. Upgrading the kernel does not change data already written, and in many cases a volume must be converted or reformatted to gain a larger range. Linux makes this visible: since commit f8b92ba67c5d (merged after Linux 5.3-rc6, so first released in 5.4), mounting a file system that cannot store timestamps 30 years into the future logs a warning such as:
ext4 filesystem being mounted at /boot supports timestamps until 2038 (0x7fffffff)
The warning reuses the 30-year horizon that settimeofday() applies and was meant to push users toward ext4 rather than ext3 [1][2]. Arnd Bergmann's 2020 y2038 pull request notes that even after the kernel was fixed, "file systems with on-disk timestamps using signed 32-bit seconds" keep the 2038 problem [3].
Embedded devices are most exposed, because they often use ext2/ext3 or small-inode ext4 on flash, and FAT for removable media (see Devices-and-Embedded-Systems).
Technical details
ext2, ext3 and ext4
- ext2 and ext3 use a fixed 128-byte inode with 32-bit seconds fields, which "will overflow in January 2038" [4].
- ext4 adds an
_extrafield when the inode is larger than 128 bytes: "the lower two bits are used to extend the 32-bit seconds field to be 34 bit wide; the upper 30 bits are used to provide nanosecond timestamp accuracy." With these, "timestamps should not overflow until May 2446" [4]. - "By default, ext4 inode records are 256 bytes" [4], but small file systems and older
mke2fs.confprofiles created 128-byte inodes. A 2021 e2fsprogs patch proposed 256-byte inodes even for small file systems and a warning when 128-byte inodes are chosen [5]. Ubuntu tracked the same issue as bug 1881935 ("Minimum inode size should be raised to 256 for forward compatibility (Y2038)") [6]. - Check:
tune2fs -l /dev/sdX | grep "Inode size:". 128 is not 2038-safe; 256 is [7]. - Fix: there is no reliable in-place conversion.
tune2fs -I 256fails on file systems withflex_bg, so the recommended route is backup,mkfs.ext4 -I 256, restore [7]. - The separate ext3 driver was removed in Linux 4.3; ext4 mounts ext3 volumes [8], but that does not enlarge their inodes.
XFS
- Kernel 5.10 added the
bigtimefeature, which extends "the maximum recorded date stamps from 2038 to 2486 for the V5 on-disk format" [9]. With bigtime, the range is December 1901 to July 2486 [10]. - When introduced it was "not currently enabled by default" [10]; xfsprogs 5.15 made it the default for new file systems, and volumes made with older xfsprogs do not have it [9]. Red Hat documents that RHEL 9's
mkfs.xfsenablesbigtime(andinobtcount) by default. Such file systems "will not be mountable on RHEL 8 systems" unless created with-m bigtime=0,inobtcount=0, which gives up post-2038 timestamps [22]. Red Hat also says RHEL 9 ext4 supports timestamps beyond 2038 provided "the inode size is larger than 128 bytes, which it is by default" [22]. - Upgrade an existing (V5, cleanly unmounted) file system with
xfs_admin -O bigtime=1 /dev/sdX[9]. Root file systems need an initramfs or live environment to do this [9]. Red Hat recommends checking the file system for consistency before the upgrade [22]. - Check:
xfs_info /mountpoint | grep bigtime.
Btrfs
Btrfs stores btrfs_timespec as a 64-bit seconds field plus a 32-bit nanoseconds field [11]. Not affected by 2038.
NTFS
NTFS records times in UTC as FILETIME: "a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC)" [12]. Treated as a signed 64-bit value, that runs to about the year 30828 (derived arithmetic). Not affected.
FAT (FAT12/16/32) and DOS timestamps
FAT directory entries store the year in 7 bits counted from 1980. The Linux driver states: "FAT can only support year between 1980 to 2107" and clamps later dates to 2107-12-31 [13]. FAT also records local time rather than UTC [12]. The same DOS date format is used inside ZIP files (see File-Formats-and-Protocols).
HFS and HFS+
HFS+ stores dates as "unsigned 32-bit integers (UInt32) containing the number of seconds since midnight, January 1, 1904, GMT", and "the maximum representable date is February 6, 2040 at 06:28:15 GMT" [14]. Classic HFS uses the same seconds-since-1904 base but in local time [14]. The 2040 limit is a format limit; the fix is migration to APFS.
APFS
APFS stores timestamps as 64-bit nanoseconds since 1970-01-01 UTC and is described as "Y2K38 safe" [15]. Sources disagree on whether the field is signed (range 1677–2262) or unsigned (up to about 2554) [15][16]; either way it is far beyond 2038.
ZFS
OpenZFS stores times internally as 64-bit values; a 2020 Linux 5.6 compatibility commit replaced remaining time_t uses with uint64_t, "which is already how ZFS internally handled these values" [17]. An early ZFS on Linux issue (#487, "Enable 64-bit timestamps") tracked a 32-bit restriction that blocked setting dates after 2038 on Linux [18]. Kaspersky lists ZFS, F2FS, NTFS and ReFS among file systems with 64-bit timestamps [19].
NFS
NFSv3 (RFC 1813) carries times as two uint32 fields, seconds and nanoseconds since 1970 [20]. Because the seconds are unsigned, NFSv3 timestamps "reach until 2106, but don't go back before 1970" [21]. A 2014 proposal to reuse spare nanosecond bits for extra seconds was not adopted [21]. Kaspersky flags NFSv2 and NFSv3 as using an outdated time format [19]. NFSv4 uses a 64-bit seconds field (per RFC 7530; not re-checked for this page).
Affected versions / products
| File system | On-disk time field | Epoch | Max date | Fix |
|---|---|---|---|---|
| ext2 / ext3 (128-byte inode) | 32-bit signed seconds | 1970 | 2038-01-19 [4] | Reformat as ext4 with 256-byte inodes |
| ext4, 128-byte inodes | 32-bit signed seconds | 1970 | 2038-01-19 [4][7] | Backup, mkfs.ext4 -I 256, restore [7] |
| ext4, ≥ 256-byte inodes | 34-bit seconds + 30-bit ns | 1970 | 2446-05 [4] | — |
| XFS V5 without bigtime | 32-bit signed seconds | 1970 | 2038-01-19 | xfs_admin -O bigtime=1 (kernel ≥ 5.10) [9] |
| XFS with bigtime | 64-bit ns | 1901 (offset) | 2486-07 [10] | Default from xfsprogs 5.15 [9] |
| Btrfs | 64-bit s + 32-bit ns | 1970 | Effectively unlimited [11] | — |
| NTFS | 64-bit 100-ns ticks | 1601 | ~30828 (derived) [12] | — |
| FAT12/16/32 | 7-bit year, 2-s resolution | 1980 | 2107-12-31 [13] | Use exFAT/other where possible |
| HFS+ | 32-bit unsigned seconds | 1904 | 2040-02-06 06:28:15 GMT [14] | Migrate to APFS |
| APFS | 64-bit ns | 1970 | 2262 or later [15][16] | — |
| ZFS | 64-bit | 1970 | Effectively unlimited [17] | — |
| NFSv3 (protocol) | 32-bit unsigned seconds | 1970 | 2106-02-07 [20][21] | Use NFSv4 |
Risk & compliance notes
- Old volumes, new kernels. A modern distribution can still be running on an ext4 or XFS volume created years ago without the needed features. Check the volume, not the OS version.
- Embedded images. Build systems that generate small ext4 images often default to 128-byte inodes; this is exactly the case the 2021 e2fsprogs patch targeted [5].
- Backups and archives. Restoring files with post-2038 timestamps onto a 2038-limited file system silently clamps or rejects them.
- Owners: platform/infra teams for servers; firmware teams for embedded images; storage teams for NAS and NFS.
Detection & mitigation
# Kernel warnings at mount time
dmesg | grep -i "timestamps until"
# ext2/3/4: inode size
for d in $(lsblk -rno PATH,FSTYPE | awk '$2 ~ /^ext[234]$/ {print $1}'); do
echo "$d: $(tune2fs -l "$d" 2>/dev/null | grep 'Inode size')"; done
# XFS: bigtime flag
xfs_info /mountpoint | grep -o 'bigtime=[01]'
# Functional test on a scratch volume
touch -d '2040-01-01 00:00:00 UTC' testfile && stat testfile
See Testing-and-Detection and Remediation-Guide.
See also
- OS-Linux · OS-macOS-and-iOS · OS-Windows
- File-Formats-and-Protocols · Databases
- Devices-Networking-and-IoT
- Year-2106-and-Beyond
References
- Re: [Y2038] [PATCH 04/20] mount: Add mount warning for impending timestamp expiry — LKML, 2019-08 — origin and rationale of the mount warning.
- Warnings about filesystem timestamp support until 2038 — LKML, 2020-08 — refers to commit f8b92ba67c5d.
- Arnd Bergmann, "[GIT PULL] y2038: core, driver and file system changes" — LKML, 2020-01-29 — file systems with signed 32-bit timestamps remain affected.
- ext4 Data Structures and Algorithms: Index Nodes — Linux kernel documentation — 128 vs 256-byte inodes, extra epoch bits, May 2446.
- Darrick J. Wong, mke2fs patch: 256-byte inodes for small file systems — linux-ext4 Patchwork, 2021-08-11 — default change and warning for 128-byte inodes.
- Ubuntu bug 1881935 — foundations-bugs list, 2020-06 — minimum inode size 256 for Y2038.
- François Marier, "Upgrading an ext4 filesystem for the year 2038" — feeding.cloud.geek.nz, 2021-05-08 — warning text,
tune2fscheck, reformat procedure. - EXT3 file-system driver to be removed from the Linux kernel — Phoronix — ext3 driver removal in Linux 4.3.
- XFS — Gentoo Wiki — bigtime in kernel 5.10, default in xfsprogs 5.15,
xfs_admin -O bigtime=1. - XFS file-system with Linux 5.10 punts year 2038 problem to the year 2486 — Phoronix, 2020 — bigtime range Dec 1901–Jul 2486; not default at introduction.
- BTRFS_TIME struct reference — The Sleuth Kit 4.15 API docs — 64-bit seconds and 32-bit nanoseconds (seen in search results).
- FILETIME structure (minwinbase.h) — Microsoft Learn — 100-ns intervals since 1601; FAT local time vs NTFS UTC.
- fs/fat/misc.c — Android common kernel (Linux FAT driver) — 1980–2107 range, 7-bit year.
- Technical Note TN1150: HFS Plus Volume Format — Apple Developer — UInt32 seconds since 1904; max 2040-02-06 06:28:15 GMT.
- Jonathan Levin, OBTS v1 presentation — 2018 — APFS nanosecond timestamps, "Y2K38 safe" (seen in search results); see also dfdatetime: Date and time values (signed range 1677–2262).
- Be careful when interpreting APFS timestamps — The Eclectic Light Company, 2025-10-24 — describes APFS timestamps as unsigned 64-bit ns (seen in search results).
- Brian Behlendorf, "Linux 5.6 compat: time_t" — OpenZFS commit (mirror) — ZFS internally uses
uint64_tfor times (seen in search results). - Enable 64-bit timestamps, issue #487 — openzfs/zfs on GitHub — early 32-bit timestamp restriction on ZFS on Linux.
- Stan Kaminsky, "Epochalypse Now — or how to deal with Y2K38" — Kaspersky, 2026-01-19 — file-system summary (ZFS, F2FS, NTFS, ReFS safe; ext2/3 vulnerable; NFSv2/3 outdated).
- RFC 1813 (NFS Version 3) basic data types — Connected: An Internet Encyclopedia mirror —
nfstime3as two uint32 fields (seen in search results). - Arnd Bergmann on NFSv3 timestamps — LKML via lore.kernel.org, 2014 — NFSv3 reaches 2106, not before 1970; extension proposal (seen in search results).
- Considerations in adopting RHEL 9, Chapter 11: File systems and storage — Red Hat documentation — RHEL 9
mkfs.xfsenables bigtime and inobtcount by default; RHEL 8 mount incompatibility;xfs_adminupgrade; ext4 beyond 2038 with inodes larger than 128 bytes.