Is it possible to update ctime by specifying ONTAP mount options?
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.