Skip to main content
NetApp Knowledge Base

Is it possible to update ctime by specifying ONTAP mount options?

Views:
108
Visibility:
Public
Votes:
0
Category:
ontap-9
Specialty:
nas
Last Updated:

Applies to

  • ONTAP 9.x
  • NFS

Answer

  • After creating an empty file with the touch command on the local disk (/tmp/), when updating atime with touch -a, ctime will also be updated.
  • Similarly, after creating an empty file with the touch command on NetApp's NFS file system, when updating atime with touch -a, ctime remains not updated.
  • This is the NFS specification
  • There are no mount options that can control ctime on the ONTAP side.

Additional Information

  • The touch -a command in Unix/Linux systems is used to change the access time (atime) of a file.
  • The -a flag specifically stands for 'access'.
  • This command does not directly change the change time (ctime).
  • The ctime in Unix/Linux systems is the 'change time', which gets updated when the file's metadata (like permissions or ownership) changes.
  • It also gets updated when the file's content changes.
  • However, it's important to note that ctime can be indirectly affected by the touch -a command.
  • This is because the touch command modifies the file's metadata by changing the access time, which in turn updates the ctime.
  • So, while the touch -a command is not designed to directly modify ctime, it does cause ctime to be updated as a side effect of changing the file's metadata.

 

NetApp provides no representations or warranties regarding the accuracy or reliability or serviceability of any information or recommendations provided in this publication or with respect to any results that may be obtained by the use of the information or observance of any recommendations provided herein. The information in this document is distributed AS IS and the use of this information or the implementation of any recommendations or techniques herein is a customer's responsibility and depends on the customer's ability to evaluate and integrate them into the customer's operational environment. This document and the information contained herein may be used solely in connection with the NetApp products discussed in this document.