Zimbra NG Modules/Zimbra NG HSM/Advanced Volume Operations

Revision as of 12:07, 29 November 2017 by Jorge de la Cruz (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.



Zimbra NG HSM - Advanced Volume Operations

Zimbra NG HSM: More than meets the eye

While at first sight Zimbra NG HSM might only seem a module strictly dedicated to HSM, it also features some highly useful Volume-related tools that are not directly related to HSM.

Due to the implicit risks in volume management, this tools are only available through the Zimbra NG Modules Command Line Interface.

Volume Operations at a glance

The following volume operations are available:

doCheckBlobs - Perform BLOB coherency checks on one or more volumes. doDeduplicate - Start Item Dedupliaction on a volume. doVolumeToVolumeMove - Move all items from a Volume to another. getVolumeStats - Display informations about a volume's size and number of thereby contained items/blobs.

Volume operation analysis

doCheckBlobs

Usage
zimbra@mail:~$ zxsuite powerstore doCheckBlobs

command doCheckBlobs requires more parameters

Syntax:
   zxsuite powerstore doCheckBlobs {start} [attr1 value1 [attr2 value2...]]

PARAMETER LIST

NAME                           TYPE            EXPECTED VALUES    DEFAULT
action(M)                      String          start              
volume_ids(O)                  Integer[,..]    1,3                
mailbox_ids(O)                 Integer[,..]    2,9,27             
missing_blobs_crosscheck(O)    Boolean         true|false         true
traced(O)                      Boolean         true|false         false

(M) == mandatory parameter, (O) == optional parameter

Usage example:

Usage examples:
zxsuite powerstore doCheckBlobs start
Perform a BLOB coherency check on all message volumes

zxsuite powerstore doCheckBlobs start volume_ids 1,3
Perform a BLOB coherency check on volumes 1 and 3

zxsuite powerstore doCheckBlobs start mailbox_ids 2,9,27
Perform a BLOB coherency check on mailboxes 2,9 and 27

zxsuite powerstore doCheckBlobs start missing_blobs_crosscheck false
Perform a BLOB coherency check without checking on other volumes

zxsuite powerstore doCheckBlobs start traced true
Perform a BLOB coherency check, logging even the correct checked items
Description and Tips

The doCheckBlobs operation can be used to run BLOB coherency checks on volumes and mailboxes. This can be useful when experiencing issues related to broken or unviewable items, as such are often caused by either the impossibility for Zimbra to find or access the BLOB file related to an Item or an issue with the BLOB content itself.

Specifically, the following checks are made:

  • DB-to-BLOB coherency: For every Item entry in Zimbra's DB, check whether the appropriate BLOB file exists
  • BLOB-to-DB coherency: For every BLOB file in a volume/mailbox, check whether the appropriate DB data exists
  • Filename coherency: Checks the coherency of each BLOB's filename with its content (as BLOBs are named after their file's SHA hash)
  • Size coherency: For every BLOB file in a volume/mailbox, checks whether the BLOB file's size is coherent with the expected size (stored in the DB)

doDeduplicate

Usage
zimbra@mail:~$ zxsuite powerstore doDeduplicate

command doDeduplicate requires more parameters

Syntax:
   zxsuite powerstore doDeduplicate {volume_name} [attr1 value1 [attr2 value2...]]

PARAMETER LIST

NAME              TYPE           EXPECTED VALUES    DEFAULT
volume_name(M)    String[,..]                       
dry_run(O)        Boolean        true|false         false

(M) == mandatory parameter, (O) == optional parameter

Usage example:

zxsuite powerstore dodeduplicate secondvolume
Starts a deduplication on volume secondvolume
Description and Tips

Item deduplication is so useful and important that it gets it's own Zimbra Suite Wiki page!

doVolumeToVolumeMove

Usage
zimbra@mail:~$ zxsuite powerstore doVolumeToVolumeMove

command doVolumeToVolumeMove requires more parameters

Syntax:
   zxsuite powerstore doVolumeToVolumeMove {source_volume_name} {destination_volume_name} 

PARAMETER LIST

NAME                          TYPE      
source_volume_name(M)         String    
destination_volume_name(M)    String    

(M) == mandatory parameter, (O) == optional parameter

Usage example:

zxsuite powerstore doVolumeToVolumeMove sourceVolume destVolume
Moves the whole sourceVolume to destVolume
Description and Tips

This command can prove itself highly useful in all those situations where you need to stop using a volume, such as:

  • Decommissioning old hardware - if you want to get rid of that old disk in a physical server, just create new volumes on other/newer disks and move your data there.
  • Fixing "little mistakes" - Toying around with loop devices or new mount options made you create a new volume in the wrong place? Move the data to another volume! Nobody saw anything, I swear!
  • Centralize volumes - are you just done redesigning your storage infrastructure or you just finally decided to tidy up your Zimbra volumes? With this command you can centralize and move volumes as you please.

getVolumeStats

Usage
zimbra@mail:~$ zxsuite powerstore getVolumeStats

command getVolumeStats requires more parameters

Syntax:
   zxsuite powerstore getVolumeStats {volume_id} [attr1 value1 [attr2 value2...]]

PARAMETER LIST

NAME                   TYPE       EXPECTED VALUES    DEFAULT
volume_id(M)           Integer                       
show_volume_size(O)    Boolean    true|false         false
show_blob_num(O)       Boolean    true|false         false

(M) == mandatory parameter, (O) == optional parameter

Usage example:

**BE CAFERUL** show_volume_size and show_blob_num options are IO intensive and thus disabled by default

zxsuite powerstore getVolumeStats 2
Shows stats for the volume with ID equal to 2
Description and Tips

This command provides the following informations about a volume:

name description
id The ID of the volume
name The Name of the volume
path The Path of the volume
compressed Compression enabled/disabled
threshold Compression threshold (in bytes)
lastMoveOutcome Exit status of the latest doMoveBlobs operation
lastMoveTimestamp End timestamp of the latest doMoveBlobs operation
lastMoveDuration Duration of the last doMoveBlobs operation
lastItemMovedCount Number of items moved to the current secondary volume during the latest doMoveBlobs operation
bytesSaved Total amount of disk space freed up thanks to deduplication and compression
bytesSavedLast Amount of disk space freed up thanks to deduplication and compression during the latest doMoveBlobs operation

The "show_volume_size" and "show_blob_num" options will add the following data to the output:

option name description
show_volume_size totSize Total disk space used up by the volume
show_blob_num blobNumber Number of BLOB files in the volume

Zimbra NG Modules

logo.png

Latest Version: 8.8

Zimbra NG Modules Resources

Here you can find useful resources for your Zimbra NG Modules



Try Zimbra

Try Zimbra Collaboration with a 60-day free trial.
Get it now »

Want to get involved?

You can contribute in the Community, Wiki, Code, or development of Zimlets.
Find out more. »

Looking for a Video?

Visit our YouTube channel to get the latest webinars, technology news, product overviews, and so much more.
Go to the YouTube channel »

Jump to: navigation, search