Linux administration related post.
Contrary to what many sysadmins do, I don't turn off atime support on my
filesystems intentionally. I want it for the filesystem usage reference.
For a long time I used my own tar-based backup script and to prevent it from
modifying the FS atime, I was remounting with noatime before taking backup and
remounting back afterwards.
The reason was that I don't like the method used by tar option
--atime-preserve. It's changing the atime of the file back to what it was
before reading, leading to additional load and possible race condition.
But from time to time, the frequent remounting caused deadlocking, high server
load etc. Ugly stuff. Today it came to my mind to review whether tar is not
yet supporting the NO_ATIME switch of open(2) on my Debian Etch server.
It does, but I needed to check the source code. Manual page is not mentioning
that. When you use --atime-preserve=system, the standard 'replace' method
mentioned above is switched for what I need! Try it with strace -e file.
The only difference I see is that --atime-preserve=replace is preserving atime
of directories, while the new =system is not. But I can live with that, files
are what is interesting me.
Tuttle
|