The 'zmvolume' command will do that for you:
Code:
$ zmvolume --help
usage: zmvolume {-a | -d | -l | -e | -dc | -sc } <options>
-a,--add Adds a volume.
-c,--compress <arg> Compress blobs; "true" or "false"
-ct,--compressionThreshold <arg> Compression threshold; default 4KB
-d,--delete Deletes a volume.
-dc,--displayCurrent Displays the current volumes.
-e,--edit Edits a volume.
-h,--help Displays this help message.
-id,--id <arg> Volume ID
-l,--list Lists volumes.
-n,--name <arg> volume name
-p,--path <arg> Root path
-s,--server <arg> Mail server hostname. Default is
localhost.
-sc,--setCurrent Sets the current volume.
-t,--type <arg> Volume type (primaryMessage,
secondaryMessage, or index)
-ts,--turnOffSecondary Turns off the current secondary
message volume
-Y,--authtokenfile <arg> use auth token string(has to be in
JSON format) from command line
-y,--authtoken <arg> use auth token string(has to be in
JSON format) from command line