Felix Rubio Dalmau
2013-Aug-09 09:44 UTC
[Dovecot] prevent dovecot from modifying maildirs
Hi all, Is there any possibility to ask dovecot to write nothing to disk, something like a "read only" state, without shutting it down? I have set up a ZFS+postfix+dovecot mail server, and I need both postfix (postsuper -h ALL) and dovecot (??) to stop modifying the disk to create the snapshot to be saved. Does anybody has any idea on how to achieve this? Regards! Felix
On 2013-08-09 5:44 AM, Felix Rubio Dalmau <felixrubiodalmau at gmail.com> wrote:> Is there any possibility to ask dovecot to write nothing to disk, something like a "read only" state, without shutting it down? I have set up a ZFS+postfix+dovecot mail server, and I need both postfix (postsuper -h ALL) and dovecot (??) to stop modifying the disk to create the snapshot to be saved.??? That is supposed to be (haven't used it yet) one of ZFS's strong points. You don't need to worry about this, it is all handled by the OS. If you think you do need to worry about it, then you'll have to come up with a very good reason why. -- Best regards, */Charles/*
Felix Rubio Dalmau skrev den 2013-08-09 11:44:> Does anybody has any idea on how to achieve this?stop dovecot/postfix, maybe remember sql/ldap database aswell
On 2013-08-09 11:44, Felix Rubio Dalmau wrote:> Is there any possibility to ask dovecot to write nothing to disk, > something like a "read only" state, without shutting it down? I have > set up a ZFS+postfix+dovecot mail server, and I need both postfix > (postsuper -h ALL) and dovecot (??) to stop modifying the disk to > create the snapshot to be saved. > > Does anybody has any idea on how to achieve this?As mentioned before, that's done by ZFS. Just create a snapshot using your ZFS functionality (zfs snapshot <name>). Regards, Michael
> In order to save space I prefer no to have such half-files (mails) , > and it is for this reason that I am asking if there is any way to > prevent this. > > I'm not an expert in field of file systems, so I can be asking very > naive questions... but I appreciate your comments on this topic.Filesystem consistency is different than, for lack of a better term, dovecot consistency. The latter places additional constraints on the content of files, rather than treating them as sequences of disk blocks. I don't think you can ensure the latter without stopping all dovecot processes (and maybe the MTA/LDA as well), which will be much more difficult and disruptive than just taking a snapshot. (I think some snapshot aware application like databases and hypervisors allows the operator to put the application in a state of acquiesence, long enough to take a snapshot, then unblock all processes after the snapshot.) I'd take the suggestion of the previous poster: take snapshots, don't worry, be happy. The small amount of inconsistencies is trivial compared with quickly recovering a mail store after disaster. Joseph Tam <jtam.home at gmail.com>