Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Revert from HSM back to primary volume

  1. #1
    Join Date
    Feb 2007
    Location
    Austin, TX
    Posts
    110
    Rep Power
    8

    Default Revert from HSM back to primary volume

    Is there an easy way to move messages from the HSM volume back onto your primary. The file structure seems identical, I just don't know how to tell the index that the blob is back on the primary.

    There's not a lot of documentation I can find about HSM which I find odd.
    Peter LeBlond
    Product Development Engineer
    http://www.mxtoolbox.com


  2. #2
    Join Date
    Feb 2007
    Location
    Austin, TX
    Posts
    110
    Rep Power
    8

    Default

    I would also like to ask how you would go about moving from one volume to another, either primary or secondary.

    If I run out of room on my current mounted primary volume, how can I get Zimbra to look at another volume once I perform an offline rsync?
    Peter LeBlond
    Product Development Engineer
    http://www.mxtoolbox.com


  3. #3
    Join Date
    Sep 2005
    Posts
    57
    Rep Power
    10

    Default

    It won't be easy to move messages out of HSM volume to primary. The process would go like this:

    - Stop ZCS so no changes are made to the files being moved.
    - Move/copy the files.
    - For each file moved, update volume_id column in mail_item table in mboxgroupN database, where N is mailbox id % 100.

    If you are moving all files out of HSM volume, you can do the database part this way also:

    for (N = 1 through 100) {
    UPDATE mboxgroupN.mail_item SET volume_id = X WHERE volume_id = Y;
    }

    with Y being the HSM volume id and X being the new target volume id. You can get the ids by running "zmvolume -l" command.


    Now for the second question. You can have multiple primary volumes and multiple HSM volumes. For each type, there is only one designated as "current". All new messages are stored on the current primary volume. When HSM cron job runs, it moves all aged messages to the current secondary volume. So, if you run out of space on the current primary you can define a new primary volume and set it as the current one. Likewise for HSM/secondary. Use "zmvolume -sc" command for setting current volumes.
    Bugzilla - Wiki - Downloads - Before posting... Search!

  4. #4
    Join Date
    Oct 2005
    Location
    Netherlands
    Posts
    55
    Rep Power
    10

    Default

    Is the following interpretation correct?

    So moving back from HSM to Primary is not advisable.
    Adding volumes is ok.
    So why would you want to move back? Space and speed considerations..
    What to do then?
    Create new volume on fast storage, then copy data to new volume, then mount new (fast) volume as old (slow) volume. You can continue this to certain amount of volumes and depending on storage at one time you'll get your data on a san on which you mostly easy can expand your space.

    Just wondering whether this is a correct interpretation to remind as a rule of thumb..?
    Using ZCS Network-edition 5.0.16 on Ubuntu 6.06.2 LTS and 8.04 LTS

  5. #5
    Join Date
    Apr 2011
    Posts
    117
    Rep Power
    4

    Default HSM volume copy

    on ZCS 7.1.4, can I simply copy a HSM volume after migrating the current mailbox to a new server and set it as current so I can still get old emails that got moved to HSM volume?

  6. #6
    Join Date
    Sep 2006
    Location
    477 Congress Street | Portland, ME 04101
    Posts
    1,374
    Rep Power
    11

    Default

    Quote Originally Posted by PeterH View Post
    Is the following interpretation correct?

    So moving back from HSM to Primary is not advisable.
    Adding volumes is ok.
    So why would you want to move back? Space and speed considerations..
    What to do then?
    Create new volume on fast storage, then copy data to new volume, then mount new (fast) volume as old (slow) volume. You can continue this to certain amount of volumes and depending on storage at one time you'll get your data on a san on which you mostly easy can expand your space.

    Just wondering whether this is a correct interpretation to remind as a rule of thumb..?
    Peter,

    AJ Cody has a wiki page someplace covering his testing of "reversing" HSM to a unified storage volume, with no success. His conclusion was that it was a one-way process.

    What we have done is as follows:

    First, you can move the mailboxes from one Zimbra mailbox server with HSM to another mailbox server without HSM. The benefits are no downtime but you lose the hardlinks, so your total storage use may go up.

    Alternatively, you can do a server-to-server migration and on the new server, assuming you are consolidating storage, the mount points for all primary, secondary, tertiary etc. storage and HSM volumes can be placed on the same datastore/storage repository etc. You get the storage consolidation you want, you don't lose the hard links, but you have some downtime and a more complex directory tree structure than on a pristine Zimbra mailbox server.

    Apologies if I am telling you something you already know!

    All the best,
    Mark

  7. #7
    Join Date
    Mar 2006
    Location
    Greenwood, IN
    Posts
    90
    Rep Power
    9

    Default moving blobs between volumes

    Avoid manually updating the DB. The blob mover can be used to relocate any blob from one volume to another. Try this:

    Get a list of volume ids
    Code:
    zmvolume -l
    Use zmsoap with MoveBlobsRequest to move blobs between volumes. This example moves all blobs from all mailbox folders created after 1/1/1970 from volume 3 to volume 1:
    Code:
    zmsoap -v -z MoveBlobsRequest @types=message @sourceVolumeIds=3 @destVolumeId=1 query='is:"anywhere" after:"1/1/1970"'
    Be sure to disable HSM prior to doing the move so they aren't moved again on the next HSM run.

  8. #8
    Join Date
    Sep 2006
    Location
    Illinois
    Posts
    374
    Rep Power
    9

    Default

    I am consolidating stores. Old server had store/hsm/hsm2 and new server just has store. I zmmboxmove'd an account to the new server. All my old blobs that were in hsm and hsm2 are in store now, but I think the DB thinks they are all still in the old hsm/hsm2 volumes (ids 3/4).

    zmblobchk shows a bunch of "unexpected blob" errors. I can't open any messages that weren't on store on the old server. Can I easily fix this in place?

    My other thought is to zmmboxmove back to the old server, then use the zmsoap command inqueue shows above to move all blobs to store.....then zmmboxmove to the new server again. Is that a plan or will all the "unexpected blobs" not move correctly back to the old host?

    Matt

  9. #9
    Join Date
    Apr 2010
    Posts
    57
    Rep Power
    5

    Default

    Did you purge the account from the previous server? If not, does that make it better, worse, or about the same? :-)
    Code:
    usage: zmpurgeoldmbox -a <account email>
     -a,--account <arg>   Email address of account to purge
     -h,--help            Displays this help message.
     -s,--server <arg>    Mail server hostname. Default is localhost.

  10. #10
    Join Date
    Sep 2006
    Location
    Illinois
    Posts
    374
    Rep Power
    9

    Default

    zmpurgeoldmbox doesn't help

    I wrote a script several months ago after a bad outage. It fixes disconnected blobs. I just have to run that every time I move an account to the new servers and it seems to be working fine.

    Matt

Similar Threads

  1. Replies: 7
    Last Post: 02-03-2011, 07:01 AM
  2. HSM and other fun :)
    By multicast in forum Administrators
    Replies: 3
    Last Post: 11-07-2008, 02:32 PM
  3. Configuring and using DSPAM
    By JoshuaPrismon in forum Administrators
    Replies: 55
    Last Post: 03-02-2007, 09:08 AM
  4. receiveing mail
    By maybethistime in forum Administrators
    Replies: 15
    Last Post: 12-09-2005, 04:55 PM
  5. antispam not working?
    By moebis in forum Installation
    Replies: 16
    Last Post: 12-03-2005, 08:11 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
  •