Linux doesn't serve birth time attribute over NFS

According to this Phoronix article, Linux should support the birth time attribute in the NFS server since 5.18. However, it doesn’t show up in the stat output when looking at the file through the NFS mount, or elsewhere (at least, the Dolphin file browser and also a macOS client):


<span style="color:#323232;">% stat file
</span><span style="color:#323232;">  File: file
</span><span style="color:#323232;">  Size: 0               Blocks: 0          IO Block: 1048576 regular empty file
</span><span style="color:#323232;">Device: 0,70    Inode: 103416894   Links: 1
</span><span style="color:#323232;">Access: (0644/-rw-r--r--)  Uid: ( 1000/   saiko)   Gid: (  100/   users)
</span><span style="color:#323232;">Access: 2023-12-17 03:22:45.368950609 +0100
</span><span style="color:#323232;">Modify: 2023-12-17 03:22:45.368950609 +0100
</span><span style="color:#323232;">Change: 2023-12-17 03:22:45.368950609 +0100
</span><span style="color:#323232;"> Birth: -
</span>

What gives? Running stat on the server directly, it shows the attribute. The backing file system is ext4, kernel 6.5.12. The client is using kernel 6.1.63.

CMahaff,

Simple thing, but are you sure you mounted the NFS share as NFSv4? I don’t have access to a machine to check right now, but I think it might default to mounting NFSv3, even if both sides support v4.

2xsaiko, (edited )
@2xsaiko@discuss.tchncs.de avatar

It is NFS4:


<span style="color:#323232;">vineta.h.kfe.pt:/nfs/nas on /nfs/nas type nfs4 (rw,relatime,vers=4.2,rsize=1048576,wsize=1048576,namlen=255,soft,proto=tcp6,timeo=600,retrans=2,sec=krb5p,clientaddr=2001:470:7391::ce,local_lock=none,addr=2001:470:7391::c0,_netdev)
</span>
allywilson,

Which version of stat do you have? I get the same blank result locally on ext4 and btrfs filesystems (not over nfs) using stat 8.30 on an rpi4 (raspbian, 5.10.103-v8+).

Seems to work fine with stat 8.32 on xfs on a spot instance I have, running Rocky 9 (5.14.0-362.13.1.el9_3.x86_64).

I thought there might be more info in the changelog: info coreutils aqstat invocationaq but I’m not seeing it.

e0qdk,
@e0qdk@kbin.social avatar

[coreutils-announce] coreutils-8.31 released [stable]

stat now prints file creation time when supported by the file system,
on GNU Linux systems with glibc >= 2.28 and kernel >= 4.11.

https://lists.gnu.org/archive/html/coreutils-announce/2019-03/msg00000.html

(found thanks to this blog post titled "File Creation Time in Linux")

2xsaiko,
@2xsaiko@discuss.tchncs.de avatar

I have 9.3. It works for me on a local file system on the client as well as the server, just not through NFS.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #