Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

September 05, 2008 12:00 AM

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

Cluster-configuration steps and screencast included
Windows IT Pro
InstantDoc ID #100161
Rating: (1)

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" /create

Creating resource group 'file server'...

Group                Node            Status
-------------------- --------------- ------
file server          savdalclus01    Offline

C:\>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 restype

Listing all available resource types:

Display Name                         Resource Type Name
------------------------------------ ------------------------------------
DHCP Service                         DHCP Service
Distributed File System              Distributed File System
Distributed Transaction Coordinator  Distributed Transaction Coordinator
File Server                          File Server
File Share Quorum Witness            File Share Witness
Generic Application                  Generic Application
Generic Script                       Generic Script
Generic Service                      Generic Service
IP Address                           IP Address
IPv6 Address                         IPv6 Address
IPv6 Tunnel Address                  IPv6 Tunnel Address
iSNSClusRes                          Microsoft iSNS
(Resource Type Unavailable)          MSMQ
(Resource Type Unavailable)          MSMQTriggers
Network Name                         Network Name
NFS Share                            NFS Share
Physical Disk                        Physical Disk
Print Spooler                        Print Spooler
Volume Shadow Copy Service Task      Volume Shadow Copy Service Task
WINS 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.0

Creating resource 'FS IP Address'...

Resource             Group                Node            Status
-------------------- -------------------- --------------- ------
FS IP Address        file server          savdalclus01    Offline

C:\>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" /listdep

Listing 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" /listdep

Listing 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    Online
FS 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.

Related Content:

ARTICLE TOOLS

Comments
    There are no comments to display. Be the first one!
You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.