Question: How to remove the noatime mount option from root / without rebooting the server?
There are five atime-related options of mount in Linux:
- noatime – atime attribute (of both files and directories) is updated only during write access.
- nodiratime – atime of directories is updated only during the write access. It can be combined with relatime.
- relatime / atime – atime is an alias of relatime. This option causes the atime attribute to update only if the previous atime is older than mtime or ctime, or the previous atime is over 24 hours old.
- strictatime – It was formerly called atime and as such was the default option. It causes the atime attribute to update with every file access. (accessing file data, not just the metadata/attributes)
- lazytime – Linux 4.10 added a new option: only update times (atime, mtime, ctime) on the in-memory version of the file inode. The on-disk data is updated lazily (see man 8 mount for details).
To remove the noatime mount options, please follow the following steps:
1. Prior to the Linux kernel 2.6.30, please use the following command:
# mount -o remount,atime /
2. Since kernel version 2.6.30, the default option is relatime. Please use the following command.
# mount -o remount,relatime /
OR
# mount -o remount,strictatime /
3. Verify the same using the mount command and grep for the mount point or view the file /proc/mounts.
# mount | grep -w /
or
# cat /proc/mounts | grep -w /