分类: BSD
2014-05-06 18:23:07
partition-1: /data/spool/cyrus1 新建的Mailbox, 可(在FB下):cm user/johndoe 1
Cyrus Part VIII: Using Mailstore Partitioning to Extend Storage Capacities. |
Written by Sam Caldwell |
Thursday, 25 November 2010 23:02 |
Problem Statement: There exists a Cyrus mail server whose mail store has approached the maximum size of the disk partition where it is located. Develop a long term strategy for scaling the system in size while minimizing any long-term performance penalties. Solution:There are two solutions to this problem. The first solution would be to stop the mail server, move the mail store to a larger storage device and start the mail server. This solution is NOT acceptable, as it would involve a considerable amount of downtime during the mail spool migration process. For example, given a 2TB mailspool which must be transferred over a 1GBps link, users could expect at least 1 hour of downtime. Additionally, as the system scales using this procedure, size will eventually lead to a performance impact. Multiple mail operations will bottleneck at a single mailspool and device. The second solution is more acceptable. Minimal downtime is required. What downtime is required is limited to the individual users migrated (as explained) rather than to the entire system. This means that downtime can be scheduled around individual user work times. Cyrus IMAP servers allow mail to be stored in one or more partition. Persons familiar with Microsoft Exchange should know that in large organizations, Exchange performance and scalability can be best served by dividing the enterprise into multiple mail stores. Likewise, as defined below, we overcome a space limitation on one device by adding a new Cyrus mail spool partition. Cyrus mail spools can be subdivided into paritions. Thus, where one physical storage system approaches capacity, another storage system may be added as a new Cyrus mail partition. The original partition remains in-place and operational during and after this operation. Further as the mail environment scales, separate physical storage systems overcome any performance bottleneck. Assume the current mail server has only a single (default) partition. this partition will be specified in /etc/imapd.conf: paritition-default: /var/spool/cyrus defaultpartition: default When a new mailbox is created with cyradm it is created in this default partition (unless another partition is specified). Procedure:
partition-default: /var/spool/cyrus partition-1: /var/spool/cyrus1 defaultpartition: default Once the imapd daemon is restarted, the configuration file will be reloaded. Afterward, any new mailboxes can be created by specifying the new partition: cm user.johndoe 1 In this example, we create user.johndoe on partition 1. If we do not specify the new partition, the mailbox for johndoe will be created on the default partition. Moving Mailboxes Across PartitionsCreating new mailbox partitions will extend the overall size of the mail system. However, the size of the initial mail store partition will remain fixed. As users in the old partition continue to take in new emails, it may become necessary to move existing mailboxes to the new partition, as follows:
NOTE: When renaming mailboxes, the user should be logged out. This can be verified by checking /var/imap/proc to see if the user's userid appears in the list. |