| 1 |
.. _imap-admin-locations: |
| 2 |
|
| 3 |
========================== |
| 4 |
File & Directory Locations |
| 5 |
========================== |
| 6 |
|
| 7 |
Cyrus IMAP maintains several directories for configuration, state and |
| 8 |
data storage. The locations of these directories and, in many cases, |
| 9 |
of individual files, may be controlled by settings in |
| 10 |
:cyrusman:`imapd.conf(5)`. |
| 11 |
|
| 12 |
.. toctree:: |
| 13 |
:maxdepth: 1 |
| 14 |
:glob: |
| 15 |
|
| 16 |
locations/* |
| 17 |
|
| 18 |
Partitions |
| 19 |
========== |
| 20 |
|
| 21 |
Partitioning is a means to divide storage resources into separate pools |
| 22 |
and may be defined for the following types of data: |
| 23 |
|
| 24 |
* :ref:`imap-features-mail-spool-partitions` |
| 25 |
* :ref:`imap-features-metadata-partitions` |
| 26 |
* :ref:`imap-features-archive-partitions` |
| 27 |
|
| 28 |
Please consult the documents linked above for more information on these. |
| 29 |
|
| 30 |
You may also find more examples and possible scenarios in the |
| 31 |
document on :ref:`imap-features-mailbox-distribution`. |
| 32 |
|
| 33 |
In general, Cyrus allows one to maintain several separate partitions for |
| 34 |
each of these data types, and to establish rules governing distribution |
| 35 |
of data within each pool. |
| 36 |
|
| 37 |
Types of Partitions |
| 38 |
------------------- |
| 39 |
|
| 40 |
Cyrus supports several different types of partitions: |
| 41 |
|
| 42 |
* Mail Spool Partitions |
| 43 |
* Metadata Partitions |
| 44 |
* Archive Partitions |
| 45 |
* Search Partitions |
| 46 |
|
| 47 |
Each of these are discussed in their own sections of the documentation. |
| 48 |
All share in common a few aspects in how they are configured. For each |
| 49 |
partition defined, you must tell Cyrus where the partition is rooted in |
| 50 |
the filesystem. This is accomplished via a "*partition*-*name*:" directive |
| 51 |
for each partition, where "*partition*" specifies the partition type and |
| 52 |
"*name*" is the actual name of the partition. |
| 53 |
|
| 54 |
Here are some sample declarations of each different type of partition |
| 55 |
supported within Cyrus. For the purposes of this example, we'll |
| 56 |
stipulate the following: |
| 57 |
|
| 58 |
* There are two main storage pools, "fast" and "slow," which are on |
| 59 |
SSDs and traditional disks, respectively. |
| 60 |
* The mailboxes are divided alphabetically, with A to M in one group |
| 61 |
and N to Z in the other. |
| 62 |
|
| 63 |
.. parsed-literal:: |
| 64 |
|
| 65 |
# The Mail Spool Partitions |
| 66 |
partition-atom: /var/spool/cyrus/fast/mail/atom/ |
| 67 |
partition-ntoz: /var/spool/cyrus/fast/mail/ntoz/ |
| 68 |
|
| 69 |
# The Metadata Partitions |
| 70 |
metapartition-atom: /var/spool/cyrus/fast/meta/atom/ |
| 71 |
metapartition-ntoz: /var/spool/cyrus/fast/meta/ntoz/ |
| 72 |
|
| 73 |
# Archive Partitions |
| 74 |
archivepartition-atom: /var/spool/cyrus/slow/mail/atom/ |
| 75 |
archivepartition-ntoz: /var/spool/cyrus/slow/mail/ntoz/ |
| 76 |
|
| 77 |
# Search Partitions |
| 78 |
defaultsearchtier: tier1 |
| 79 |
tier1searchpartition-atom: /var/spool/cyrus/slow/search/atom/ |
| 80 |
tier1searchpartition-ntoz: /var/spool/cyrus/slow/search/ntoz/ |
| 81 |
|
| 82 |
Working With Partitions |
| 83 |
======================= |
| 84 |
|
| 85 |
All partition operations are controlled via settings in |
| 86 |
:cyrusman:`imapd.conf(5)`, and thus require server restarts to effect. |
| 87 |
There are no administrative commands to manipulate partitions. |
| 88 |
|
| 89 |
Here are the settings for each class of partition: |
| 90 |
|
| 91 |
Mail Spool Partitions |
| 92 |
--------------------- |
| 93 |
|
| 94 |
While Cyrus itself has no default values for these settings, most |
| 95 |
distributions use ``default`` and ``/var/spool/cyrus`` or |
| 96 |
``/var/spool/cyrus``: |
| 97 |
|
| 98 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 99 |
:start-after: startblob defaultpartition |
| 100 |
:end-before: endblob defaultpartition |
| 101 |
|
| 102 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 103 |
:start-after: startblob partition-name |
| 104 |
:end-before: endblob partition-name |
| 105 |
|
| 106 |
Metadata Partitions |
| 107 |
------------------- |
| 108 |
|
| 109 |
Metadata is information used to process the mailbox data, rather than |
| 110 |
the contents of the messages withing the mailbox. Examples include |
| 111 |
headers, caches, indexes, etc. |
| 112 |
|
| 113 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 114 |
:start-after: startblob metapartition-name |
| 115 |
:end-before: endblob metapartition-name |
| 116 |
|
| 117 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 118 |
:start-after: startblob metapartition_files |
| 119 |
:end-before: endblob metapartition_files |
| 120 |
|
| 121 |
Archive Partitions |
| 122 |
------------------ |
| 123 |
|
| 124 |
Cyrus Archiving will migrate mailbox data from the normal mail spool |
| 125 |
partitions to separate archive partitions, based upon criteria such as |
| 126 |
age and size. Typical use cases would be to keep so-called "hot" data, |
| 127 |
such as recent messages, on fast drives, such as SSDs, and migrate |
| 128 |
"cold" data, such as older or large messages, to slower but cheaper |
| 129 |
media. |
| 130 |
|
| 131 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 132 |
:start-after: startblob archivepartition-name |
| 133 |
:end-before: endblob archivepartition-name |
| 134 |
|
| 135 |
Search Partitions |
| 136 |
----------------- |
| 137 |
|
| 138 |
Modern Cyrus uses the Xapian search engine to index messages for |
| 139 |
server-side search support. Index data are stored in search "tiers" |
| 140 |
which are themselves related to search partitions. There are two key |
| 141 |
settings for search tiers: |
| 142 |
|
| 143 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 144 |
:start-after: startblob defaultsearchtier |
| 145 |
:end-before: endblob defaultsearchtier |
| 146 |
|
| 147 |
.. include:: /imap/reference/manpages/configs/imapd.conf.rst |
| 148 |
:start-after: startblob searchpartition-name |
| 149 |
:end-before: endblob searchpartition-name |
| 150 |
|
| 151 |
Back to :ref:`imap-admin` |