Results 1 to 2 of 2

Thread: [SOLVED] Blob path calculation wrong on one account?

  1. #1
    Join Date
    Aug 2009
    Location
    Palma de Mallorca, Spain
    Posts
    66
    Rep Power
    6

    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 03:13 AM. Reason: added link

  2. #2
    Join Date
    Aug 2009
    Location
    Palma de Mallorca, Spain
    Posts
    66
    Rep Power
    6

    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

Similar Threads

  1. [SOLVED] ldap - cache is out of date or doesn't exist
    By aidanewen in forum Administrators
    Replies: 11
    Last Post: 08-31-2010, 12:10 AM
  2. ZCS Backup Report: FAIL, (No such file or directory)
    By RJones in forum Administrators
    Replies: 16
    Last Post: 03-08-2010, 02:40 AM
  3. Email shows coming from wrong account
    By bhughesiii in forum Users
    Replies: 11
    Last Post: 01-14-2010, 03:15 PM
  4. Replies: 4
    Last Post: 09-15-2009, 07:58 AM
  5. Reply goes to wrong account (build 1083)
    By rajahd in forum General Questions
    Replies: 5
    Last Post: 03-25-2008, 06:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •