Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have an Ubuntu 11.04 installation. The /home directory is on a partition which uses the ext4 filesystem. I haven't changed the default configuration so the filesystem is mounted at boot time with the defaults mount option. man mount explains which mount options the option defaults implies: rw, suid, dev, exec, auto, nouser, and async.

I noticed that the access time (atime) of a file isn't updated every time I access a file (for example with an editor or cat).

I looked around in the man page of mount and found the following option:

  • relatime: Update inode access times relative to modify or change time. Access time is only updated if the previous access time was earlier than the current modify or change time.

This is exactly the behaviour which I observe on my system. But the relatime mount option is not enabled.

Is the behaviour described in the description of the relatime mount option the default behaviour of atime? Does this apply to all filesystems which support atime?

share|improve this question
    
FYI: running the mount command with no options will output the currently mounted volumes, with currently active mount options (with the defaults option already expanded into actual values). –  Piskvor Apr 4 '13 at 14:58
add comment

2 Answers 2

up vote 6 down vote accepted

From man mount:

Some of these options could be enabled or disabled by default in the system kernel. To check the current setting see the options in /proc/mounts.

cat /proc/mounts

Shows that relatime is an option for almost all filesystem mounted, but I can't say for sure if is a default for every filesystem that supports atime.

share|improve this answer
add comment

I had exactly the same problem and tried remounting the filesystem with atime and the relatime. However I could not get ext4 to consistently record the last access time regardless of whether the file was being written to or not. Eyeballed /proc/mounts and the only option shown by default was "rw"

Reformatted for ext3 - works perfectly now!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.