Will the option NOATIME in /etc/fstab ruin my Unison synchronizations?

Will the option NOATIME in /etc/fstab ruin my Unison synchronizations?

I read here in ArchWiki that the option noatime can improve hard disk performance and durability:

The use of noatime, nodiratime or relatime can improve drive performance. Linux by default uses atime, which keeps a record (writes to the drive) every time it reads anything. This is more purposeful when Linux is used for servers; it doesn't have much value for desktop use. The worst thing about the default atime option is that even reading a file from the page cache (reading from memory instead of the drive) will still result in a write! Using the noatime option fully disables writing file access times to the drive every time you read a file. This works well for almost all applications, except for a rare few like Mutt that need the such information. (...) The best compromise might be the use of relatime in which case programs like Mutt will continue to work, but you'll still have a performance boost because files will not get access times updated unless they are modified.

I am mostly interested in this, because I plan to have an installation in a 32BG USB stick that, like every other flash device, has a limited lifespan based upon the number of write operations it can endure.

But I work on different computers and heavily rely on Unison to keep my work synchronized on them. But I am afraid that, if I use the option noatime or relatime then Unison might be confused and not know which file was modified last and so make a mess out of my files.

So, my question:

Is it safe to use the option noatime or relatime in /etc/fstab together with Unison or Rsync?

答案1

if I use the option noatime or relatime then Unison might be confused and not know which file was modified last

This sentence does not make any sense, because atime is the access time – it is not the same thing as mtime, which is the one Unison uses. So no, it will not affect synchronization.

相关内容