Would the remount command do it if I add the option in /etc/fstab?
Is this this a good idea?
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityNot anymore. -o remount,noatime
was an effective method of disabling atime without a reboot.
I don't know that I'd say it's a good idea, but if you intend to turn atime off, I don't see what it would be a bad idea either if you have an old enough kernel. According to the man page for mount:
MS_REMOUNT
The following mountflags can be changed: MS_RDONLY, MS_SYNCHRONOUS, MS_MANDLOCK; before kernel 2.6.16, the following could also be changed: MS_NOATIME and MS_NODIRATIME; and, additionally, before kernel 2.4.10, the following could also be changed: MS_NOSUID, MS_NODEV, MS_NOEXEC.
Yes, it would work.
Or you can manually add it like:
mount -o remount,noatime /dev/sd0 /mnt
/mnt
? OP wanted to remount their /
fs. I sure hope this command would stop some theoretical naive copy-paste reader from remounting their root filesystem at /mnt
and thus, presumably, killing their entire session. I'm not about to test that theory, though!
Jun 12, 2016 at 19:55
Edit /etc/fstab
and add the proper noatime entry to your /
filesystem entry.
Remount the /
filesystem with:
mount -o remount,noatime /
/proc/mounts
to see the flags currently in effect.
Jan 4, 2012 at 7:18
ls -lu
and make sure it's some time in the past, 3. read it with cat
or cksum
, 4. check its atime again and it should not have changed.
relatime
where available.noatime
unless you use the approximately 1 program that thinks it needs[rel]atime
'. I have no reason to care about access time, so I'm turning it off.noatime
. I never needed theatime
attribute value from any single file. I believe this attribute is one of the worst and useless things anyone ever added in Linux.