Q. How can I create a new Windows Server 2008 cluster resource group from the command line?

Cluster-configuration steps and screencast included

John Savill

September 4, 2008

3 Min Read
ITPro Today logo in a gray background | ITPro Today

A. You should never add any resources to the default Cluster Group. Instead, you should create resource groups that you want to use to host resources. When you add a new resource group, at minimum it needs an IP address, a network name, and an instance of a resource type (e.g., file server). Let’s create a new group and a file server resource within it. Note that I use the period (.) to show that we’re modifying the local cluster.

C:>cluster . group "file server" /createCreating resource group 'file server'...Group                Node            Status-------------------- --------------- ------file server          savdalclus01    OfflineC:>cluster . res "File Server" /create /group:"file server" /type:"File Server"Creating resource 'File Server'...Resource             Group                Node            Status-------------------- -------------------- --------------- ------File Server          file server          savdalclus01    Offline

You can use the cluster restype command to display a full list of resource types, as follows:

C:>cluster restypeListing all available resource types:Display Name                         Resource Type Name------------------------------------ ------------------------------------DHCP Service                         DHCP ServiceDistributed File System              Distributed File SystemDistributed Transaction Coordinator  Distributed Transaction CoordinatorFile Server                          File ServerFile Share Quorum Witness            File Share WitnessGeneric Application                  Generic ApplicationGeneric Script                       Generic ScriptGeneric Service                      Generic ServiceIP Address                           IP AddressIPv6 Address                         IPv6 AddressIPv6 Tunnel Address                  IPv6 Tunnel AddressiSNSClusRes                          Microsoft iSNS(Resource Type Unavailable)          MSMQ(Resource Type Unavailable)          MSMQTriggersNetwork Name                         Network NameNFS Share                            NFS SharePhysical Disk                        Physical DiskPrint Spooler                        Print SpoolerVolume Shadow Copy Service Task      Volume Shadow Copy Service TaskWINS Service                         WINS Service

Now you add the IP address and network name. Note that I created an IPv4 address, but you can also add an IPv6 address if you’re using IPv6.

C:>cluster . res "FS IP Address" /create /group:"file server"/type:"IP Address" /priv address=192.168.1.106 subnetmask=255.255.255.0Creating resource 'FS IP Address'...Resource             Group                Node            Status-------------------- -------------------- --------------- ------FS IP Address        file server          savdalclus01    OfflineC:>cluster . res "FS Name" /create /group:"file server"/type:"Network Name" /priv name="savdalclusfsfs01" dnsname="savdalclusfsfs01"Creating resource 'FS Name'...Resource             Group                Node            Status-------------------- -------------------- --------------- ------FS Name              file server          savdalclus01    Offline

Now you need to create a dependency between the IP address and the name, like this:

C:>cluster . res "FS Name" /adddep:"FS IP Address"Making resource 'FS Name' depend on resource 'FS IP Address'...C:>cluster . res "FS Name" /listdepListing resource dependency expression for 'FS Name':----------------------------------------------------------------([FS IP Address])Listing resource dependencies for 'FS Name':Resource             Group                Node            Status-------------------- -------------------- --------------- ------FS IP Address        file server          savdalclus02    Online

We can now bring the resources online by using the cluster .res "resource name" /on command.

For most resource group types, you also need some shared storage to actually do anything useful. So let’s move some available storage into the new resource group:

C:>cluster res "Data Disk" /move:"file server"Moving resource 'Data Disk' to group 'file server'...Resource             Group                Node            Status-------------------- -------------------- --------------- ------Data Disk            file server          savdalclus01    Online

Now you set the network name and the storage as dependencies for the resource group to be online, like this:

C:>cluster . res "file server" /adddep:"FS Name"Making resource 'file server' depend on resource 'FS Name'...C:>cluster . res "file server" /adddep:"Data Disk"Making resource 'file server' depend on resource 'Data Disk'...C:>cluster . res "file server" /listdepListing resource dependency expression for 'file server':----------------------------------------------------------------([Data Disk]) and ([FS Name])Listing resource dependencies for 'file server':Resource             Group                Node            Status-------------------- -------------------- --------------- ------Data Disk            file server          savdalclus01    OnlineFS Name              file server          savdalclus01    Online

You can bring up the resource group by using the cluster .group group name /on command. Finally, you can actually add items to the resource group as you’d do with a share using typical methods, for example:

net share data=e:data /remark:"Data Share"

The screencast below takes you through using the command line to perform this and other Server 2008 cluster-configuration tasks.

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like