[Dovecot] what to expect from changing index location

William Blunn bill+dovecot at blunn.org
Wed Jun 29 20:00:08 EEST 2011


In fact, under sdbox and mdbox, calling these files "index files" is 
misleading because it implies that they can be re-created, leading to 
situations like this.

Such situations could result in catastrophic data loss. Whilst we could 
say it is "user error", users could argue that it is "common knowledge" 
that files referred to as "index files" can be re-created from the "data 
files".

In reality, these so-called "index files" are actually database files 
containing critical data.

They happen to use the same format as Dovecot uses for index files in 
connection with mbox and maildir, but they contain data which is held 
nowhere else and cannot be recreated.

Perhaps the per-mailbox index files for sdbox and mdbox should be 
re-named to "message metadata databases", and the "map index" should be 
renamed to "message store database".

Specifically we should avoid the word "index". By including the word 
"database", we make it clearer that these files contain data.

Timo, what do you reckon?

Regards,

Bill

On 29/06/2011 17:36, William Blunn wrote:
> On 28/06/2011 17:13, Davide Vaghetti wrote:
>> I have one thousand virtual users with mdbox mailbox format and 10 
>> GByte quota. I have noticed some performance problem related to I/O 
>> (the mailbox disk is a 6TB raid1+0 on ISCSI), so I want to put the 
>> index files on a different disk. My actual mail_location is:
>>
>> mail_location = mdbox:/var/vmail/%-1.1u/%u/mdbox
>>
>> and I want to switch to
>>
>> mail_location =
>> mdbox:/var/vmail/%-1.1u/%u/mdbox:INDEX=/var/indexes/%-1.1u/%u/
>>
>> But I cannot figure out a pair of things:
>>
>> - - do the switch trigger the rebuilding of the index files?
>
> !!!!! DANGER, DANGER !!!!!!
>
> Index files cannot be re-generated under mdbox
>
> Go away and read http://wiki2.dovecot.org/MailboxFormat/dbox
>
> "... with dbox the Index files actually contain significant data which 
> is held nowhere else. Index files for both *single-dbox* and 
> *multi-dbox* contain message flags and keywords. For *multi-dbox*, the 
> index file also contains the map_uids which link (via the "map index") 
> to the actual message data. This data cannot be automatically 
> recreated, so it is important that Index files are treated with the 
> same care as message data files."
>
> If you don't already know this, then you probably shouldn't even be 
> using mdbox.
>
>> - - can I get rid of all the old index files?
>
> NO!
>
>> - - how much the index files (no fts squat) can grow?
>
> First solve your understanding problem with mdbox, then worry about 
> details such as this.
>
> Bill
>
>



More information about the dovecot mailing list