Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Administrators

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-20-2010, 02:11 AM
Translation Moderator
 
Posts: 64
Default [SOLVED] Blob path calculation wrong on one account?

Hello,

I have a strange, strange problem. We have about 350 accounts on an 6.0.6.1 server, the server itself is debian 64bit, 16gig ram, 8 cores, fibrechannel connection.

I wrote a small backup/rsync solution which is able to do hotbackups on our opensource zimbra.

Now, the backup solution works really nice and well, we were even able to use the machine we backup to as an cold-standby server, but we have problems with ONE account.

This account is a catchall account which receives every mail which is delivered to the system.

now, regarding to ajcodys understanding the structure wiki [1] I did the calculations for the path as:

mail_item.id >> 12 (actually it's a mail_item.id >> v.mailbox_bits as it is a SQL query and I have joined mail_item with zimbra.volume)

If i do it with perl (which is the same as the SQL query delivers) for the given id i'l get:
perl -e 'print 1688603 >> 12 ; print "\n"'
412

Now, basically I'l have a list of all calculated paths for this account, and I'l do an rsync over this list and rsync tells me that the directory

/mnt/store/store/0/28/msg/412

amongst lot's of others is not existing!!

searching for the ID in the store i find this particular message in:

find ./ -name "*1688603*"
./msg/156/1688603-3045247.msg

So, in the wiki and with my SQL and Perl calculations I'l get for ID 1688603 the path 412, whereas in real-life it's filed in directory 156, which I can not understand why.

Out of the 350 accounts we have only the catchall (thus far) exhibits this behavior. It might have to do with the fact that the ID is very high, (over a million) because it's used as a catchall box ...

Does anyone have any idea what's going on there? Do I have to change the behavior of the calculation if the ID reaches some point? Like you do with the mailboxgroup number (if mailboxid % 100 = 0, groupnr = 100 else groupnr = mailboxid % 100) ...

Hope someone might have an idea ...
best
Ray

[1] Account mailbox database structure - Zimbra :: Wiki

Last edited by Hatrix; 07-20-2010 at 02:13 AM.. Reason: added link
Reply With Quote
  #2 (permalink)  
Old 07-20-2010, 03:23 AM
Translation Moderator
 
Posts: 64
Default

I guess I answered my question on my own.

Somehow I got the idea it could be a boundary on the binary million 1048576

so I checked 1048576 >> 12 = 256
as the last directory is 255, i checked against (1048576 - 1) >> 12 and got 255, so then I came up with:

so I created this formula (which just subtracts x times 1048575 from the id, so if id is greater than 1048575 * 3, its subtracting this amount, and from the rest bitshifting 12 and now the calculation seems correct.

id - (floor(id / 1048575) * 1048575) >> 12
which for the id in the above post now gives the correct 156


I hope though that someone can confirm this, because I do not really want to search for this specific code in the whole source!

best
Ray
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.