hagroup

Access the hagroup-level commands. The hagroup commands are used to manage and administer HA (high availability) groups of Luna HSM partitions for redundancy and load balancing.

Syntax

hagroup

addmember
addstandby
creategroup
deletegroup
halog
haonly
interval
listgroups
recover
recoverymode
removemember
removestandby
retry
synchronize

Argument(s) Shortcut Description
addmember am Add a member to an HA group. See hagroup addmember.
addstandby as Convert an HA group member to a standby member. See hagroup addstandby.
creategroup c Create an HA group. See hagroup creategroup.
deletegroup d Delete an HA group . See hagroup deletegroup.
halog hl Configure the HA log file. See hagroup halog.
haonly ho Enable "HA Only" mode. See hagroup haonly.
interval i Set the HA recover retry interval. See hagroup interval
listgroups l List the currently-configured HA groups. See hagroup listgroups.
recover re Recover a failed HA member. See hagroup recover.
recoverymode m Set HA recovery mode to "activeBasic" or "activeEnhanced". See hagroup recoverymode.
removemember rm Remove a member from an HA group. See hagroup removemember.
removestandby rs Convert a standby member to an active member of the HA group. See hagroup removestandby.
retry rt Set the HA recover retry count. See hagroup retry
synchronize s Synchronize an HA group. See hagroup synchronize

TIP   Change in scripted operation from Luna HSM 6.x to Luna HSM 7.x

When scripting multi-step operations, a common way to provide responses to interactive commands (example, the lunacm hagroup creategroup command needs a response of "copy", or "remove", or "quit") is to use "echo" to pipe the response text into the command within your script.

This worked well for Luna 5.x/6.x, in the below example presenting "copy" to resolve the interim prompt.

“echo copy | lunacm -q hagroup creategroup -serialNumber <serialNumber> -label <HAgroupName>  -password <partitionPass>"

To accomplish the same result with Luna 7.x.x, do the following:

1.Create a file, in this example, “copy.txt” that contains only the word “copy” as its content.

2.Run the “lunacm” commands as below to create the HA group, and to add a member to the HA group, while inputting the “copy” prompt:

In cmd (for .bat script):

type copy.txt | lunacm -c hagroup creategroup -label HA -slot 0 -p ********
type copy.txt | lunacm -c hagroup addmember -group HA -slot 1 -p ********

In Powershell (for powershell script) :

Get-Content .\copy.txt | .\lunacm.exe -c hagroup creategroup -label HA -slot 0 -p ********
Get-Content .\copy.txt | .\lunacm.exe -c hagroup addmember -group HA -slot 1 -p ********

Use the same technique in similar situations.