Re: rehash seems not to work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 logs:



Jan 10 17:43:32 ihf2 cyrus/imap[28092]: login: server.local [192.168.0.1] peter plaintext User logged in Jan 10 17:43:32 ihf2 cyrus/imap[28092]: 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:

fulldirhash: 0
     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
     mail spool.

     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.

hashimapspool:
     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.

	Andy
----
Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

[Index of Archives]     [Cyrus SASL]     [Squirrel Mail]     [Asterisk PBX]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [KDE]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux