0

Ubuntu server 24.04 with installed nfs-kernel-server. In /etc/fstab entry for "/ ext4 defaults,strictatime, 0 1" When I use cat on file locally from shell, every cat updates Access time for this file.

I've exported folder with this file as NFS share with options (sync,no_subtree_check,insecure).

I've mounted this share on Ubuntu desktop (also with strictatime option) only first cat on this file is updating Access time for file. Next cats do not update access time.

Is it how it works or I should add something?

1 Answers1

1

All the atime option (that is also diratime and atime) are not supported by the NFS driver. More on this:

The Linux client handles atime updates more loosely, however. NFS clients maintain good performance by caching data, but that means that application reads, which normally update atime, are not reflected to the server where a file's atime is actually maintained. Because of this caching behavior, the Linux NFS client does not support generic atime-related mount options. See mount(8) for details on these options. In particular, the atime/noatime, diratime/nodiratime, relatime/norelatime, and strictatime/nostrictatime mount options have no effect on NFS mounts.

Rinzwind
  • 309,379