Command-Line Utilities

The cluster utility enables you to manage almost all of the functions and administrative needs of a server cluster from the command line, making it easy to integrate such functions into scripts and dynamic web pages you might create. In this section, I'll take a look at the various options available with cluster and what you can do with the utility.

A couple of notes before I begin: when using cluster, the locale settings for the user account under which you're logged in must match the system default locale on the computer used to manage the cluster. It's best to match the locales on all cluster nodes and all computers from which you will use the command-line utility.

With that out of the way, let's take a look at using the utility. You can create new clusters from the command line; for example, to create a new cluster called "testcluster" at the IP address 192.168.1.140 with the administrator account, use the following:

cluster testcluster /create ipaddress:192.168.1.140 /pass:Password /user:HASSELLTECH\
admnistratior /verbose

The /verbose option outputs detailed information to the screen about the process of creating the cluster.

You can add a node or multiple node (as shown in the example below) by using the /add switch. In the next command, I'm adding three nodes, called test1, test2, and test3, respectively, to the testcluster cluster.

cluster testcluster /add:test1,test2,test3 /pass:Password /verbose

You might also wish to change the quorum resource via the ...

Get Windows Server 2008: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.