[Dovecot] Best filesystem?

Timo Sirainen tss at iki.fi
Tue Feb 1 03:49:04 EET 2011


On 31.1.2011, at 12.34, Ron Leach wrote:

>> MainConfig - Dovecot Wiki 
> > "fsync_disable = no
> > Don't use fsync() or
>> fdatasync() calls. This makes the performance better at the cost of
>> potential data loss if the server (or the file server) goes down."
> 
> http://wiki1.dovecot.org/MainConfig
> 
> Is mail_fsync a v2 item?  We're using Dovecot v1, for now.  Presumably
> 
> fsync_disable = no
> 
> is the default, so that fsyncs take place?

Right.

> As I understand it, Dovecot rebuilds its indexes if they become corrupted and, if that's the case, then there is no filesystem vulnerability in respect of those.  We're using maildir.  How soon after each mail message is written, moved, renamed, etc, does Dovecot issue fsyncs?  Is there much 'commit-delay' up to that point, which might be a vulnerability window?

Success isn't returned to dovecot-lda or IMAP APPEND call until the mail has been fsynced. As long as the disk doesn't lie and the filesystem doesn't lie, there is zero data loss when fsyncing isn't disabled with Dovecot.

> Finally, and I do apologise for all the questions, we're wishing to move to NFS.  (At the moment we have a 'one box' Dovecot solution, but this makes upgrade of OS, upgrade of Dovecot, or upgrade of storage always a problem.  We have already exported the new XFS filestore over NFS - but Dovecot is not (yet) using it, that's the next step for us.) Does the fsync solution we've been discussing work just as well when the XFS filestore is exported over NFS?


fsync() makes sure that the data is sent to NFS server. I don't know if NFS protocol itself has a fsync() call that guarantees that the data is written on disk on the server, but I very much doubt it does. So I don't think NFS will help with any data guarantees.

BTW. I'm pretty tired of reading about (or mostly skipping over) filesystem messages in this list. How about moving all this stuff to a wiki page where you can fight it out? Then in future related messages just point to the wiki link. Here's a suggestion for the new page: http://wiki2.dovecot.org/FileSystems


More information about the dovecot mailing list