[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DB mail



Hi,

You can reduce the downtime using rsync or unison before shutdown your MTA, POP, and IMAP daemons.

1. install two new drives, each big enough to store all current mail plus
expected growth.  or as big as you can afford.

2. set them up as RAID-1 (mirrored), format as XFS and mount it as /mnt

synchronize your mailboxes /old/mail/spool/ /mnt
man unison
man rsync

3. shut down your MTA, POP, and IMAP daemons - and ANYTHING else that
reads or writes mailboxes.

synchronize again your mailboxes /old/mail/spool/ /mnt

5. mv /old/mail/spool /old/mail/spool.BAK    (keep around for now, delete
later when you're sure everything
                                              is fine)
6. mkdir /old/mail/spool

7. umount /mnt

8. mount the new XFS raid partition as /old/mail/spool

9. restart your MTA, POP, and IMAP daemons

where "/old/mail/spool" is, of course, wherever your mailboxes are.  e.g. if
the Maildir files are stored in user home directories, that means "/home".


estimated downtime depends on the size of the mailboxes that need to be
copied. should be no more than a few hours for a few gig. easily done in
a single night.

Using synchronizing tools instead of cpio, cp, mv, etc. you minimize downtime because the amount of data to transfer betwen partitions is reduced. You transfer during downtime period only the difference between files. If the file is untouched no transfer is needed.

I hope it helps.

Best regards
            Juan
--
Mi nueva direccion es: - My new email address is: - Mon nouveau email est:
juan@elsotanillo.net
----------------------------------------------------------------------------
Linux Users Registered: 257202
http://www.elsotanillo.net
----------------------------------------------------------------------------
----- Message from cas@taz.net.au ---------
    Date: Wed, 20 Sep 2006 08:54:04 +1000
    From: Craig Sanders <cas@taz.net.au>
Reply-To: Craig Sanders <cas@taz.net.au>
 Subject: Re: DB mail
      To: debian-isp@lists.debian.org


On Tue, Sep 19, 2006 at 10:54:29PM +0200, Hans du Plooy wrote:
Hi guys,

Is anyone using DB mail for IMAP store?   How reliable is it?

IMO, a database is a bad match for the task of storing mail. it adds
greatly to the complexity without adding significant benefits to
compensate - and with complexity comes greater risk of problems.

I'm looking for something that will cope with mailboxes several gigs
(and growing) in size.  Not many mailboxes though, just a hand ful.

Courier does this fine, but mail folders with many mails in is slow to
access.

store the mailboxes in a filesystem that doesn't slow down with
thousands of files in one directory - i.e. NOT ext2fs or ext3fs. xfs or
reiserfs are fine.

i've used both at various times over the years, but my preference (and
my "default" filesystem for all machines now) is XFS - it's a good,
general purpose filesystem that is well-tested and stabilised years ago.
reiserfs has some nice features but is still too much of a moving target
(i.e. it changes too much and too fast).


also recommended: store your mail spool on a RAID-1 or RAID-5
filesystem, to avoid the risk of having one drive die and take your
entire mail spool with it (IMO backing up the mail spool to tape or
whatever isn't much use - by the time the backup is even part-completed,
it's obsolete...with new mail arriving all the time and old mail being
read and deleted by users).


so, the easiest way to transfer your mail spool to XFS on an existing system
that you don't want to take down for a day to rebuild is to:

1. install two new drives, each big enough to store all current mail plus
expected growth.  or as big as you can afford.

2. set them up as RAID-1 (mirrored), format as XFS and mount it as /mnt

3. shut down your MTA, POP, and IMAP daemons - and ANYTHING else that
reads or writes mailboxes.

4. cp -afx /old/mail/spool/* /mnt/

5. mv /old/mail/spool /old/mail/spool.BAK    (keep around for now, delete
later when you're sure everything
                                              is fine)
6. mkdir /old/mail/spool

7. umount /mnt

8. mount the new XFS raid partition as /old/mail/spool

9. restart your MTA, POP, and IMAP daemons

where "/old/mail/spool" is, of course, wherever your mailboxes are.  e.g. if
the Maildir files are stored in user home directories, that means "/home".


estimated downtime depends on the size of the mailboxes that need to be
copied. should be no more than a few hours for a few gig. easily done in
a single night.


craig

--
craig sanders <cas@taz.net.au>           (part time cyborg)


--
To UNSUBSCRIBE, email to debian-isp-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org




----- End message from cas@taz.net.au -----




Reply to: