ZCS88-zxbackup-Loss-of-HSM-Volume: Difference between revisions

No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 23: Line 23:
         secondaries                             
         secondaries                             


                 id                                                          3
                 id                                                          3         <<== Note the ID of the Volume we will use as an example in this article
                 name                                                        hsm
                 name                                                        hsm
                 path                                                        /opt/zimbra/hsm
                 path                                                        /opt/zimbra/hsm
Line 44: Line 44:


===If the /opt/zimbra/hsm volume went missing, you can create the volume with this command===
===If the /opt/zimbra/hsm volume went missing, you can create the volume with this command===
Make sure you have done your due diligence repairing the device attached to your HSM volume (or replacing it).<br>
Once the hardware is fixed or replaced, recreate the directory, and mount the hardware device.<br>
Example...<br>
<code><pre>
mkdir /opt/zimbra/hsm
chown -R zimbra:zimbra /opt/zimbra/hsm
mount /dev/dddddd    /opt/zimbra/hsm
</pre></code>
Now, recreate the missing volume.<br>
<code><pre>
<code><pre>
zxsuite hsm docreatevolume secondary "hsm" "/opt/zimbra/hsm/" false 4096
zxsuite hsm docreatevolume secondary "hsm" "/opt/zimbra/hsm/" false 4096
Line 49: Line 60:
zxsuite hsm doupdatevolume hsm current_volume true
zxsuite hsm doupdatevolume hsm current_volume true
</pre></code>
</pre></code>
====If you see this error...====
<code><pre>
Error creating volume: com.zimbra.cs.volume.VolumeServiceException: volume with the same id, name, or path already exists
</pre></code>
You will need to remove the old volume ID from mysql first.
<code><pre>
mysql zimbra -e "delete from current_volumes where secondary_message_volume_id='3';"
mysql zimbra -e "delete from volume where id='3';"
</pre></code>
===Check for Missing BLOBS===
<code><pre>
zxsuite hsm doCheckBlobs start
</pre></code>
Now search for the word WARN in the CheckBlobs log
<code><pre>
grep WARN  /opt/zimbra/log/op_CheckBlobs_bdbd8112-8c2f-4f8f-bc7b-a82ef5388378.log
</pre></code>
If any BLOB is missing, you would see lines like the following in the output
<code><pre>
2017-08-22 15:16:53,877 WARN Missing Blob file: Mailbox id: 5 - Item id: 4610 - Revision: 8720 - Blob path: /opt/zimbra/hsm/0/5/msg/1/4610-8720.msg - Size: 1859 - Digest: dYV2+dXtH9AUAHH4au1jWquWgCeBCz7XpsYtHza0ofw=
</pre></code>
===Restore the Missing BLOBS===
<code><pre>
zxsuite --progress backup dorestoreblobs 3 backup_path /opt/zimbra/backup dryrun false
</pre></code>
<strong>Note the number 3 to indicate the volume ID.</strong>

Latest revision as of 20:42, 5 September 2017

ZCS 8.8 Article ZCS 8.8


Loss of HSM Volume

Display List of Volumes

zxsuite hsm getallvolumes

If there is an HSM volume at /opt/zimbra/hsm, the listing would look something like this...

        primaries                               

                id                                                          1
                name                                                        message1
                path                                                        /opt/zimbra/store
                compressed                                                  false
                threshold                                                   4096
                storeType                                                   LOCAL
                isCurrent                                                   true
                volumeType                                                  primary
        secondaries                             

                id                                                          3          <<== Note the ID of the Volume we will use as an example in this article
                name                                                        hsm
                path                                                        /opt/zimbra/hsm
                compressed                                                  false
                threshold                                                   4096
                storeType                                                   LOCAL
                isCurrent                                                   true
                volumeType                                                  secondary
        indexes                                 

                id                                                          2
                name                                                        index1
                path                                                        /opt/zimbra/index
                compressed                                                  false
                threshold                                                   4096
                storeType                                                   LOCAL
                isCurrent                                                   true
                volumeType                                                  index

If the /opt/zimbra/hsm volume went missing, you can create the volume with this command

Make sure you have done your due diligence repairing the device attached to your HSM volume (or replacing it).

Once the hardware is fixed or replaced, recreate the directory, and mount the hardware device.
Example...

mkdir /opt/zimbra/hsm
chown -R zimbra:zimbra /opt/zimbra/hsm
mount /dev/dddddd     /opt/zimbra/hsm

Now, recreate the missing volume.

zxsuite hsm docreatevolume secondary "hsm" "/opt/zimbra/hsm/" false 4096

zxsuite hsm doupdatevolume hsm current_volume true

If you see this error...

Error creating volume: com.zimbra.cs.volume.VolumeServiceException: volume with the same id, name, or path already exists

You will need to remove the old volume ID from mysql first.

mysql zimbra -e "delete from current_volumes where secondary_message_volume_id='3';"

mysql zimbra -e "delete from volume where id='3';"

Check for Missing BLOBS

zxsuite hsm doCheckBlobs start

Now search for the word WARN in the CheckBlobs log

grep WARN  /opt/zimbra/log/op_CheckBlobs_bdbd8112-8c2f-4f8f-bc7b-a82ef5388378.log

If any BLOB is missing, you would see lines like the following in the output

2017-08-22 15:16:53,877 WARN Missing Blob file: Mailbox id: 5 - Item id: 4610 - Revision: 8720 - Blob path: /opt/zimbra/hsm/0/5/msg/1/4610-8720.msg - Size: 1859 - Digest: dYV2+dXtH9AUAHH4au1jWquWgCeBCz7XpsYtHza0ofw=

Restore the Missing BLOBS

zxsuite --progress backup dorestoreblobs 3 backup_path /opt/zimbra/backup dryrun false

Note the number 3 to indicate the volume ID.

Jump to: navigation, search