Using the cluadmin Utility

The cluadmin utility provides a command-line user interface that enables an administrator to monitor and manage the cluster systems and services. Use the cluadmin utility to perform the following tasks:

The cluster uses an advisory lock to prevent the cluster database from being simultaneously modified by multiple users on either cluster system. Users can only modify the database if they hold the advisory lock.

When the cluadmin utility is invoked, the cluster software checks if the lock is already assigned to a user. If the lock is not already assigned, the cluster software assigns the requesting user the lock. When the user exits from the cluadmin utility, the lock is relinquished.

If another user holds the lock, a warning will be displayed indicating that there is already a lock on the database. The cluster software allows for the option of taking the lock. If the lock is taken by the current requesting user, the previous holder of the lock can no longer modify the cluster database.

Take the lock only if necessary, because uncoordinated simultaneous configuration sessions may cause unpredictable cluster behavior. In addition, it is recommended to make only one change to the cluster database (for example, adding, modifying, or deleting services) at a time. The cluadmin command line options are as follows:

-d or --debug

Displays extensive diagnostic information.

-h, -?, or --help

Displays help about the utility, and then exits.

-n or --nointeractive

Bypasses the cluadmin utility's top-level command loop processing. This option is used for cluadmin debugging purposes.

-t or --tcl

Adds a Tcl command to the cluadmin utility's top-level command interpreter. To pass a Tcl command directly to the utility's internal Tcl interpreter, at the cluadmin> prompt, preface the Tcl command with tcl. This option is used for cluadmin debugging purposes.

-V or --version

Displays information about the current version of cluadmin.

When the cluadmin utility is invoked without the -n option, the cluadmin> prompt appears. You can then specify commands and subcommands. Table 3-1 describes the commands and subcommands for the cluadmin utility:

Table 3-1. cluadmin Commands

cluadmin Commandcluadmin SubcommandDescriptionExample
helpNoneDisplays help for the specified cluadmin command or subcommand. help service add
clusterstatusDisplays a snapshot of the current cluster status. See the Section called Displaying Cluster and Service Status in Chapter 8 for information. cluster status
 loglevelSets the logging for the specified cluster daemon to the specified severity level. See the Section called Modifying Cluster Event Logging in Chapter 8 for information. cluster loglevel cluquorumd 7
 reloadForces the cluster daemons to re-read the cluster configuration database. See the Section called Reloading the Cluster Database in Chapter 8 for information. cluster reload
 nameSets the name of the cluster to the specified name. The cluster name is included in the output of the clustat cluster monitoring command. See the Section called Changing the Cluster Name in Chapter 8 for information.cluster name dbasecluster
 backupSaves a copy of the cluster configuration database in the /etc/cluster.conf.bak file. See the Section called Backing Up and Restoring the Cluster Database in Chapter 8 for information. cluster backup
 restoreRestores the cluster configuration database from the backup copy in the /etc/cluster.conf.bak file. See the Section called Backing Up and Restoring the Cluster Database in Chapter 8 for information. cluster restore
 saveasSaves the cluster configuration database to the specified file. See the Section called Backing Up and Restoring the Cluster Database in Chapter 8 for information.cluster saveas cluster_backup.conf
 restorefromRestores the cluster configuration database from the specified file. See the Section called Backing Up and Restoring the Cluster Database in Chapter 8 for information. cluster restorefrom cluster_backup.conf
serviceaddAdds a cluster service to the cluster database. The command prompts you for information about service resources and properties. See the Section called Configuring a Service in Chapter 4 for information.service add
 modifyModifies the resources or properties of the specified service. You can modify any of the information that you specified when the service was created. See the Section called Modifying a Service in Chapter 4 for information.service modify dbservice
 show stateDisplays the current status of all services or the specified service. See the Section called Displaying Cluster and Service Status in Chapter 8 for information.service show state dbservice
 relocateCauses a service to be stopped on the cluster member its currently running on and restarted on the other. Refer to the Section called Relocating a Service in Chapter 4 for more information.service relocate nfs1
 show configDisplays the current configuration for the specified service. See the Section called Displaying a Service Configuration in Chapter 4 for information. service show config dbservice
 disableStops the specified service. You must enable a service to make it available again. See the Section called Disabling a Service in Chapter 4 for information.service disable dbservice
 enableStarts the specified disabled service. See the Section called Enabling a Service in Chapter 4 for information.service enable dbservice
 deleteDeletes the specified service from the cluster configuration database. See the Section called Deleting a Service in Chapter 4 for information.service delete dbservice
aproposNoneDisplays the cluadmin commands that match the specified character string argument or, if no argument is specified, displays all cluadmin commands.apropos service
clearNoneClears the screen display.clear
exitNoneExits from cluadmin.exit
quitNoneExits from cluadmin.quit

While using the cluadmin utility, press the [Tab] key to help identify cluadmin commands. For example, pressing the [Tab] key at the cluadmin> prompt displays a list of all the commands. Entering a letter at the prompt and then pressing the [Tab] key displays the commands that begin with the specified letter. Specifying a command and then pressing the [Tab] key displays a list of all the subcommands that can be specified with that command.

Users can additionally display the history of cluadmin commands by pressing the up arrow and down arrow keys at the prompt. The command history is stored in the .cluadmin_history file in the user's home directory.