cyrus-imapd crash, fails to restart

Simon Matter simon.matter at invoca.ch
Tue Feb 20 01:53:18 EST 2007


>
> Hi All - I poked around the cyrus website/wiki for a while, and did a
> few google searches - but unfortunately, I haven't been able to get any
> clear idea of how to fix this.
>
> My root filesystem filled up, then the machine was powercycled, thanks
> to my colo provider having a power problem.  Now Cyrus-IMAPD fails to
> start.  I'm getting the following errors in the /var/lib/imap/rpm/ log
> file when I try and start up the cyrus-imapd daemon.
>
>
> you are using /var/lib/imap/sieve as your sieve directory.
> fatal error: can't open old database
> Converting from /var/lib/imap/mailboxes.db (berkeley) to
> /var/lib/imap/mailboxes.db.flat (flat)
> ERROR: unable to convert /var/lib/imap/mailboxes.db from berkeley to flat
> fatal error: can't open old database
> Converting from /var/lib/imap/annotations.db (berkeley) to
> /var/lib/imap/annotations.db.flat (flat)
> ERROR: unable to convert /var/lib/imap/annotations.db from berkeley to
> flat
>
>
> Please note that this server has been up and running for a couple of
> years without problems.  I was not converting mailbox formats, or
> anything weird like that.  It was up and in normal production operations.

You didn't tell us what version you are running. What I know is that you
are running some version of my rpms. The rpms convert all BDB files to
skiplist on shutdown so cyrus-imapd is always in a state where it's easy
to move the cyrus data to another server, even with other BDB versions. It
also makes distribution upgrades possible that way. The whole process
works well, however some old version of my scripts have bugs. However,
cyrus-imapd really doesn't like disk full problems!

>
> I was also getting errors with the users/X/*.seen etc... files, and
> moved those aside - since I think I'll only lose stuff I don't mind
> losing?
>
> In any case - I freed up space on the root filesystem - but this is

Why on the root filesystem, isn't /var a separate filesystem? It's even
safer to put /var/lib/imap and /var/spool/imap on their own filesystems to
prevent such things.

> eluding me.  Any pointers would be ***GREATLY*** appreciated, as I now
> have about 12 domains with 50 users down.  Thank you a ton in advance.

Better 50 than 5000 users in such a situation.
Do you have backups of the box?
If you told us what's still there in your /var/lib/imap/, we could help
you more. For now, the most important thing should be to get the mailboxes
db back. The rpm has a cron job which creates nighlty gzipped dumps of
your mailboxes db in /var/lib/imap/backup/. You should be able to import
the recent backup with something like this:

su - cyrus -c "gzip -cd /var/lib/imap/backup/mboxlist.gz |
/usr/lib/cyrus-imapd/ctl_mboxlist -u"

Maybe do have to remove the old db's first, maybe you even have to remove
/var/lib/imap/db/* and /var/lib/imap/db.backup? before. So do backup your
current /var/lib/imap first!
Once cyrus-imapd is running again, you may try to "reconstruct -rf" all
your mailboxes to update you mailboxes db.

Simon


More information about the Info-cyrus mailing list