New file on NFS volume has wrong atime and mtime

Solution Unverified - Updated -

Issue

  • A new file created on an NFS volume has wrong atime and mtime.
$ stat /mnt/nfs/newfile
  File: `/mnt/nfs/newfile'
  Size: 0           Blocks: 2          IO Block: 65536  regular empty file
Device: 27h/39d Inode: 13          Links: 1
Access: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root)
Context: system_u:object_r:nfs_t:s0
Access: 1970-01-01 01:38:24.000000000 +0000
Modify: 2009-05-27 03:08:01.000000000 +0000
Change: 2018-12-04 10:50:43.000000000 +0000
 Birth: -

Environment

  • Red Hat Enterprise Linux 7
  • kernel-3.10.0-327.36.3.el7 or earlier
  • NFSv4.1
  • open() with O_EXCL

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content