<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>On Fri, 21 Oct 2016, at 08:46 PM, Vladislav Kurz via Info-cyrus wrote:<br></div>
<blockquote type="cite"><div>would you be so kind and point to some info (docs, howtos) about cyrus<br></div>
<div>tiered storage? All I found is<br></div>
<div><a href="http://www.cyrusimap.org/~vanmeeuwen/imap/features/mail-spool-partitions.html">http://www.cyrusimap.org/~vanmeeuwen/imap/features/mail-spool-partitions.html</a><br></div>
<div>but that seem to be quite tedious to set up<br></div>
</blockquote><div><br></div>
<div><a href="http://cyrusimap.org/imap/concepts/features/mail-spool-partitions.html">That doc</a> is describing splitting the mail store by folder. We don't use that. Instead, we use the "archive partition" feature, which splits the mail store by message age (and size and flags).<br></div>
<div><br></div>
<div>The interesting <a href="http://cyrusimap.org/imap/reference/manpages/configs/imapd.conf.html">imapd.conf</a> parameters are: <span class="font" style="font-family: menlo, consolas, monospace, sans-serif;">archive_enabled archive_days archive_maxsize archive_keepflagged archivepartition-name</span><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="colour" style="color:rgb(0, 0, 0)"><span class="size" style="font-size:12px"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="colour" style="color:rgb(0, 0, 0)"><span class="size" style="font-size:12px"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="colour" style="color:rgb(0, 0, 0)"><span class="size" style="font-size:12px"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="colour" style="color:rgb(0, 0, 0)"><span class="size" style="font-size:12px"><span class="highlight" style="background-color:rgb(255, 255, 255)"><span class="colour" style="color:rgb(0, 0, 0)"><span class="size" style="font-size:12px"><span class="font" style="font-family:Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace"><span class="font" style="font-family:Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace"><span class="font" style="font-family:Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace"><span class="font" style="font-family:Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace"><span class="font" style="font-family:Consolas, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", Monaco, "Courier New", Courier, monospace">.</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span><br></div>
<div><br></div>
<div>And then you'll want to look at the -A flag to <a href="http://cyrusimap.org/imap/reference/manpages/systemcommands/cyr_expire.html">cyr_expire</a>, which is the thing that moves "old" stuff from the main partition down to the archive partition.<br></div>
<div><br></div>
<div>The docs suggest this feature is in the currently-unreleased Cyrus 3.0 series. That's probably true, but I can't be sure (FastMail runs the current dev/master branch, so we're ahead of 3.0). It'll be well worth the upgrade when the time comes though if you've got large mail stores. Its a rock-solid feature, I love it.</div>
<div><br></div>
<blockquote type="cite"><div>How transparent it is for users?<br></div>
</blockquote><div><br></div>
<div>Entirely. The message indexes are still stored in the metadata area like normal; its only the actual messages that are on the archive partition. In the worst case loading an older archived message is slightly slower because the disk is slower but most people probably won't notice anyway.<br></div>
<div><br></div>
<div>For reference, FastMail's config is very simple:<br></div>
<div><br></div>
<div><span class="font" style="font-family: menlo, consolas, monospace, sans-serif;">defaultpartition: default</span><span class="font" style="font-family: menlo, consolas, monospace, sans-serif;"><br></span></div>
<div><span class="font" style="font-family: menlo, consolas, monospace, sans-serif;">partition-default: /mnt/ssd21d1/sloti21d1t01/store92/spool</span><span class="font" style="font-family: menlo, consolas, monospace, sans-serif;"><br></span></div>
<div><span class="font" style="font-family: menlo, consolas, monospace, sans-serif;">archivepartition-default: /mnt/i21d1t01/sloti21d1t01/store92/spool-archive</span><span class="font" style="font-family: menlo, consolas, monospace, sans-serif;"><br></span></div>
<div><span class="font" style="font-family: menlo, consolas, monospace, sans-serif;">archive_enabled: yes</span><br></div>
<div><br></div>
<div>Our mount naming convention isn't hugely important; the main thing to note is that ssd21d1 is a SSD partition, while i21d1t01 is on conventional spindles. The other archive_* options aren't used because the defaults are sensible (which makes sense; we developed the feature so they're our defaults!).<br></div>
<div><br></div>
<div>And then every day we run <span class="font" style="font-family: menlo, consolas, monospace, sans-serif;">cyr_expire -A 7d</span> from cron, and that's it.<br></div>
<div><br></div>
<div>Its worth noting that tiered search indexes are possible, but are managed through a different set of config options. I'm not going to write about that right now because there's no docs for me to point back to and search setup is a bit more involved depending on your needs.<br></div>
<div><br></div>
<div>What I will do is invoke the Cyrus docs people so they're aware of the gap in the docs and hopefully we can get a better guide put together sometime.<br></div>
<div><br></div>
<div>Cheers,<br></div>
<div>Rob N.</div>
<div><br></div>
</body>
</html>