Revert from HSM back to primary volume

Discuss your pilot or production implementation with other Zimbra admins or our engineers.
peter@mxtoolbox.com
Advanced member
Advanced member
Posts: 109
Joined: Fri Sep 12, 2014 10:26 pm

Revert from HSM back to primary volume

Postby peter@mxtoolbox.com » Mon Feb 04, 2008 9:38 pm

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@mxtoolbox.com
Advanced member
Advanced member
Posts: 109
Joined: Fri Sep 12, 2014 10:26 pm

Revert from HSM back to primary volume

Postby peter@mxtoolbox.com » Tue Feb 05, 2008 8:55 am

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?
jhahm
Advanced member
Advanced member
Posts: 57
Joined: Fri Sep 12, 2014 9:55 pm

Revert from HSM back to primary volume

Postby jhahm » Wed Feb 06, 2008 11:22 am

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.
4211PeterH
Posts: 48
Joined: Fri Sep 12, 2014 9:58 pm

Revert from HSM back to primary volume

Postby 4211PeterH » Wed Feb 06, 2008 4:41 pm

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..?:rolleyes:
malayo
Advanced member
Advanced member
Posts: 116
Joined: Sat Sep 13, 2014 1:59 am

Revert from HSM back to primary volume

Postby malayo » Sun Mar 18, 2012 5:02 am

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?
User avatar
L. Mark Stone
Elite member
Elite member
Posts: 2187
Joined: Wed Oct 09, 2013 11:35 am
Location: Portland, Maine, US
ZCS/ZD Version: 8.8.15 Network Edition
Contact:

Revert from HSM back to primary volume

Postby L. Mark Stone » Sun Mar 18, 2012 10:34 am

[quote user="4211PeterH"]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..?:rolleyes:[/QUOTE]
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
___________________________________
L. Mark Stone
Mission Critical Email - Zimbra VAR/BSP/Training Partner https://www.missioncriticalemail.com/
Zeta Alliance http://www.zetalliance.org/
16113Chewie71
Outstanding Member
Outstanding Member
Posts: 367
Joined: Fri Sep 12, 2014 10:17 pm

Revert from HSM back to primary volume

Postby 16113Chewie71 » Mon Apr 22, 2013 10:51 pm

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
speno
Advanced member
Advanced member
Posts: 56
Joined: Sat Sep 13, 2014 1:08 am

Revert from HSM back to primary volume

Postby speno » Wed Apr 24, 2013 4:25 pm

Did you purge the account from the previous server? If not, does that make it better, worse, or about the same? :-)



usage: zmpurgeoldmbox -a

-a,--account Email address of account to purge

-h,--help Displays this help message.

-s,--server Mail server hostname. Default is localhost.

16113Chewie71
Outstanding Member
Outstanding Member
Posts: 367
Joined: Fri Sep 12, 2014 10:17 pm

Revert from HSM back to primary volume

Postby 16113Chewie71 » Fri May 24, 2013 8:32 am

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

Return to “Administrators”

Who is online

Users browsing this forum: No registered users and 15 guests