Appendix F. Cluster Command-line Utilities

This appendix provides reference information on the following command-line utilities provided with Red Hat Cluster Suite:

F.1. Using redhat-config-cluster-cmd

This section details an example of the redhat-config-cluster-cmd utility, which allows you to configure all aspects of the cluster, and stores the information in the /etc/cluster.xml file.

Usage, options, and examples of using the redhat-config-cluster-cmd command can be found in its man page. To access the manpage from a shell-prompt, type man redhat-config-cluster-cmd.

The following describes an example cluster system that is configured using only the redhat-config-cluster-cmd utility.

Suppose a system administrator wants to create a cluster system that will serve highly available NFS services to the engineering department of a small organization. The NFS export should only be accessible to the three members of the department (Bob, Jane, and Tom).

  1. Add the service and assign it a descriptive name to distinguish its functionality from other services that may run on the cluster.

    redhat-config-cluster-cmd --add_service --name=nfs_engineers
  2. Add a service IP address that will transfer from one member to another in the event of failover:

    redhat-config-cluster-cmd --service=nfs_engineers --add_service_ipaddress \
  3. Add a device to the service (the disk partition that serves as the NFS export):

    redhat-config-cluster-cmd --service=nfs_engineering --add_device --name=/dev/sdc3
  4. Add a mount point for the device (note: the mount point cannot be listed in /etc/fstab):

    redhat-config-cluster-cmd --service=nfs_engineering --device=/dev/sdc3 --mount \
    	      --mountpoint=/mnt/nfs/engineering/ --fstype=ext3 \
    	      --options=rw,nosuid,sync --forceunmount=yes
  5. Add the mounted directory for NFS exporting:

    redhat-config-cluster-cmd --service=nfs_engineering --device=/dev/sdc3 \
    	      --add_nfs_export --name=/mnt/nfs/engineering
  6. Allow Bob to access the clustered NFS export:

    redhat-config-cluster-cmd --service=nfs_engineering --device=/dev/sdc3 \
    	      --nfsexport=/mnt/nfs/engineering --add_client --name=bob \
  7. Repeat step 6 for Jane and Tom.

For more information and examples of using redhat-config-cluster-cmd, refer to the man page by typing the following at a shell prompt:

man redhat-config-cluster-cmd