| 1 |
.. _imap-features-mail-spool-partitions: |
| 2 |
|
| 3 |
===================== |
| 4 |
Mail Spool Partitions |
| 5 |
===================== |
| 6 |
|
| 7 |
A mail spool is divided in partitions. Partitions can give you the |
| 8 |
opportunity to tier your storage, and/or use multiple filesystems to |
| 9 |
apply restrictions to information (contained within mailboxes), such as |
| 10 |
the absolute maximum quantity of storage used. |
| 11 |
|
| 12 |
.. seealso:: |
| 13 |
|
| 14 |
* :ref:`imap-deployment-storage` |
| 15 |
* :ref:`imap-features-mailbox-distribution` |
| 16 |
|
| 17 |
Storage Tiering with Partitions |
| 18 |
=============================== |
| 19 |
|
| 20 |
As an example, one could imagine a set of disks configured as follows: |
| 21 |
|
| 22 |
* Some small but fast (expensive) disks for the main storage array, |
| 23 |
* Some large but slow (cheap) disks for archives. |
| 24 |
|
| 25 |
.. note:: |
| 26 |
|
| 27 |
This particular example is more efficaciously achieved via the new |
| 28 |
(post 3.0) :ref:`imap-features-archiving` feature. |
| 29 |
|
| 30 |
Mounting a filesystem on the fast disks under |
| 31 |
:file:`/var/spool/cyrus/fast/`, and mounting a filesystem on the slow |
| 32 |
disks under :file:`/var/spool/cyrus/slow/`, you could configure the |
| 33 |
following in :cyrusman:`imapd.conf(5)`: |
| 34 |
|
| 35 |
.. parsed-literal:: |
| 36 |
|
| 37 |
defaultpartition: fast |
| 38 |
partition-fast: /var/spool/cyrus/fast/ |
| 39 |
partition-slow: /var/spool/cyrus/slow/ |
| 40 |
|
| 41 |
Next, you could set the quota on ``user/[email protected]`` to a measly |
| 42 |
1 gigabyte: |
| 43 |
|
| 44 |
.. parsed-literal:: |
| 45 |
|
| 46 |
$ :command:`cyradm -u localhost` |
| 47 |
verify error:num=18:self signed certificate |
| 48 |
IMAP Password: |
| 49 |
localhost> :command:`sq user/[email protected] 1048576` |
| 50 |
|
| 51 |
You could then also give *John* a mailbox ``Archive`` for him to clean |
| 52 |
up his :ref:`imap-features-namespaces-personal` without loosing access |
| 53 |
to his existing mail: |
| 54 |
|
| 55 |
.. parsed-literal:: |
| 56 |
|
| 57 |
$ :command:`cyradm -u localhost` |
| 58 |
verify error:num=18:self signed certificate |
| 59 |
IMAP Password: |
| 60 |
localhost> :command:`cm user/john/[email protected] slow` |
| 61 |
localhost> :command:`sq user/john/[email protected] none` |
| 62 |
|
| 63 |
*John* now has unlimited storage in his ``Archive`` folder on the cheap |
| 64 |
slow disks, while his day-to-day email is on the expensive fast disks. |
| 65 |
|
| 66 |
Restricting Storage Used with Partitions |
| 67 |
======================================== |
| 68 |
|
| 69 |
.. IMPORTANT:: |
| 70 |
|
| 71 |
It is not recommended to use partitions for the purposes of |
| 72 |
restricting the amount of storage used by (sets of) mailboxes, |
| 73 |
unless you can also grow the filesystem (preferably online) and you |
| 74 |
have (automated) means to determine what is to end up on each |
| 75 |
partition. |
| 76 |
|
| 77 |
If a customer ``example.org`` purchases 5 GB of storage, and |
| 78 |
``example.com`` purchases 500 GB of storage, then two partitions sized |
| 79 |
5 GB and 500 GB respectively could be used to restrict the users of each |
| 80 |
customers without individually restricting each user (to a percentage of |
| 81 |
the total storage). |
| 82 |
|
| 83 |
.. WARNING:: |
| 84 |
|
| 85 |
Monitoring the storage used is critical, because actually running |
| 86 |
out of disk space is very costly -- and not a problem the customer |
| 87 |
themselves could recover from. |
| 88 |
|
| 89 |
Back to :ref:`imap-features` |