| Red Hat Docs > Manuals > Red Hat Enterprise Linux Manuals > |
| Red Hat Cluster Manager: The Red Hat Cluster Manager Installation and Administration Guide | ||
|---|---|---|
| Prev | Chapter 3. Cluster Software Installation and Configuration | Next |
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:
Add, modify, and delete services
Disable and enable services
Display cluster and service status
Modify cluster daemon event logging
Backup and restore the cluster database
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:
Displays extensive diagnostic information.
Displays help about the utility, and then exits.
Bypasses the cluadmin utility's top-level command loop processing. This option is used for cluadmin debugging purposes.
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.
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 Command | cluadmin Subcommand | Description | Example |
|---|---|---|---|
| help | None | Displays help for the specified cluadmin command or subcommand. | help service add |
| cluster | status | Displays a snapshot of the current cluster status. See the Section called Displaying Cluster and Service Status in Chapter 8 for information. | cluster status |
| loglevel | Sets 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 | |
| reload | Forces 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 | |
| name | Sets 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 | |
| backup | Saves 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 | |
| restore | Restores 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 | |
| saveas | Saves 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 | |
| restorefrom | Restores 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 | |
| service | add | Adds 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 |
| modify | Modifies 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 state | Displays 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 | |
| relocate | Causes 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 config | Displays the current configuration for the specified service. See the Section called Displaying a Service Configuration in Chapter 4 for information. | service show config dbservice | |
| disable | Stops 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 | |
| enable | Starts the specified disabled service. See the Section called Enabling a Service in Chapter 4 for information. | service enable dbservice | |
| delete | Deletes the specified service from the cluster configuration database. See the Section called Deleting a Service in Chapter 4 for information. | service delete dbservice | |
| apropos | None | Displays the cluadmin commands that match the specified character string argument or, if no argument is specified, displays all cluadmin commands. | apropos service |
| clear | None | Clears the screen display. | clear |
| exit | None | Exits from cluadmin. | exit |
| quit | None | Exits from cluadmin. | quit |
While using the cluadmin utility, press
the
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.