DB4 downgrade

Simon Matter simon.matter at invoca.ch
Mon Dec 11 07:20:44 EST 2006


>
> Simon Matter wrote:
>  >>
>  >> Simon Matter wrote:
>  >>>> Because of the sudden end-of-life of Fedora Core 4, I'm moving my
> mail
>  >>>> server from FC4 to a CentOS 4.4 box.
>  >>>>
>  >>>> FC4 uses DB4 4.3.27.
>  >>>>
>  >>>> CentOS 4.4 uses DB4 4.2.52.
>  >>>>
>  >>>> What's the best way for me to downgrade the Cyrus DBs for this
>  >>>> migration?
>  >>> Convert all BerkeleyDBs on the FC4 box to skiplist and then migrate
> to
>  >>> the
>  >>> new server/installation. Skiplist doesn't change from version to
> version
>  >>> so you don't have that problem anymore.
>  >> Sounds good.  It's sufficient just to use the "file" command to see
>  >> which of the db files are already skiplist and which are Berkeley DB?
>  >
>  > Yes, that should be okay. For me it looks like this:
>  > [root at xxx imap]# file /var/lib/imap/*.db
>  > /var/lib/imap/annotations.db:  Cyrus skiplist DB
>  > /var/lib/imap/deliver.db:      Cyrus skiplist DB
>  > /var/lib/imap/mailboxes.db:    Cyrus skiplist DB
>  > /var/lib/imap/tls_sessions.db: Cyrus skiplist DB
>  >
>  > One more tip: You may want to remove all data from the db dirs because
>  > there may still be some files from the BerkeleyDB and they can lead to
>  > error messages, which are in fact not real cyrus errors. On such a
>  > migratin I usually do this after rsyncing:
>  > rm -rvf /var/lib/imap/db/* /var/lib/imap/db.*
>
> I finally got a window of scheduled downtime to test this, and I'm
> having problems.  Here's what I did:
>
> # /etc/init.d/cyrus-imapd stop
> # db_checkpoint -v -1 -h /var/lib/imap/db
> # db_recover -v -h /var/lib/imap/db
> # rm db/*
> # /usr/lib/cyrus-imapd/cvt_cyrusdb /var/lib/imap/deliver.db berkeley
> /var/lib/imap/deliver.db.skip skiplist
> # /usr/lib/cyrus-imapd/cvt_cyrusdb /var/lib/imap/tls_sessions.db
> berkeley /var/lib/imap/tls_sessions.db.skip skiplist
> # mv deliver.db.skip deliver.db ; mv tls_sessions.db.skip tls_sessions.db
> # chown cyrus:mail tls_sessions.db deliver.db
> # /etc/init.d/cyrus-imapd start
>
> At this point, the log explodes with messages along the lines of:
>
> Dec 11 06:11:53 ajax imaps[1394]: DBERROR: critical database situation
> Dec 11 06:11:53 ajax master[32203]: service imaps pid 1394 in READY
> state: terminated abnormally
> Dec 11 06:11:53 ajax master[32203]: service lmtpunix pid 1397 in READY
> state: terminated abnormally
> Dec 11 06:11:53 ajax imap[1395]: DBERROR A
>                                           : db4
> Dec 11 06:11:53 ajax imap[1395]: DBERROR: critical database situation
> Dec 11 06:11:53 ajax master[32203]: service imap pid 1395 in READY
> state: terminated abnormally
> Dec 11 06:11:53 ajax imap[1399]: DBERROR A
>                                           : db4
> Dec 11 06:11:53 ajax imap[1399]: DBERROR: critical database situation
> Dec 11 06:11:53 ajax imaps[1400]: DBERROR A
>                                            : db4
> Dec 11 06:11:53 ajax imaps[1400]: DBERROR: critical database situation
>
> Any ideas on why this is going on?
>
> I did notice that /var/lib/imap/rpm/db.cfg.cache has entries along the
> lines of:
>
> CONFIG_DB_DUPLICATE=berkeley
> CONFIG_DB_MBOX=skiplist
> CONFIG_DB_SEEN=skiplist
> CONFIG_DB_SUBS=flat
> CONFIG_DB_TLS=berkeley
> CONFIG_DB_ANNOTATION=skiplist
> CONFIG_DB_SIEVE=2.2.3
>
> Is there someplace I need to tell imapd that deliver and tls_sessions
> are now skiplist?  I don't see anything in /etc/imapd.conf and
> /etc/cyrus.conf.

Something is really broken here...
First shutdown using 'service cyrus-imapd stop', then put this in
/etc/imapd.conf:
duplicate_db: skiplist
tlscache_db: skiplist

Now try to start it up using 'service cyrus-imapd start'.
Unfortunately I think the cyrus-imapd package shipped with FC4 has some
bugs in the init scripts. I recommend you use my rpms, which are newer and
have less bugs. RedHat ships old versions of my rpms which don't include
the latest bug fixes. Find the source rpm here:
http://www.invoca.ch/pub/packages/cyrus-imapd/

Simon


More information about the Info-cyrus mailing list