2

Let's run mount

/dev/mapper/VolGroup-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sdb1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)
gvfs-fuse-daemon on /root/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev)
/dev/sda1 on /media/1 type ext3 (rw,nosuid,nodev,uhelper=udisks)

there is nothing in these lines that show either

 atime
 or
 noatime

the problem here is, i created folders a and b and then tried accessing them, but i can not get them to update Access Time so i can arrange them based on access time.

how exactly does one ensure the "filesystem" of the "operating system" is mounted with "atime" enabled ?

  • You created folders a and b on which filesystem/mount? – phemmer Aug 31 '13 at 05:09
  • @Patrick, i want to see it work really, i created them on desktop, but i could create them on the usb device also. which is the last line. – user249775 Aug 31 '13 at 05:14
  • It would appear that your /home directory is ext4. I still think it's something to do with atime but the mount output would appear to be on the up and up. The answer is most likely not the: "you need X in your /etc/fstab" or you need to mount it with "atime" variety. – slm Aug 31 '13 at 05:27

3 Answers3

4

By default, since Linux 2.6.30, filesystems are mounted with the relatime mount option. With this option, the atime is not updated when it is equal to the mtime. This is only if the atime option is enabled (which it is by default): under noatime, the atime is not updated, ever. This saves on disk writes at the expense of removing a useful feature.

The kernel reports relatime in /proc/mounts, but the mount utility suppresses this option from its output (because it's the default setting) since util-linux 2.13.

To fully enable access times, you need to mount the filesystem with the strictatime option.

1

The mount output would show noatime if atime were disabled.

Perhaps the problem with atime is due to a filesystem that does not support it?

ash
  • 7,260
0

In /etc/fstab the 4th column contains the options that you want to pass the mount command for each mount.

So for this filesystem you could just append the option atime into the 4th column of /etc/fstab, then you do a remount the block device like mount -o remount <mount point>.

replay
  • 8,553
  • 1
  • 27
  • 31