rehash seems not to work
morgan at orst.edu
Wed Jan 10 12:21:54 EST 2007
On Wed, 10 Jan 2007, peter pilsl wrote:
> I'm currently upgrading from 2.0.16 to 2.2
> To use the improved directory hashing scheme I run "rehash full".
> This created the new mail-subfolder in my spool-directory and the subfolders
> A-Z (uppercase) and a stage. - folder. Nothing more !!! No entries in none
> of these subfolders. The tool takes about one second to run. I've got about
> 500 users on my installation and gigs of maildata.
> When I now try to login to my imap-server I get the following error in the
> Jan 10 17:43:32 ihf2 cyrus/imap: login: server.local [192.168.0.1]
> peter plaintext User logged in
> Jan 10 17:43:32 ihf2 cyrus/imap: IOERROR: opening
> /data/cyrus/spool/mail/p/user/peter/cyrus.header: No such file or directory
> Two things hit my eye: first : imap expects a lowercase folder below mail !!
> rehash gave me an uppercase.
> second : imap expects another subfolder below every letter for each user.
> rehash obviously did not create that.
There are two options in imapd.conf for hashing:
If enabled, uses an improved directory hashing scheme which
hashes the entire username instead of using just the first
letter. This changes hash algorithm used for quota and user
directories and if hashimapspool is enabled, the entire
Note that this option can NOT be changed on a live system. The
server must be quiesced and then the directories moved with
the rehash utility.
If enabled, the partitions will also be hashed, in addition to
the hashing done on configuration directories. This is
recommended if one partition has a very bushy mailbox tree.
I've never used fulldirhash myself, but it sounds like fulldirhash uses
the uppercase letters for hashing? So you may want to use rehash with
"basic" hash mode, or switch and use fulldirhash in imapd.conf.
> Two questions:
> first : Am I right to expect that rehash should create the
> /sppol/mail/letter/username - structure and put the cyrus.headers-files there
> but keep the rest in the /spool/user/username - folder?
Nope, all the user's mail should end up in the new directory.
> second : is there any improved rehash-script. I found several discussion on
> rehash-problems on the web, but none was clear enough to tell if I experience
> the same problem and what the solution actually would be.
Unfortunately I've never had to use the rehash script, so I can't help you
debug it much there. You might try running it with the -i option to step
through it user by user and see what is happening.
> third (uups) : it seems that I could disable hashimapspool on my
> installation. Would this propably solve my problem? and how much would it
> affect performance. I really have got a lot of users and things should be
> going fast. 500 users in a medium-sized office that really use their emails
> the whole day.
500 users would be a "small" installation in the Cyrus world. :) You can
safely run without any hashing for that.
More information about the Info-cyrus