<div dir="ltr">We are running our IMAP mail server on a VPS in the cloud (dovecot+exim+horde webmail), and we are using our on-premises NAS for daily backups through custom rsync scripts (which work well with maildir). There is a lot of storage available on the NAS, while not so much on the VPS. Since, we often get downtime on-premises due to power outages we cannot move the mail server on-premises (though the outages do not interfere too much with the backups). Additional storage in the cloud is at a premium as we would like to avoid further increasing costs.<div><br></div><div>Now, my idea is to set up an NFS volume on the NAS, and configure the cloud-based server as the client. I would like to store only the most recent emails on the main server, and keep the whole data set on the NAS.</div><div><br></div><div>Naturally I have read the dovecot wiki concerning NFS, and I have browsed this mailing list's archive for answers, but I still have many concerns.</div><div><br></div><div>Ideally, I would like to use as much storage as possible from the main server, so that only really old emails need to be fetched over the network if requested over IMAP. Also I would like the search function to work regardless whether the NAS is available or not.</div><div><br></div><div>I wonder if anybody tried a similar configuration before. My concerns are:</div><div>- should I use NFS volume directly and configure FS-Cache, or should I configure a cache volume separately using e.g. bcache or some other tool?</div><div>- how to configure the cache to keep as many files and metadata locally?</div><div>- is it possible to fine tune the cache so it always keeps all the newly created/modified files locally?</div><div>- is it possible to tune the cache so it keeps at least n files for each user (each maildir)?</div><div>- will it work fine if I put NFS traffic into an ssh tunnel for security?</div><div>- will dovecot freeze/crash when the NFS volume disconnects or is temporarily unavailable, what will actually happen in such circumstances?</div><div>- will the search function work when the NFS volume is unavailable? (I also plan to use solr in the future)</div><div>- what happens when the main server crashes and then recovers from the NFS share? is the share guaranteed to be consistent?</div><div><br></div><div>I hope that I have not asked too many questions for a single message... ;) I would really appreciate any help, because I am rather a newbie in dovecot administration, and it overwhelms me. Perhaps, what I am trying to achieve is not the way to go. I am open to suggestions.</div><div><br></div><div>Best regards,</div><div>Maciej</div><div><br></div><div><br></div><div><br></div><div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><span style="color:rgb(0,0,0);font-family:Arial,"Helvetica Sans-serif";font-size:12px"><br></span></div></div></div></div></div></div>