creating highly available services with fail over clustering

Upload: zultasir6377

Post on 07-Apr-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    1/15

    Creating Highly AvailableServices with Failover

    Clustering

    Microsoft Virtual Labs

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    2/15

    Creating Highly Available Services with Failover Clustering

    Table of Contents

    Creating Highly Available Services with Failover Clustering .................................................. 1

    Exercise 1 Configuring Windows 2003 Cluster Service (Join) .......... ........... .......... ........... .......... ........... .......... ........... . 2

    Exercise 2 Creating a Group for File Shares (Home Folders) .......... ........... .......... ........... ........... .......... ........... .......... ... 4Exercise 3 Creating a Group for Print Shares ........... .......... ........... .......... ........... ........... .......... ........... .......... ........... ...... 8

    Exercise 4 Creating Failback Policies ......................................................................................................................... 11

    Exercise 5 Clustering Disks ......................................................................................................................................... 13

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    3/15

    Creating Highly Available Services with Failover Clustering

    Page 1 of 13

    Creating Highly Available Services withFailover Clustering

    Objectives After completing this lab, you will be better able to: Install Cluster Service. Verify Cluster service installation Create an IP Address resource Create a Network Name resource Create a File Share resource with Cluster Administrator Use CLUSTER.EXE to create shares Create an IP Address resource Create a Network Name resource Create a Print Spooler resource with Cluster Administrator Setup an Active/Active Cluster Create Failback Policies Explain the difference between a possible and a preferred owner of a

    group

    Manage shared storage Cluster shared storage

    Estimated Time toComplete This Lab 90 MinutesComputer used in this Lab

    Node1

    Node2

    DC

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    4/15

    Creating Highly Available Services with Failover Clustering

    Page 2 of 13

    Exercise 1Configuring Windows 2003 Cluster Service (Join)

    ScenarioIn this exercise, the first node of the Cluster has already been configured. This exercise will show how theinstallation of Cluster Services has been improved by doing the installation from within Cluster Administrator. InWindows 2003 Enterprise Edition the Cluster Service is installed by default, but not yet configured.

    In this exercise, we will log onto the first node running the Cluster Service and configure the Cluster Service on thesecond node and allow it to join.

    Tasks Detailed Steps

    Complete the following 2

    tasks on:

    Node1

    1. Switch to HOL169-NODE1 logging in

    as the HOL169USER

    account and start

    Cluster

    Administrator

    a. Choose the Start menub. Select All Programs, then Administrative Toolsc. Select Cluster Administratord. In the Open Connection to Cluster box, type HOL169CLUSTER in the Cluster

    or server name box.

    2. Add the second nodeto the Cluster

    a. Choose the File menub. Select Newc. Select Noded. In the Welcome to the Add Nodes Wizard, select Nexte. In the Computer Name box, type HOL169-NODE2f. Click the Add button so that is addedg. Select Nexth. At this point, it will go through and validate the configuration and connectivity.

    Note: Once it completes, you can expand the individual testing points to see what it

    was doing.

    Note:If you click on the View Log button, you can see that Cluster Services now

    create a setup log called CLCFGSRV.LOG and is located in the

    C:\WINDOWS\SYSTEM32\LOGFILES\CLUSTER folder on the node that was just

    added.

    Note:If you click on theDetails button while highlighting the checking points, you

    will get a little more detail to each step.

    i. Once the validation is complete, click the Next Button.j. You will be prompted for the password of the Cluster Service account that is

    currently being used on the first node. Type the password P@sswOrd and

    choose Next.

    Note: P@sswOrd is with a capital O not a zero.

    k. The Next screen shows you information about the Cluster as it is configured (i.e.Name, IP Address, etc).

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    5/15

    Creating Highly Available Services with Failover Clustering

    Page 3 of 13

    Tasks Detailed Steps

    l. Choose the Next button.m.This screen will run through another quick analyzing of the Cluster and also

    configure the Cluster Services on the second node. This will also start the Cluster

    Service on the second node.

    n. Choose the Next button.o. Choose the Finish button and you are done.

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    6/15

    Creating Highly Available Services with Failover Clustering

    Page 4 of 13

    Exercise 2Creating a Group for File Shares (Home Folders)

    ScenarioIn this exercise, we will show the benefits of creating file shares on a Cluster and how the administration of theshares can be kept to a minimum.

    When the Cluster is created the setup wizard automatically detects which disks are shared and are valid for failover.A Physical Disk resource is created to manage each LUN. Separate groups are created for each one of the disks.

    The first group contains a Disk R:, and it has the following directory structure on the disk:

    R:\home

    R:\home\user1

    R:\home\user2

    R:\home\user3

    A Group is a collection of resources and is the smallest unit of failover on a cluster. Groups failover from one

    machine to another, not resources.All groups in a Cluster can be considered as a logical machine or instance on the network. In order for a group to beusable by clients it will normally contain a disk, a name, an IP Address, and a role. Our role for this exercise is tocreate a highly available File Server.

    Tasks Detailed Steps

    Complete the following 5

    tasks on:

    Node1

    1. Create an IP Addressresource

    a. Choose the File menub. Select New and Resourcec. In the Name box, type Home Folders IP Address. This is what will display in

    Cluster Administrator as the name of the resource. This name is purely for internal

    management of the cluster and is not the name clients use to connect to the cluster.

    d. In the Description box, you can add a description if you like. Again, this is onlyfor internal cluster resource identification inside of the cluster management tools.It is not visible to clients

    e. In the Resource Type box, select IP Address. This designates that this will bean IP Address resource.

    f. In the Group box, select File Shares since this will be the group we want theresource to exist. This specifies which group this resource will be associated with.

    g. ClickNext buttonh. This next screen will show the Possible Owners that can own the group. Leave

    both nodes as Possible Owners and choose the Next button. Possible Owners is a

    way of saying if this resource can ever come online on a node. Traditionally all

    nodes have the ability to host all resources.

    i. The next screen is the Resource Dependencies box. This is where you would wantto add a dependency that might be required in order for this resource to come

    online. For an IP Address resource, we do not need any dependency, so choose the

    Next button. Dependencies determine the start order for resources and establish

    the bindings.

    j. In the IP Address box, input the IP Address we will be using of 192.168.100.14.This is the IP address that clients will connect to and the IP address that will be

    registered in WINS / DNS for the file server instance.

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    7/15

    Creating Highly Available Services with Failover Clustering

    Page 5 of 13

    Tasks Detailed Steps

    k. Press the TAB key on the keyboard and the subnet mask will be detected andautomatically filled in for you.

    l. For the Network, select the Cluster_public networkm. Make sure to select Enable NetBIOS for this address so that the network name

    can be bound to the IP Address.

    n. ClickFinish button, then Ok that the resource was created successfully.o. In the left hand pane select the group named File Sharesp. Right mouse click on the newly created IP resource and select Bring Online.

    Note: You have now created an IP address that is now bound to the node and is

    available to external clients. This IP address is pingable.

    2. Create a NetworkName Resource

    Note:Now that you have an IP address available on the network, we will now create a

    logical server name that will be used for clients to make network connections to the

    file server.

    a. Choose the File menub. Select New and Resourcec. In the Name box, type Home Folders Network Name. This is what will display

    in Cluster Administrator as a resource. Again, this name is only displayed inCluster Administrator it has no impact on clients.

    d. In the Description box, you can add a meaningful description if you like. Thiscould be useful information like which business unit uses this name for

    connectivity.

    e. In the Resource Type box, select Network Name. This designates that this willbe a Network Name resource.

    f. In the Group box, select File Shares to put it in the same group as the IP Addressresource we created previously.

    g. ClickNext buttonh. This next screen will show the Possible Owners that can own the group. Again,

    leave both nodes as Possible Owners so that failover can occur to any node and

    choose the Next button.

    i. The next screen is the Resource Dependencies box. This is where you would wantto add a dependency that might be required in order for this resource to come

    online. For a Network Name resource, it needs to be dependent on an IP Address

    resource. On the left pane click on the IP address resource and then click the Add

    button, then choose the Next button.

    Note:By setting the dependency it will ensure that the IP Address resource will come

    online before the Network Name. It also defines that this is the IP Address that will be

    registered in DNS and WINS for the computer name.

    j. In the Name box, this is the actual name of the logical server instance users willconnect to. In this box, type in HOL169FILE.

    k. Click the Finish button, then Ok that the resource was created successfully.l. Right mouse click on the newly created name resource and select Bring Online.

    Note: You have now created a Network Name resource. The machine name of

    HOL169FILE is now bound to the server and is available to clients. You should be

    able to browse this name with a Start then Run and typing \\HOL169FILE

    3. Create the file shareresource

    a. Choose the File menub. Select New and Resourcec. In the Name box, type Home Folders Share.

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    8/15

    Creating Highly Available Services with Failover Clustering

    Page 6 of 13

    Tasks Detailed Steps

    d. In the Description box, you can add a description if you like.e. In the Resource Type box, select File Share. This designates that this will be a

    File Share resource.

    f. In the Group box, select File Shares since this will be the group we want theresource to exist with the IP and Name previously created.

    g. ClickNext buttonh. This next screen will show the Possible Owners that can own the group. Leave

    both nodes as Possible Owners and choose the Next button.

    i. The next screen is the Resource Dependencies box. This is where you would wantto add a dependency that might be required in order for this resource to come

    online. For a File Share it should be dependent on a Physical Disk and a Network

    Name, so move them to the right box and choose the Next button. Remember that

    the Network Name is dependent on the IP. So you now have also indirectly set the

    File Share to be dependent on the IP address as well, because of this reason you do

    not need to explicitly set the File Share to be dependent on the IP.

    j. In the Share Name box, this is the actual name of the share the end users willconnect to with the UNC. In this box, type in HOME.

    k. In the Path box, you must specify the exact path to where the share resides. Typein R:\HOME.l. On the Advanced Button, here is where the administration gets easier. Select

    Share subdirectories, what this does is take the immediate subfolder under

    R:\HOME and shares out all child directories automatically for you. This can

    come in handy for sharing out a large number of shares with a single resource and

    also makes administration easier, for example when users leave or join the

    company. Simply create the folder under R:\HOME and it will automatically share

    it out for you. Remove the folder and the share will disappear. You can also select

    the Hide Subdirectory shares option which will tag the share with a $ sign which

    makes the share hidden. For now, leave this unselected.

    Note: When setting this up, you must rely on NTFS Permissions on the drive and

    folders. We must have full control at the share level and then have the NTFS

    permissions come in to keep unauthorized users from connecting.

    m.Click the Finish button and then Ok.n. Right Mouse click on the newly create resource and bring it online.

    4. Browse the share a. Choose the Start Menu and select Run and type in\\HOL169FILE and press. You will see the shares all listed out.

    b. Choose the Start Menu and Run and type in R:\HOME to bring up Explorer. Inthis folder, create a new folder called USER4.

    c. Go back to the\\HOL169FILE and refresh the screen and you will see the newUSER4 share dynamically created.

    5. CLUSTER.EXEcommands that can

    be used to script

    creating shares

    Note: File share resources can also be created with the command line utility

    Cluster.exe. Now that you know how to create a File Share with the Cluster

    Administrator tool, lets perform a file share creation from the command line. This

    could be handy for scripting creation of file share resources.

    Note: This time we will create a file share that has Share Subdirectories enabled.

    a. On HOL169-NODE1, open Windows Explorer then go to Disk R: and create thefollowing folders:

    R:\DEPT R:\DEPT\ACCOUNTING

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    9/15

    Creating Highly Available Services with Failover Clustering

    Page 7 of 13

    Tasks Detailed Steps

    R:\ITb. Run a command prompt and type the following commands:

    cluster . res "Dept Shares" /create /group:"File Shares"

    /type:"File Share"

    cluster . res "Dept Shares" /priv path="R:\Dept"

    cluster . res "Dept Shares" /priv Sharename=DEPT

    cluster . res "Dept Shares" /priv

    security=everyone,set,F:security

    cluster . res "Dept Shares" /priv ShareSubDirs=1

    cluster . res "Dept Shares" /AddDep:"Disk R:"

    cluster . res "Dept Shares" /AddDep:"Home Folders Network

    Name"

    cluster . res "Dept Shares" /Online

    Note: You will now see that the share has been created. If you bring up the properties

    of the Dept Share resource, you will see all of the above settings.

    c. If you run a command prompt and type\\HOL169FILE, you will now see theDept Share as well as the Accounting and IT Shares.

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    10/15

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    11/15

    Creating Highly Available Services with Failover Clustering

    Page 9 of 13

    Tasks Detailed Steps

    both nodes as Possible Owners and choose the Next button.

    h. The next screen is the Resource Dependencies box. A Network Name resourceneeds to dependent on an IP Address resource, so move the IP Address to the

    right box and choose the Next button.

    i. In the Name box, this is the actual name of the server the users will connect to.In this box, type in HOL169PRINT.

    j. Click the Finish button, then Okk. Right mouse click on the newly created resource and bring it online.

    Note: You now have a new NetBIOS name bound to this node, this is the machine

    name that external clients will use when connecting to the server. This name will be

    registered in WINS and DNS using the IP Address it is dependent on, which you

    created in the previous step.

    3. Create a PrintSpooler resource

    a. Choose the File Menu, then select New and Resourceb. In the Name Box, type Print Spooler.c. In the Resource Type box, select Print Spooler. This designates that this will be

    a Print Spooler resource.

    d. In the Group box, select Printers since this will be the group we want the resourceto exist.

    e. ClickNext buttonf. This next screen will show the Possible Owners that can own the group. Leave

    both nodes as Possible Owners and choose the Next button.

    g. The next screen is the Resource Dependencies box. This is where you would wantto add a dependency that might be required in order for this resource to come

    online. A Spooler resource needs to be dependent on a Network Name resource

    which establishes how clients will connect to this spooler and it needs a Disk

    resource which establishes where print jobs should be spooled and drivers

    stored.Select Disk S:, Print IP Address, and Print Network Name and add them to

    the Resource dependencies.

    h. In the next screen, it will show you the location ofS:\SPOOL which is where theprint jobs will be spooled when clients print.

    i. Click the Finish button, then Okj. Right mouse click on the newly created resource and bring it online.Note: You have now finished creating a highly available print server! You have the IP

    Address established that clients will use, the machine name clients will connect to, and

    have a spooler resource that will handle print jobs. The only thing left is to create

    some print queues to use.

    4. Create Printers Note: This is where some of the burden of printer installs on a Cluster Server inprevious versions has been eased. In previous versions of Windows it required drivers

    being manually replicated. Now, with Windows 2003 Cluster, it is all automatic.

    Note: Creating printers on a clustered print server is slightly different from a stand-

    alone server. Instead of using the local control panel Printers and Faxes, you need tomake a remote connection to the print cluster.

    a. From the Start menu, clickRun and type\\HOL169PRINT.b. Double mouse click on Printers and Faxes.c. Double mouse click on Add Printer to bring up the Add Printer Wizard.d. Click the Next buttone. Select Create a new port and Standard TCP/IP Port and Next to bring you into

    the Add Port Wizard. Note: Only Cluster Aware port monitors are supported on

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    12/15

    Creating Highly Available Services with Failover Clustering

    Page 10 of 13

    Tasks Detailed Steps

    failover clusters.

    f. Click the Next button.g. Type in the IP Address of192.168.100.25 and Nexth. Leave the default selection ofGeneric Network Card and clickNexti. Select Finish buttonj. Now we are prompted to install a printer. Go ahead and select the Agfa as the

    Manufacturer and AGFA-AccuSet v52.3 Printer and Next button.

    k. Leave the Printer name as the default selected and choose Next buttonl. Leave the Share name as Agfa-Acc and clickNextm.The Location and Comment boxes are for information displayed when browsing

    the printer. You can put something in if like and choose Next button.

    n. Select No for a test page as the physical printer does not actually exist for this lab,then clickNext button.

    o. Click the Finish button.p. When prompted for the Windows Server 2003 CD-ROM, Then type in

    C:\Labs\PrinterDriver, click Ok.

    q. From the Start menu, type\\HOL169PRINT and you will now see the printer.r. By going to Drive S: in Explorer, you will now see a folder called

    S:\PrinterDrivers that has the subfolders of \W32X86\ \3. This is where the printer

    drivers are actually copied during the installation.

    s. Looking locally on Drive C:, you will now see the folderC:\WINDOWS\SYSTEM32\SPOOL\DRIVERS\\DRIVERS\\W32X86\3

    which is the location that we copy the printer drivers to so that the clients can gain

    access to the files. If you go to the node that does not currently hold the Print

    Spooler resource, you will see that the local directory does not contain the print

    driver files.

    Note:In Cluster Administrator, right mouse click on the Printers Group and select

    Move Group to move the group to the other node. Now check this same local

    directory and you will see the drivers are now there. This is because there is a flagthat is marked for any printers newly added or updated. When the node brings the

    Spooler resource online, it checks for this flag and copies down the appropriate files

    to the local machine if it does not have them. So clustering takes care of replicating

    all the printer drivers to all the nodes in the cluster for you.

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    13/15

    Creating Highly Available Services with Failover Clustering

    Page 11 of 13

    Exercise 4Creating Failback Policies

    ScenarioIn this exercise, we will demonstrate more advanced topics on how to set up Failback policies so that each node inthe Cluster has a group assigned to it, referred to as an Active/Active configuration. This is beneficial in the caseof a File and Print Cluster (or Cluster with two print spoolers). The reason for this is so that you can manuallydistribute the load out across multiple nodes in the cluster to take better advantage of available resources.

    Failover Clustering has the ability to define a specific node in the cluster as the preferred node that is to own aparticular group. If for any reason this node fails or goes offline, you can set the Cluster service to automaticallymove these groups back to the node that you want to. This is useful in statically load-balancing the nodes in yourcluster. This is referred to as Failover and Failback policies.

    The first thing to differentiate is between what a possible owner and a preferred owner is. Possible Ownerdefines whether a resource is ever able to failover to a specific node. Use extreme caution in defining PossibleOwners because defining a possible owner for a single resource will affect the failover for the entire group. This isdefined under the properties of the individual resources.

    If you bring up the properties of a group, you will see a Preferred Owners box. As a default, this is left blank.

    When you configure a group to automatically failback to the preferred node, you specify whether you want thegroup to failback as soon as the preferred node is available or to failback only during specific hours that you define.This option is useful if you want the failback to occur after peak business hours, or if you want to make sure thepreferred node is able to support the group when it does come back online.

    The Preferred Owner of a group must be specified for failback to occur. The preferred owner is the node that oneconfigures to (under normal operating circumstances) to host the group. Furthermore, on a resource level, theresource must be configured to have both nodes as "Possible Owners" for the resource to failover.

    Tasks Detailed Steps

    Complete the following

    task on:

    Node1

    1. Define PreferredOwners

    a. In Cluster Administrator, right mouse click on the File Shares group and chooseProperties.

    Note: This is on the Group itself on the left hand pane.

    b. On the General tab, select the Modify button.c. Add HOL169-NODE1 only as the Preferred Ownerd. On the Failback tab, select Allow Failback and Immediately. Then clickOK

    Note:Now that you have established that Node 1 should be the primary owner of the

    file shares, lets set Node 2 to be the primary owner of the printers.

    e. In Cluster Administrator, now right mouse click on the Printers Group and againchoose Properties.

    f. On the General tab, select the Modify button.g. Add HOL169-NODE2 only as the Preferred Owner.h. On the Failback tab, set Allow Failback and Immediately. Then clickOK.

    Complete the following

    task on:

    Node1 and

    Node2

    2. Test Preferred Owner

    Note:Node 1 is now the preferred owned of file shares and Node 2 is the preferred

    owner of printers. Lets try failing over some disks to view the behavior.

    a. Switch to HOL169-NODE1 and open Cluster Administrator. Select ActiveGroups under HOL169-NODE1 node, notice that there is no printer in the right

    pane. Select Active Group under HOL169-NODE2, notice that there is printers

    entry in the right pane.

    b. In the left column, right mouse click on HOL169-NODE2 and choose Stop

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    14/15

    Creating Highly Available Services with Failover Clustering

    Page 12 of 13

    Tasks Detailed Steps

    settings Cluster Service.

    c. All groups would now be owned by HOL169-NODE1.d. Select Active Group under HOL169-NODE1 node, notice that the printer entry is

    now listed on the right pane.

    e. Once the Cluster Service has stopped on HOL169-NODE2 (designated by the redx), right mouse click it again and select Start Cluster Service.

    f. Notice that when HOL169-NODE2 starts up, the Printers Group is immediatelymoved over and now resides on that node.

    g. Switch to HOL169-NODE2 and open Cluster Administrator.h. Select Active Groups under HOL169-NODE1 node, notice that there are two

    entries in the right pane, Cluster Group and File Shares

    i. In the left column, right mouse click on HOL169-NODE1 and choose StopCluster Service.

    j. All groups would now be owned by HOL169-NODE2.k. You can select the Active Groups under HOL169-NODE2 Node, notice that the

    Cluster Group and File Shares entries have moved to the HOL169-NODE2 Active

    Groups.

    l. Once the Cluster Service has stopped on HOL169-NODE1 (designated by the redx), right mouse click it again and select Start Cluster Service.

    m.Notice that when HOL169-NODE1 starts up, the File Shares Group areimmediately moved over and now reside on that node.

    Note: This setting only takes effect when the Cluster Service starts on the particular

    node. If you were to manually move the File shares Group to HOL169-NODE2, it will

    stay there and will not automatically moved back to HOL169-NODE1. This is

    because Failback policies ONLYcome into play when the Cluster Service on the

    particular node starts.

  • 8/6/2019 Creating Highly Available Services With Fail Over Clustering

    15/15

    Creating Highly Available Services with Failover Clustering

    Page 13 of 13

    Exercise 5Clustering Disks

    ScenarioThis is a bonus extra lab suggestion for people interested in going beyond the base lab. This lab will not containstep-by step instructions, but is merely a suggestion for people interested in exploring clustering further. If youwould like to play with clustering some more on your own free time you may find this lab suggestion interesting.

    Tasks Detailed Steps

    Complete the following

    task on:

    Node1

    1. Clustering Disks

    a. On Node1, open up DiskMgmt.msc. You will notice there is a LUN that has freespace listed and has not been clustered. Go ahead and partition and format the

    disk. Remember that all clustered disks must be Basic disks and MBR. Then go

    ahead and assign the disk a drive letter.

    b. Open up Windows Explorer and view the new disk, go ahead and create a test fileon it. Once you have the disk partitioned and ready for cluster use open up ClusterAdministrator. Create a new resource of type Physical Disk using the same

    steps as in the previous labs in either one of the existing groups or you could create

    a new group. Bring the disk online and fail it over to Node 2. You will see that

    the same drive letter will be replicated to Node 2. Also note how only 1 node ever

    has access to a disk at any given time.