Moving the Cyrus Mailstore

Andrew Morgan morgan at orst.edu
Fri Oct 20 14:27:03 EDT 2006


On Fri, 20 Oct 2006, Wickham, Larry wrote:

> Hi,
>
> Our server is suffering from impending doom, while servicing 11,500 users.
> Our mail store is in the default location under /var/spool/imap. The
> partition that / (/var is under here in our setup) is mounted on is 25 GB
> and I would like to move it to the partition where /home is mounted which
> has 1+ TB available. We have considered several solutions. The chosen
> solution would have minimal downtime and minimal chance of failure.
>
> 1) Repartitioning:
> Down the server and boot from a rescue platform. Backup and Resize /home.
> Create a new partition in the free space formerly occupied by /home. Copy
> /var to the new partition. Rename the existing /var. Edit fstab and boot.
>
> 2) Swaping mount points:
> Down the server and boot from a rescue platform. Move the contents of /home
> to a folder on the smaller drive. Copy /var to the larger drive. Modify
> fstab.
>
> 3) Migrating between mail stores
> Create a new mail store under /home and migrate the mail boxes? Not sure how
> or if we can do this.
>
> Please let me know your opinion on these solutions and any new suggestions
> are welcome and appreciated.

Here's what I would do:

1. Decide on a location in /home to store the cyrus stuff (/home/cyrus?).

2. Use rsync to get a rough copy of /var/spool/imap sync'd to /home/cyrus. 
Do this well ahead of the migration and periodically run rsync again to 
keep the list of changes small.

3. Stop cyrus.

4. Do a final rsync.

5. Create a symlink from /var/spool/imap to /home/cyrus.

6. Start cyrus


Simple, and it keeps downtime to a minimum.  Rsync is awesome.

 	Andy


More information about the Info-cyrus mailing list