PB with mailboxes.db magic number
Zixiong WANG
z.wang at sysium.com
Fri Jan 16 13:25:21 EST 2004
Hi,
We have problems with mailboxes.db :
In a initial configuration, all works fine.
After a database corruption, we have rebuilt mailboxes.db with the method
described in the "cyrus-imapd-README.HOWTO-recover-mailboxes.db" file (which
is inclued in the cyrus-imapd RPM).
Now "/etc/init.d/cyrus-imapd restart" is blocked after "converting db
files... ". We have found that the problem is located in
"/usr/libexec/cyrus/cvt_cyrusdb_all", when it does a :
file -b -m /usr/share/magic:/usr/share/cyrus-imapd/rpm/magic
/var/lib/imap/mailboxes.db
with the following error :
file: invalid type 0 in mconvert().
In fact, "file" uses /usr/share/cyrus-imapd/rpm/magic.mgc file. If we remove
the magic.mgc file, and rerun the command, we get :
file -b -m /usr/share/magic:/usr/share/cyrus-imapd/rpm/magic
/var/lib/imap/mailboxes.db
file: Using regular magic file `/usr/share/cyrus-imapd/rpm/magic'
Cyrus skiplist DB
In fact, if we recompile the magic file to create a new magic.mgc, it's
different with the old one :
cp /usr/share/cyrus-imapd/rpm/magic.mgc /tmp
cd /tmp
file -C -m magic
cmp magic.mgc /usr/share/cyrus-imapd/rpm/magic.mgc
magic.mgc /usr/share/cyrus-imapd/rpm/magic.mgc differ: byte 109, line 1
Now, with the new magic.mgc, no more problem :
file -b -m magic /var/lib/imap/mailboxes.db
Cyrus skiplist DB
So the questions :
1) Why the default magic.mgc is different from the new one ?
2) If the default magic.mgc is bad, why there wasn't any problem before the
database corruption ?
3) Is it a mailboxes.db rebuild problem ? (But the newly rebuilt database
works very fine)
The default magic.mgc is not altered since installation, as magic and
magic.mgc have the same date:
# ls -l /usr/share/cyrus-imapd/rpm
-rw-r--r-- 1 root root 338 jan 29 2003 magic
-rw-r--r-- 1 root root 216 jan 29 2003 magic.mgc
Thanks in advance.
PS: our configuration is
cyrus-sasl-md5-2.1.10-1
cyrus-sasl-2.1.10-1
cyrus-sasl-devel-2.1.10-1
cyrus-imapd-2.1.11-6
cyrus-imapd-utils-2.1.11-6
# uname -a
Linux myhost 2.4.18-14 #1 Wed Sep 4 13:35:50 EDT 2002 i686 i686 i386
GNU/Linux
--
M. Zixiong WANG,
z.wang at sysium.com
More information about the Info-cyrus
mailing list