Cyrus 2.1.13: How to rebuild corrupt mailboxes.db
bnies at bluewin.ch
bnies at bluewin.ch
Tue Nov 2 05:26:26 EST 2004
Hi,
Today our Cyrus IMAP server crashed and during startup it hung while executing
ctl_cyrusdb -r. ctl_cyrusdb looped over these system calls:
2898: poll(0xFFBEE050, 0, 4000) = 0
2898: open64("/var/cyrus/imap/mailboxes.db", O_RDWR) Err#24 EMFILE
2898: poll(0xFFBEE050, 0, 6000) (sleeping...)
2898: poll(0xFFBEE050, 0, 6000) = 0
2898: stat64("/var/cyrus/imap/mailboxes.db", 0xFFBEE1B8) = 0
2898: open64("/var/cyrus/imap/mailboxes.db", O_RDWR) Err#24 EMFILE
2898: poll(0xFFBEE050, 0, 2000) (sleeping...)
2898: poll(0xFFBEE050, 0, 2000) = 0
2898: open64("/var/cyrus/imap/mailboxes.db", O_RDWR) Err#24 EMFILE
2898: poll(0xFFBEE050, 0, 4000) (sleeping...)
It ran for more than a half hour on a Sun Enterprise 450 server with mailboxes
for about 100 users.
I tried to dump mailboxes.db or do a reconstruct of the user folders but
the error messages were always "can't read mailboxes file". The syslog message
after startup was:
Nov 2 10:33:13 ducati master[3113]: [ID 392559 local6.debug] about to exec
/opt/cyrus-2.1.13/bin/ctl_cyrusdb
Nov 2 10:33:13 ducati ctl_cyrusdb[3113]: [ID 702911 local6.notice] recovering
cyrus databases
Nov 2 10:33:17 ducati ctl_cyrusdb[2898]: [ID 866726 local6.warning] DBERROR
db4: fatal region error detected; run recovery
Nov 2 10:33:17 ducati last message repeated 3 times
Nov 2 10:33:17 ducati ctl_cyrusdb[2898]: [ID 866726 local6.warning] DBERROR
db4: PANIC: DB_RUNRECOVERY: Fatal error, run database recovery
Nov 2 10:33:17 ducati ctl_cyrusdb[2898]: [ID 864961 local6.crit] DBERROR:
critical database situation
After recovering mailboxes.db from tape backup and running 'reconstruct -r
-f' user the system is running now again.
QUESTION: How can one reconstruct a corrupt mailboxes.db file from the user
mailfolders? The option 'reconstruct -m' is not implemented. At least it
should be possible to create an empty mailboxes.db file and then run 'reconstruct
-r -f' one can live with lost information about seen state and subscribed
mailboxes.
Thanks in advance for help.
Regards,
Bernd
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html
More information about the Info-cyrus
mailing list