You are on page 1of 80

y

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

High Availability Clustering with the


SLE-HA Extension 11
Workbook

Course 9211
Version 1.1.3

Lab Manual
January 11,2011

Proprietary Statement

Disclaimer

Copyright 2011 Novell, Inc. All rights reserved.

Novell, Inc., makes no representations or warranties with respect to the contents


or use of this documentation, and specifically disclaims any express or implied
warranties of merchantability or fitness for any particular purpose.

No part of this publication may be reproduced, photocopied, stored on a retrieval


system, or transmitted without the express written consent of the publisher.

Any products or technical information provided under this Agreement may be


subject to U.S. export controls and the trade laws of other countries. You agree to
comply with all export control regulations and to obtain any required licenses or
classification to export, re-export or import deliverables. You agree not to export
or re-export to entities on the current U.S. export exclusion lists or to any
embargoed or terrorist countries as specified in the U.S. export laws. You agree
to not use deliverables for prohibited nuclear, missile, or chemical biological
weaponry end uses. See the Novell International Trade Services Web
page (http://www.novell.com/info/exports/) for more information on
exporting Novell software. Novell assumes no responsibility for your failure to
obtain any necessary export approvals.

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Novell, Inc.
404 Wyman Street, Suite 500
Waltham, MA 02451
U.S.A.
www.novell.com

Further, Novell, Inc., reserves the right to revise this publication and to make
changes to its content, at any time, without obligation to notify any person or
entity of such revisions or changes. Further, Novell, Inc., makes no
representations or warranties with respect to any software, and specifically
disclaims any express or implied warranties of merchantability or fitness for any
particular purpose. Further, Novell, Inc., reserves the right to make changes to
any and all parts of Novell software, at any time, without any obligation to notify
any person or entity of such changes.

Novell, Inc., has intellectual property rights relating to technology embodied in


the product that is described in this document. In particular, and without
limitation, these intellectual property rights may include one or more of the U.S.
patents listed on the Novell Legal Patents Web page
(http://www.novell.com/company/legal/patents/) and one or more
additional patents or pending patent applications in the U.S. and in other
countries.

Novell Trademarks

For Novell trademarks, see the Novell Trademark and Service Mark list
(http://www.novell.com/company/legal/trademarks/tmlist.html).

Third-Party Materials

All third-party trademarks are the property of their respective owners.

Software Piracy

Throughout the world, unauthorized duplication of software is subject to both


criminal and civil penalties.

If you know of illegal copying of software, contact your local Software


Antipiracy Hotline. For the Hotline number for your area, access Novells
World Wide Web page (http://www.novell.com) and look for the piracy
page under Programs.
Or, contact Novells anti-piracy headquarters in the U.S. at 800-PIRATES (7472837) or 801-861-7101.

This Novell Training Manual is published solely to instruct students in the use of
Novell networking software. Although third-party application software packages
are used in Novell training courses, this is for demonstration purposes only and
shall not constitute an endorsement of any of these software applications.
Further, Novell, Inc. does not represent itself as having any particular expertise
in these application software packages and any use by students of the same shall
be done at the students own risk.

Contents
Section 1

Introduction to HA Clustering in SLE11................................13


(No Lab Exercises).......................................................................................................................14

Install and Configure HA Clustering in SLE11......................15

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Section 2
Exercise 2.1

Exercise 2.2

Install the SLE HA Extension.....................................................................................16


Task I: Add the HA Extension as an Installation Source.............................................................16
Configure an HA Cluster with the SLE HAE.............................................................17
Task I: Configure the Cluster Manager........................................................................................17
Task II: Copy the Cluster Configuration to Other Cluster Nodes...............................................18

Section 3

Introduction to the Cluster Information Base.......................21

Exercise 3.1

Set Cluster Defaults and Disable STONITH in the Cluster ....................................22


Task I: Set Some Cluster Defaults...............................................................................................22
Task II: Disable STONITH..........................................................................................................23

Section 4

Introduction to Cluster Resources.........................................25

Exercise 4.1

Configure an IP Address Cluster Resource.............................................................26


Task I: Configure an IP Address Cluster Resource......................................................................26
Task II: Activate the IP Address Cluster Resource......................................................................27
Configure a vsftp Resource from the CLI................................................................28
Task I: Configure a vsftp Resource..............................................................................................28
Task II: Activate the vsftp Resource............................................................................................28
Configure a Resource Group for an IP and vsftp from the CLI..............................30
Task I: Configure a Resource Group...........................................................................................30
Task II: Activate the New Resource Group.................................................................................30

Exercise 4.2

Exercise 4.3

Section 5

Manage Clustered Storage with a SAN..................................33

Exercise 5.1

Create an LVM Volume Group from Multiple Disks.................................................34


Task I: Configure an LVM Volume Group................................................................................34
Create a 4GB Logical Volume....................................................................................36
Task I: Configure LVM Logical Volumes....................................................................................36
Configure an iSCSI Target Server from the CLI.......................................................37
Task I: Configure iSCSI Target Server.......................................................................................37
Create an iSCSI Target for the data1 LUN from the CLI..........................................38
Task I: Create an iSCSI Target for the data1 LUN.....................................................................38
Configure an iSCSI Initiator from the CLI.................................................................39
Task I: Configure the iSCSI Initiator Daemon...........................................................................39
Task II: Discover and Log Into iSCSI Targets............................................................................40
Configure a Cluster Managed Storage Volume.......................................................41
Task I: Configure a Cluster Managed Storage Volume...............................................................41

Exercise 5.2

Exercise 5.3
Exercise 5.4
Exercise 5.5

Exercise 5.6

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

HA Clustering with the SLE-HAE11


Task II: Activate the Cluster Manage Storage Volume................................................................43

Split-brain Avoidance and Management................................44

Exercise 6.1

Create a 4MB Logical Volume for an SBD Device...................................................45


Task I: Configure an LVM Logical Volume................................................................................45
Create an iSCSI Target for the SBD Device from the CLI.......................................46
Task I: Create an iSCSI Target for the SBD Device...................................................................46
Discover Targets with an iSCSI Initiator from the CLI............................................47
Task I: Discover and Log Into iSCSI Targets.............................................................................47
Configure an SBD STONITH Cluster Resource.......................................................49
Task I: Configure the SBD daemon.............................................................................................49
Task II: Configure a SBD Cluster Resource................................................................................51
Task III: Activate the SBD Cluster Resource..............................................................................52
Task IV: Test the SBD Cluster Resource.....................................................................................52

Exercise 6.2

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Exercise 6.3

Section 6

Exercise 6.4

Section 7

Configure Cluster Safe Logical Storage................................53

Exercise 7.1

Create 4 1GB Logical Volumes on Shared Storage.................................................54


Task I: Configure an LVM Logical Volume................................................................................54
Create an iSCSI Target with 4 LUNs from the CLI...................................................55
Task I: Create an iSCSI Target with 4 LUNs..............................................................................55
Discover Targets with an iSCSI Initiator from the CLI............................................56
Task I: Discover and Log Into iSCSI Targets.............................................................................56
Configure a Clone Resource Group for DLM and CLVMD from the CLI...............58
Task I: Edit the lvm.conf File......................................................................................................58
Task II: Configure a Cloned Resource Group.............................................................................58
Task III: Activate the Base Storage Cloned Resource Group......................................................59
Create a Clustered LVM Volume Group from Multiple Disks..................................60
Task I: Configure an LVM Volume Group................................................................................60
Create a Logical Volume on the Cluster Nodes.......................................................62
Task I: Configure a Basic LVM Logical Volume........................................................................62
Task II: Format the Basic LVM Logical Volume with a File System.........................................62
Configure a Cloned Resource for a Clustered Volume Group from the CLI.........64
Task I: Configure a Clustered LVM Volume Group Cloned Resource.......................................64
Task II: Activate the Clustered Volume Group Resource............................................................65
Configure a Resource for a Filesystem on an LVM Volume from the CLI.............66
Task I: Configure an LVM Volume Filesystem Resource...........................................................66
Task II: Activate the Filesystem Resource...................................................................................67

Exercise 7.2

Exercise 7.3
Exercise 7.4

Exercise 7.5

Exercise 7.6

Exercise 7.7

Exercise 7.8

Section 8

Configure Active/Active Clustered Storage..........................68

Exercise 8.1

Create a Logical Volume for OCFS2.........................................................................69


Task I: Configure an LVM Logical Volume................................................................................69
Create an iSCSI Target with 1 LUN for OCFS2 from the CLI..................................70
Task I: Create an iSCSI Target for OCFS2.................................................................................70
Discover Targets with an iSCSI Initiator from the CLI............................................71
Task I: Discover and Log Into iSCSI Targets.............................................................................71

Exercise 8.2
Exercise 8.3

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Exercise 8.4
Exercise 8.5

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Exercise 8.6

Create an OCFS2 File System on a SAN Volume....................................................73


Task I: Create an OCFS2 File System on a SAN Volume..........................................................73
Configure a Clone Resource Group for DLM, CLVMD and O2CB from the CLI. . .74
Task I: Edit the lvm.conf File......................................................................................................74
Task II: Configure a Cloned Resource Group.............................................................................74
Task III: Activate the Base Storage Cloned Resource Group......................................................75
Configure a OCFS2 Volume Clone Resource from the CLI....................................76
Task I: Configure an OCFS2 Volume Resource..........................................................................76
Task II: Activate the OCFS2 Volume Resource...........................................................................76
Configure an Order Constraint for the Base Storage Clone & OCFS2..................78
Task I: Configure an Order Constraint........................................................................................78

Exercise 8.7

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

HA Clustering with the SLE-HAE11

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

List of Figures

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

y
ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl
N
Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

HA Clustering with the SLE-HAE11

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

y
ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl
N
Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

HA Clustering with the SLE-HAE11

10

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

y
ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl
N
Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

11

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

HA Clustering with the SLE-HAE11

12

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Introduction to HA Clustering in SLE11

Section 1 Introduction to HA Clustering in SLE11

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

This section introduces you to high availability clustering with the High Availability
Extension for SUSE Linux Enterprise 11.

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

13

HA Clustering with the SLE-HAE11

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

(No Lab Exercises)

14

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Introduction to HA Clustering in SLE11

Section 2 Install and Configure HA Clustering in SLE11

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

This section covers the installation and configuration of the high availability clustering
components in the SUSE Linux Enterprise 11 High Availability Extension.

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

15

HA Clustering with the SLE-HAE11

2.1 Install the SLE HA Extension

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise, you add the SUSE Linux Enterprise High Availability Extension as a
software installation source and then install the HA Extension components.

Task I: Add the HA Extension as an Installation Source

Special Instructions and Notes:

(Optional) Location of Product ISO:________________________________

Task I: Add the HA Extension as an Installation Source


1. Launch the YaST Add-on Products module:
YaST > Software > Add-on Products

If prompted for the root user's password, enter novell

2. On the Installed Add-on Products (YaST) screen, click Add


3. On the Media type screen, select DVD and click Next

4. Insert the SLE11 HA Extension product CD/DVD (if you are running a virtual
machine, attach the SLE HA Extension ISO to the VM) and click Continue

5. On the License Agreement screen, select Yes, I agree to the License Agreement
and click Next

6. On the Software Selection and System Tasks screen, select the High Availability
pattern and click OK

If prompted to change installation media, follow the instructions as directed. You

may need to change the installation media more than once.

7. On the Novell Customer Center Configuration screen, select Configure Later and
then click Next

8. You should now see the SUSE Linux Enterprise High Availability Extension in the
list of installed products. Click OK to finish

(End of Exercise)

16

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Install and Configure HA Clustering in SLE11

2.2 Configure an HA Cluster with the SLE HAE

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this section, you use the YaST Cluster module to configure an HA cluster with the SLE11
HE Extension. You then copy the cluster configuration files to the other cluster nodes and
start the cluster daemon on them as well.

Task I: Configure the Cluster Manager


Task II: Copy the Cluster Configuration to Other Cluster Nodes

Special Instructions and Notes:

The SLE HA Extension must be installed before performing this exercise

Task I: Configure the Cluster Manager

1. On the first cluster node, launch the YaST Cluster module:


YaST > Miscellaneous > Cluster

If prompted for the root user's password, enter novell

2. On the Cluster Communication Channels screen, in the Channel section, from the
Bind Network Address drop-down list, select the network IP of the LAN network

3. In the Multicast Address field, enter 239.0.0.1

4. In the Multicast Port field, enter 5405

NOTE: In the GM release of the SLE-HAE11, the redundant channel is not


enabled even if defined. Defining the redundant channel could cause problems if
you will be using the DLM.

5. In the Node ID section, ensure that the Auto Generate Node ID check box is not
checked

6. In the Node ID field, enter 1

7. From the rrp mode drop-down list, select none

8. Click Next (or if listed in the left-hand pane, select Security)

9. On the Cluster Security screen, put a check in the Enable Security Auth checkbox
10. In the Threads field, enter 1
11. Click Generate Auth Key File
When the pop-up window appears, click OK
12. Click Next, (or if listed in the left-hand panel, select Service)
13. Select On -- Start openais at booting

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

17

HA Clustering with the SLE-HAE11


Also put a check in the Start mgmtd... checkbox
14. Click Start OpenAIS Now
The current Status should change to Running
15. Click Next (or if listed in the left-hand pane, select Configure Csync2)
16. Below the Sync Host list, click Add

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

command) and then click OK.

17. Enter the hostname of the first cluster node (as returned by the hostname
Repeat this for each cluster node's hostname

18. Under the SyncFile list, click Add Suggested Files


A list of files should appear in the list

19. In the newly populated list of files in the Sync File list, select

/etc/corosync/corosync.conf and click Del to remove it from the list

NOTE: Because we are using manually assigned node IDs, we cannot use csync2
to synchronize the corosync.conf file

20. Under the Sync Files list, click Add

21. In the pop-up window, enter /etc/sysconfig/sbd and click OK

22. Click Generate Pre-Shared-Keys

23. Click Turn csync2 ON to enable the csync2 service


24. Click Finish

25. Open a terminal window and if not already logged in as the root user, enter su
to become root. If prompted for the root user's password, enter novell

26. Enter the following command to enable and start the xinetd daemon:
insserv xinetd
rcxinetd start

27. Enter the following command to change the hacluster user's password:
passwd hacluster

Enter novell for the password

28. Enter the following command:

crm_mon -ri 1

You should see that the cluster is up and running with a single node
Leave this terminal window open with the crm_mon utility running

Task II: Copy the Cluster Configuration to Other Cluster


Nodes
1. Open another terminal window and if not already logged in as the root user, enter
su to become root. When prompted for the root user's password, enter novell

18

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Install and Configure HA Clustering in SLE11


2. Enter the following commands to copy the other cluster node(s):
scp /etc/corosync/corosync.conf
root@node2:/etc/corosync/
scp /etc/corosync/authkey root@node2:/etc/corosync/
scp /etc/csync2/csync2.cfg root@node2:/etc/csync2/

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

3. Use ssh to connect to the other cluster node:

scp /etc/csync2/key_hagroup root@node2:/etc/csync2/

ssh root@node2

4. In the text editor of your choice, open the /etc/corosync/corosync.conf file to be


edited.

5. Find the line that begins with nodeid: and increment it to match the node's number
(i.e. use 2 for node2, 3 for node3, etc.)

6. Save the file and close the text editor

7. Enable the corosync/openais daemon to start automatically and start the


corosync/openais daemon:
insserv openais
rcopenais start

In the terminal window running crm_mon you should see a new cluster node listed
as being Online

8. Enable the csync2 daemon:

chkconfig csync2 on
insserv xinetd
rcxinetd start

9. Set the hacluster user's password on this node to novell in the same manner as in
the previous task

10. Repeat the previous steps in this task for each of the other cluster nodes

11. Close the crm_mon utility by pressing ctrl-c

Version 1

(End of Exercise)

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

19

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

HA Clustering with the SLE-HAE11

20

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Install and Configure HA Clustering in SLE11

Section 3 Introduction to the Cluster Information Base

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

This section introduces you the Cluster Information Base (CIB) and the tools used to
manage the cluster.

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

21

HA Clustering with the SLE-HAE11

3.1 Set Cluster Defaults and Disable STONITH in the


Cluster
In this exercise, you set some default values in the cluster and disable STONITH.

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

It is important to note that you should only disable STONITH if you are going to use cluster
resource that don't require STONITH. Even in those cases it is still recommended that you
enable and use STONITH anyway.

Objectives:

Task I: Set Some Cluster Defaults


Task II: Disable STONITH

Special Instructions and Notes:

The cluster must be running and have quorum to perform this exercise

Task I: Set Some Cluster Defaults


1. On Node1, launch the Pacemaker GUI:
YaST > Other > Pacemaker GUI

2. Select Connection > Login from the menu bar (or click the Login to Cluster
button on the button bar)

3. In the Login pop-up window, enter the following information in the relative fields
and click OK to login:

Server:(Port): 127.0.0.1

User Name: hacluster


Password: novell

4. In the left-hand pane, select CRM-Config

5. On the Policy Engine tab, in the Default Resource Stickiness field, enter 1000

6. Click Apply

NOTE: You could also set the defualt-resource-stickiness value using the crm
command as follows:
crm configure
property default-resource-stickiness=1000
commit
quit
Some cluster defaults have now been explicitly set

22

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Introduction to the Cluster Information Base

Task II: Disable STONITH


1. In the left-hand pane, select CRM-Config
2. On the Policy Engine tab, deselect (uncheck) the Stontih Enabled value
3. Click Apply

crm configure

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

property stonith-enabled=false

NOTE: You could also disable STONITH using the crm command as follows:

commit

quit

STONITH should now be disabled in the cluster

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

23

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

HA Clustering with the SLE-HAE11

24

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Introduction to the Cluster Information Base

Section 4 Introduction to Cluster Resources

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

This section introduces you the concept of cluster resources and resource agents.

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

25

HA Clustering with the SLE-HAE11

4.1 Configure an IP Address Cluster Resource


In this exercise, you configure an IP address to be a cluster managed resource.

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Task I: Configure an IP Address Cluster Resource


Task II: Activate the IP Address Cluster Resource

Objectives:

Special Instructions and Notes:

The cluster must be running and have quorum to perform this exercise
CLUSTER_IP1=____________________________
CLUSTER_IP1_SNM=_______________________
CLUSTER_IP1_NIC=________________________

Task I: Configure an IP Address Cluster Resource


1. Launch the Pacemaker GUI:

YaST > Other > Pacemaker GUI

2. Select Connection > Login from the menu bar (or click the Login to Cluster
button on the button bar)

3. In the Login pop-up window, enter the following information in the relative fields
and click OK to login:

Server:(Port): 127.0.0.1

User Name: hacluster


Password: novell

4. In the left-hand pane, select Resources and click Add

5. On the Add pop-up window, select Primitive and click OK

6. On the Add Primitive Basic Settings screen enter or select from drop-down list(s)
and/or check-boxes the following information:

ID: IP_1

Class: ocf

Provider: heartbeat
Type: IPaddr2
Initial state of resource: Stopped
Add monitor operation: (checked)
7. Click Forward
8. On the Add Primitive Summary of ... screen, select the Instance Attributes tab

26

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Introduction to Cluster Resources


9. Select IP from the attributes list and click Edit
10. In the Edit nvpair window, in the value field, enter CLUSTER_IP1 and then click
OK
11. Back on Add Primitive Summary of ... screen click Add
12. From the Name drop-down list, select cidr_netmask

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

14. Click OK

13. In the Value field, enter CLUSTER_IP1_SNM


15. Click Add again

16. From the Name drop-down list, select nic

17. In the Value field, enter CLUSTER_IP1_NIC


18. Click OK

19. On the Add Primitive Summary of ... screen click Apply

NOTE: You could also create the IP address cluster resource with the crm
command as follows:
crm configure

primitive IP_1 ocf:heartbeat:IPaddr2 meta targetrole=stopped params ip=CLUSTER_IP1


cidr_netmask=CLUSTER_IP_SNM nic=CLUSTER_IP1_NIC

commit

You should now see a new resource listed in the list of cluster resources

Task II: Activate the IP Address Cluster Resource


1. In the left-hand pane, select Management

You should see the IP Address resource listed under Resources

2. Select the IP Address resource and click the Start Resource button on the button
bar (the button looks like a right pointing triangle)

You should see the IP address resource is now running

3. To show the resources relative to the cluster nodes, click the Group Resources by
Node button on the top left of the button bar (the button looks like 4 Green dots in

a vertical line next to a downward pointing arrow)

Version 1

(End of Exercise)

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

27

HA Clustering with the SLE-HAE11

4.2 Configure a vsftp Resource from the CLI

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise, you configure a vsftp server to be a cluster managed resource using the
crm command line.

Task I: Configure a vsftp Resource


Task II: Activate the vsftp Resource

Special Instructions and Notes:


(none)

Task I: Configure a vsftp Resource

1. If not already logged in as the root user, enter su to become root. When
prompted for the root user's password, enter novell

2. Enter the following command to open the crm CLI in configure mode:
crm configure

You should now be at a crm(live)configure# prompt

3. Enter the following commands to create a primitive resource for vsftp:


primitive vsftp lsb:vsftpd meta target-role=stopped
commit
quit

4. View the resource state from the command line by entering the following
command:

crm_mon -ri 1

You should see the new resource listed along with its state

Task II: Activate the vsftp Resource

1. Open another terminal window. If not already logged in as the root user, use su
to become root using the same password as above.
2. Enter the following command to start the new resource:
crm resource start vsftp
In the crm_mon terminal window you should see the new vsftp resource listed as
started
3. In the crm_mon terminal window, press Ctrl+C to to close the crm_mon utility

28

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Introduction to Cluster Resources

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

29

HA Clustering with the SLE-HAE11

4.3 Configure a Resource Group for an IP and vsftp from


the CLI

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise, you configure and IP address and vsftpd be a cluster managed resources in
a resource group using the crm command line.

Task I: Configure a Resource Group


Task II: Activate the New Resource Group

Special Instructions and Notes:


(none)

Task I: Configure a Resource Group

1. If not already logged in as the root user, enter su to become root. When
prompted for the root user's password, enter novell

2. Enter the following command to open the crm CLI in configure mode:
crm configure

You should now be at a crm(live)configure# prompt

3. Enter the following commands to create a resource group for IP_1, vsftp:
group ftpgrp IP_1 vsftp

commit

quit

4. View the resource group state from the command line by entering the following
command:

crm_mon -ri 1

You should see the new resource group listed along with its state

Task II: Activate the New Resource Group

1. Open another terminal window. If not already logged in as the root user, use su
to become root using the same password as above.
2. Enter the following command to stat the resource group:
crm resource start ftpgrp
In the crm_mon terminal window you should see the new resource group listed as
started

30

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Introduction to Cluster Resources


NOTE: If the IP_1 and/or the vsftp cluster resources already have the targetrole= parameter set, you must delete those parameters form the attributes of the
individual cluster resources before you can set it at the group level (by running
crm resource start on the group).

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

You may easily do this by using the crm configure edit command to open
the cluster configuration (in vi) and deleting the meta target-role= lines from the
IP_1 and vsftp primitive resources. Make sure you save the edited configuration
by issuing a commit command once you are back at the crm(live)configure#
prompt.
3. In the crm_mon terminal window, press Ctrl+C to to close the crm_mon utility

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

31

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

HA Clustering with the SLE-HAE11

32

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Introduction to Cluster Resources

Section 5 Manage Clustered Storage with a SAN

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

This section covers using a SAN for clustered storage.

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

33

HA Clustering with the SLE-HAE11

5.1 Create an LVM Volume Group from Multiple Disks


Description:

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

In this exercise you will use the LVM command line commands to create an LVM volume
group from multiple disks.

Objectives:

Task I: Configure an LVM Volume Group

Special Instructions and Notes:

Perform this exercise on the Storage1 machine (unless otherwise directed by the instructor).

Task I: Configure an LVM Volume Group

1. If not already logged in as the root user, enter su to become root. When
prompted for the root user's password, enter novell

2. Determine what type of disk (PATA=hda vs. SATA=sda) your machine is using by
entering the following command at the command line of the Storage1 machine:
fdisk -l

List the device file named of each disk in the machine:

disks:_______________________________________

3. Determine which disk is used by the OS by entering the following command:


mount

List the device file that is used by the OS:________________


This disk will NOT be used in the volume group

4. Enable the lvm boot script:


insserv boot.lvm

5. For each of the disks that will be used in the volume group, use the following
command to create LVM Physical Volume(s) replacing BLOCKDEV with the
block device filename of the disk:
pvcreate /dev/BLOCKDEV
Repeat this command for each of the disks that will be used in the volume group
6. Use the following command to create an LVM Volume Group named vg0 (list
block devices as a space delimited list):
vgcreate vg0 /dev/BLOCKDEV_1 /dev/BLOCKDEV_2

34

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Manage Clustered Storage with a SAN


7. Verify that the volume group was created successfully by entering the following
commands (notice the similarities and differences in their outputs):
vgs
vgdisplay
8. To see how the physical volumes created are being used, enter the following

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

pvs

commands (notice the similarities and differences in their outputs):

pvdisplay

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

35

HA Clustering with the SLE-HAE11

5.2 Create a 4GB Logical Volume


Description:

In this exercise, you will create a 4GB logical volume in the vg1 volume group.

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

Task I: Configure LVM Logical Volumes

Special Instructions and Notes:

Perform this exercise on the Storage1 server (unless otherwise directed by the instructor)
An LVM volume group named vg0 with at least 4GB of free space must exist to
successfully complete this exercise.

Task I: Configure LVM Logical Volumes

1. Use the following commands to create 1 Logical Volumes in the vg0 Volume
Group:

lvcreate

-L

4G

-n

data1

vg0

2. Verify that the logical volume was created by entering the following command:
lvs

(End of Exercise)

36

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Manage Clustered Storage with a SAN

5.3 Configure an iSCSI Target Server from the CLI


Description:

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise you will use the CLI tools to configure an iSCSI target server.

Task I: Configure iSCSI Target Server

Special Instructions and Notes:

Perform this exercise on the storage1 machine (unless directed otherwise by the instructor).

Task I: Configure iSCSI Target Server

1. On the iSCSI target server open a terminal window and if not already logged in as
the root user, enter su to become root. When prompted for the root user's

password, enter novell

2. Enter the following commands to enable the iscsi target server to start at boot time
and then start now:

insserv iscsitarget
rciscsitarget start

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

37

HA Clustering with the SLE-HAE11

5.4 Create an iSCSI Target for the data1 LUN from the CLI
Description:

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

In this exercise you will use the command line iSCSI tools to create a target containing 1
LUN on the iSCSI target server .

Objectives:

Task I: Create an iSCSI Target for the data1 LUN

Special Instructions and Notes:

Perform this exercise on the iSCSI target server machine (most likely storage1) as directed.
You must have an LVM volume group named vg0 that contains at least 1 4GB logical
volume name data1 to perform this exercise.

Task I: Create an iSCSI Target for the data1 LUN

1. In the text editor of your choice, open the /etc/ietd.conf file to be edited (as the
root user).

2. If it exists, and is not already commented out, comment out the example target line
as follows:

#Target iqn.2001-04.com.example:storage.disk2.sys1.xyz

3. At the end of the file, add the following lines:


Target iqn.2010-05.com.example:data1

Lun 0 Path=/dev/vg0/data1,Type=fileio,ScsiId=data1-0

4. Save the file and close the text editor

5. Restart the iSCSI target daemon by entering the following command:

rciscsitarget restart

38

(End of Exercise)

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Manage Clustered Storage with a SAN

5.5 Configure an iSCSI Initiator from the CLI


Description:

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

In this exercise you will use the CLI tools to configure and then discover targets with an
iSCSI initiator.

Objectives:

Task I: Configure the iSCSI Initiator Daemon


Task II: Discover and Log Into iSCSI Targets

Special Instructions and Notes:

You must have at least one target already configured on the target server to complete this
exercise.
You will need the IP address of the iSCSI Target Server.
TARGET_LAN_IP= _______________________________
TARGET_SAN1_IP=_______________________________
TARGET_SAN2_IP=_______________________________
TARGET_DRBD_IP=_______________________________
TARGET_NAME=______________________________

Task I: Configure the iSCSI Initiator Daemon

1. On Node1, open a terminal window and if not already logged in as the root user,
enter su to become root. When prompted for the root user's password, enter
novell

2. In the text editor of your choice, open the /etc/iscsi/initiatorname.iscsi file to be


edited. Edit the following line to match:

InitiatorName=iqn.1996-04.de.suse:NODENAME

3. Save and then close the file

4. In the text editor of your choice, open the /etc/iscsi/iscsid.conf file to be edited.
Edit the following line to match:
node.startup = automatic

5. Save the file and close the text editor


6. Enter the following commands to enable the open-iscsi daemon to start at boot time
and then start now:
insserv open-iscsi
rcopen-iscsi start

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

39

HA Clustering with the SLE-HAE11


7. Repeat this task on the other cluster nodes

Task II: Discover and Log Into iSCSI Targets


1. On Node1, open a terminal window and if not already logged in as the root user,
enter su to become root. When prompted for the root user's password, enter

novell

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

2. Enter the following command to discover th targets on an iSCSI target server:


iscsiadm -m discovery -t st -p TARGET_SAN1_IP

3. Enter the following command to delete the unneeded portals to the target on the
target server from the iSCSI initiator's discovered target database:
iscsiadm -m node -o delete -p TARGET_LAN_IP

iscsiadm -m node -o delete -p TARGET_SAN2_IP

iscsiadm -m node -o delete -p TARGET_DRBD_IP

4. Enter the following command to list the discovered targets:


iscsiadm -m node

You should see the target(s) available on the target server

5. Enter the following command to log into the discovered targets:


iscsiadm -m node -L all

6. Enter the following command to see the disks the machine is now connected to:
ls -l /dev/disk/by-path | grep iscsi

You should see a list of the iscsi disks the machine is connected to

7. Repeat this task on the other cluster nodes

(End of Exercise)

40

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Manage Clustered Storage with a SAN

5.6 Configure a Cluster Managed Storage Volume


In this exercise, you configure a basic cluster managed storage volume.

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Task I: Configure a Cluster Managed Storage Volume


Task II: Activate the Cluster Manage Storage Volume

Objectives:

Special Instructions and Notes:

The cluster must be running and have quorum to perform this exercise
DEVICE=_______________________________________
DIRECTORY=___________________________________
FSTYPE=_______________________________________

Task I: Configure a Cluster Managed Storage Volume


1. Launch the Pacemaker GUI:

YaST > Other > Pacemaker GUI

If prompted for the root user's password, enter novell

2. Select Connection > Login from the menu bar (or click the Login to Cluster
button on the button bar)

3. In the Login pop-up window, enter the following information in the relative fields
and click OK to login:

Server:(Port): 127.0.0.1

User Name: hacluster


Password: novell

4. In the left-hand pane, select Resources and click Add

5. On the Add pop-up window, select Primitive and click OK

6. On the Add Primitive Basic Settings screen enter or select from drop-down list(s)

and/or check-boxes the following information:


ID: data1vol
Class: ocf
Provider: heartbeat
Type: Filesystem
Initial state of resource: Stopped
Add monitor operation: (checked)

7. Click Forward

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

41

HA Clustering with the SLE-HAE11


8. On the Add Primitive Summary of ... screen, select the Instance Attributes tab
9. Select the device attribute from the attributes list and click Edit
10. In the Edit nvpair window, in the value field, enter DEVICE and then click OK
11. Select the directory attribute from the attributes list and click Edit
12. In the nvpair window, in the value field, enter DIRCTORY and then click OK

13. Select the fstype attribute from the attributes list and click Edit

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

14. In the nvpair window, in the value field, enter FSTYPE and click OK
15. Click OK

16. On the Add Primitive Summary of ... screen click Apply

You should now see a new resource listed in the list of cluster resources
NOTE: You could also create the cluster resource with the crm command as
follows:
crm configure

primitive data1vol ocf:heartbeat:Filesystem \


meta target-role=stopped \

params device=DEVICE directory=DIRECTORY


fstype=FSTYPE \
op monitor interval=20 timeout=40
commit

17. Open a terminal window and if not already logged in as the root user, enter su
to become root. When prompted for the root user's password, enter novell

18. Enter the following command to create the mount point directory for the cluster
managed storage volume:

mkdir -p DIRECTORY

Repeat this step on each of the cluster nodes that the cluster managed storage

volume could be mounted on

19. On only one of the cluster nodes, enter the following command to create a file
system on the SAN LUN:

mkfs.FSTYPE DEVICE

42

Answer Y to format the entire device and not just a partition on the device.
WARNING: If you have and SBD STONITH device configured, due to
limitations in the lab environment, you may want to stop the SBD cluster resource
before formatting the SAN volume. You may start it again after the formating is
complete.

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Manage Clustered Storage with a SAN

Task II: Activate the Cluster Manage Storage Volume


1. In the left-hand pane, select Management
You should see the data1vol resource listed under Resources
2. Select the data1vol resource and click the Start Resource button on the button bar
(the button looks like a right pointing triangle)

You should see that the data1vol resource is now running

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

3. To show the resources relative to the cluster nodes, click the Groups Resources by
Node button on the top left of the button bar (the button looks like 4 Green dots in
a vertical line next to a downward pointing arrow)

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

43

HA Clustering with the SLE-HAE11

Section 6 Split-brain Avoidance and Management

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

This section covers how to configure an HA cluster to avoid, detect, and manage a splitbrain scenario.

44

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Split-brain Avoidance and Management

6.1 Create a 4MB Logical Volume for an SBD Device


Description:

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

In this exercise, you create a 4MB logical volume in the vg0 volume group for use as an
SBD device in a cluster.

Objectives:

Task I: Configure LVM Logical Volumes

Special Instructions and Notes:

Perform this exercise on the Storage1 server (unless otherwise directed by the instructor)
An LVM volume group named vg0 with at least 4MB of free space must exist to
successfully complete this exercise.

Task I: Configure an LVM Logical Volume

1. Use the following commands to create 1 Logical Volumes in the vg0 Volume
Group:

lvcreate

-L

4M

-n

sbd

vg0

2. Verify that the logical volume was created by entering the following command:
lvs

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

45

HA Clustering with the SLE-HAE11

6.2 Create an iSCSI Target for the SBD Device from the
CLI

Description:

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

In this exercise you will use the command line iSCSI tools to create a target containing 1
LUN on the iSCSI target server .

Objectives:

Task I: Create an iSCSI Target for the SBD Device

Special Instructions and Notes:

Perform this exercise on the iSCSI target server machine (most likely storage1) as directed.
You must have an LVM volume group named vg0 that contains at least 1 logical volume
named sbd to perform this exercise.

Task I: Create an iSCSI Target for the SBD Device


1. In the text editor of your choice, open the /etc/ietd.conf file to be edited (as the
root user).

2. At the end of the file, add the following lines:


Target iqn.2010-05.com.example:sbd

Lun 0 Path=/dev/vg0/sbd,Type=fileio,ScsiId=sbd-0

3. Save the file and close the text editor

4. Restart the iSCSI target daemon by entering the following command:


rciscsitarget restart

(End of Exercise)

46

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Split-brain Avoidance and Management

6.3 Discover Targets with an iSCSI Initiator from the CLI


Description:

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise you will use the CLI tools to discover targets with an iSCSI initiator.

Task I: Configure the iSCSI Initiator Daemon


Task II: Discover and Log Into iSCSI Targets

Special Instructions and Notes:

You must have at least one target already configured on the target server to complete this
exercise.
You will need the IP address of the iSCSI Target Server.
TARGET_LAN_IP= _______________________________
TARGET_SAN1_IP=_______________________________
TARGET_SAN2_IP=_______________________________
TARGET_DRBD_IP=_______________________________
TARGET_NAME=______________________________

Task I: Discover and Log Into iSCSI Targets

1. On Node1, open a terminal window and if not already logged in as the root user,
enter su to become root. When prompted for the root user's password, enter
novell

2. Enter the following command to discover th targets on an iSCSI target server:


iscsiadm -m discovery -t st -p TARGET_SAN1_IP

3. Enter the following command to delete the unneeded portals to the target on the
target server from the iSCSI initiator's discovered target database:
iscsiadm -m node -o delete -p TARGET_LAN_IP

iscsiadm -m node -o delete -p TARGET_SAN2_IP

iscsiadm -m node -o delete -p TARGET_DRBD_IP


4. Enter the following command to list the discovered targets:
iscsiadm -m node
You should see the target(s) available on the target server
5. Enter the following command to log into the discovered targets:
iscsiadm -m node -L all

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

47

HA Clustering with the SLE-HAE11


6. Enter the following command to see the disks the machine is now connected to:
ls -l /dev/disk/by-path | grep iscsi
You should see a list of the iscsi disks the machine is connected to
7. Repeat these steps on the other cluster nodes

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

(End of Exercise)

48

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Split-brain Avoidance and Management

6.4 Configure an SBD STONITH Cluster Resource

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise, you configure an SBD STONITH to be a cluster resource to proved node
fencing.

Task I: Configure the SBD daemon


Task II: Configure a SBD Cluster Resource
Task III: Activate the SBD Cluster Resource
Task IV: Test the SBD Cluster Resource

Special Instructions and Notes:

The cluster must be running and have quorum to perform this exercise
The SBD LUN must be connected to perform this exercise
SBD_DEVICE=__________________________________________
VHOST1=_______________________________________________
VHOST2=_______________________________________________

Task I: Configure the SBD daemon

1. On Node1, if not already logged in as the root user, enter su to become root.
When prompted for the root user's password, enter novell

2. In the text editor of your choice, open (or create if missing) the /etc/sysconfig/sbd
file.

3. Add (or edit if the already exist) the following lines to match:
SBD_DEVICE=SBD_DEVICE
SBD_OPTS=-W

4. Save the file and close the text editor

5. Enter the following commands to synchronize this file with the other cluster nodes:
csyn2 -f /etc/sysconfig/sbd
csync2 -xv

6. Enter the following command to load the softdog kernel module:


modprobe softdog

NOTE: Some hardware already contains a watchdog device. If this modprobe


command returns an error stating that the Device or resource is busy the kernel
module for the hardware watchdog device is already loaded and the softdog kernel
module is not required. You may then skip steps 7-10.
7. Enter the following command to load the softdog kernel module on the other
cluster nodes:

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

49

HA Clustering with the SLE-HAE11


ssh VHOST2 modprobe softdog
Repeat for each cluster node
8. To ensure that the softdog kernel module gets loaded at boot time, in the text editor
of your choice, open the /etc/sysconfig/kernel file to be edited
9. Add softdog to the end of the kernel modules listed in the

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

10. Save the file and close the text editor

MODULES_LOADED_ON_BOOT variable
11. Enter the following command to copy the modified file to the other cluster nodes:
scp /etc/sysconfig/kernel VHOST2:/etc/sysconfig
Repeat this command for each cluster node

IMPORTANT: Configuration of the watchdog device is optional but does give


you protection against communication failure with the SAN. Because of
limitations in our lab environment, activating the watchdog device could cause the
cluster nodes to reboot unintentionally. You may want to undo the watchdog
configuration after experiencing how to configure it.

12. Enter the following command to initialize the SBD device:


sbd -d SBD_DEVICE create

NOTE: DO NOT repeat this command on the other nodes.

13. Enter the following command to create the node's slot on the SBD device:
sbd -d SBD_DEVICE allocate NODE_NAME
Repeat this command on the other cluster nodes

NOTE: This step is not required, however it is a good idea because it is a way to
manually ensure that the cluster nodes get a slot on the SBD device.

14. Enter the following command to verify the SBD device was initialized:
sbd -d SBD_DEVICE dump

15. Restart the openais daemon to have it start the SBD daemon:
rcopenais restart

Repeat this command on each of the cluster nodes

IMPORTANT: If the sbd device is not connected to the cluster node when the
corosync/openais daemon tries to start, the openais daemon will not start

16. Enter the following command to see that the SBD daemon is writing to the SBD
device:
sbd -d SBD_DEVICE list
For each node that has started the SBD daemon you should see the node's name
listed in a slot and the nodes status

50

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Split-brain Avoidance and Management

Task II: Configure a SBD Cluster Resource


1. On Node1, launch the Pacemaker GUI:
YaST > Other > Pacemaker GUI
2. Select Connection > Login from the menu bar (or click the Login to Cluster
button on the button bar)

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

and click OK to login:

3. In the Login pop-up window, enter the following information in the relative fields
Server:(Port): 127.0.0.1

User Name: hacluster


Password: novell

4. In the left-hand pane, select CRM-Config

5. On the Policy Engine tab, ensure that Stontih Enabled value is checked

6. In the left-hand pane, select Resources and click Add

7. On the Add pop-up window, select Primitive and click OK

8. On the Add Primitive Basic Settings screen enter or select from drop-down list(s)
and/or check-boxes the following information:
ID: SBD

Class: stonith

Provider: (not available)

Type: external/sbd

Initial state of Resource: Stopped

Add monitor operation: (checked)

9. Click Forward

10. On the Add Primitive Summary of ... screen, select the Instance Attributes tab
11. Select sbd_device from the attributes list and click Edit

12. In the Edit nvpair window, in the value field, enter SBD_DEVICE and then click
OK

13. Back on the Add Primitive Summary of ... screen click Apply

You should now see a new primitive resource listed in the list of cluster resources
on the Primitive tab

NOTE: You could also create the STONITH cluster resource using the crm
command as follows:
crm configure
property stonith-enabled=true
primitive SBD stonith:external/sbd \

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

51

HA Clustering with the SLE-HAE11


op monitor interval=30 timeout=15 \
params sbd_device=SBD_DEVICE
commit
14. You should now see a new resource for the SBD STONITH device

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

1. In the left-hand pane, select Management

Task III: Activate the SBD Cluster Resource


You should see the SBD resource listed under Resources

2. Select the first instance of the SBD resource and click the Start Resource button
on the button bar (the button looks like a right pointing triangle)

You should see the that SBD resource is now running on a cluster node

3. To show the resources relative to the cluster nodes, click the Groups Resources by
Node button on the top left of the button bar (the button looks like 4 Green dots in
a vertical line next to a downward pointing arrow)

Task IV: Test the SBD Cluster Resource

1. On Node1 (as root) enter the following command to test the SBD resource:
sbd -d SBD_DEVICE message node2 reset
You should see the node2 machine reboot

(End of Exercise)

52

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Split-brain Avoidance and Management

Section 7 Configure Cluster Safe Logical Storage

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

This section covers how configure safe logical storage resources with LVM in a cluster.

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

53

HA Clustering with the SLE-HAE11

7.1 Create 4 1GB Logical Volumes on Shared Storage


Description:

In this exercise, you create 4 1GB logical volumes on the shared storage server.

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

Task I: Configure LVM Logical Volumes

Special Instructions and Notes:

Perform this exercise on the Storage1 server (unless otherwise directed by the instructor)
An LVM volume group named vg0 with at least 4GB of free space must exist to
successfully complete this exercise.

Task I: Configure an LVM Logical Volume

1. Use the following commands to create 4 Logical Volumes in the vg0 Volume
Group:

lvcreate

-L

1G

-n

lun0

vg0

lvcreate

-L

1G

-n

lun1

vg0

lvcreate

-L

1G

-n

lun2

vg0

lvcreate

-L

1G

-n

lun3

vg0

2. Verify that the logical volumes were created by entering the following command:
lvs

(End of Exercise)

54

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Configure Cluster Safe Logical Storage

7.2 Create an iSCSI Target with 4 LUNs from the CLI


Description:

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

In this exercise you will use the command line iSCSI tools to create a target containing 4
LUNs on the iSCSI target server .

Objectives:

Task I: Create an iSCSI Target with 4 LUNs

Special Instructions and Notes:

Perform this exercise on the iSCSI target server machine (most likely storage1) as directed.
You must have an LVM volume group named vg0 that contains at least 4 logical volumes to
perform this exercise.

Task I: Create an iSCSI Target with 4 LUNs

1. In the text editor of your choice, open the /etc/ietd.conf file to be edited (as the
root user).

2. At the end of the file, add the following lines:


Target iqn.2010-05.com.example:4_luns

Lun 0 Path=/dev/vg0/lun0,Type=fileio,ScsiId=4_luns-0

Lun 1 Path=/dev/vg0/lun1,Type=fileio,ScsiId=4_luns-1
Lun 2 Path=/dev/vg0/lun2,Type=fileio,ScsiId=4_luns-2
Lun 3 Path=/dev/vg0/lun3,Type=fileio,ScsiId=4_luns-3

3. Save the file and close the text editor

4. Restart the iSCSI target daemon by entering the following command:

rciscsitarget restart

Version 1

(End of Exercise)

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

55

HA Clustering with the SLE-HAE11

7.3 Discover Targets with an iSCSI Initiator from the CLI


Description:

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise you will use the CLI tools to discover targets with an iSCSI initiator.

Task I: Configure the iSCSI Initiator Daemon


Task II: Discover and Log Into iSCSI Targets

Special Instructions and Notes:

You must have at least one target already configured on the target server to complete this
exercise.
You will need the IP address of the iSCSI Target Server.
TARGET_LAN_IP= _______________________________
TARGET_SAN1_IP=_______________________________
TARGET_SAN2_IP=_______________________________
TARGET_DRBD_IP=_______________________________
TARGET_NAME=______________________________

Task I: Discover and Log Into iSCSI Targets

1. On Node1, open a terminal window and if not already logged in as the root user,
enter su to become root. When prompted for the root user's password, enter
novell

2. Enter the following command to discover th targets on an iSCSI target server:


iscsiadm -m discovery -t st -p TARGET_SAN1_IP

3. Enter the following command to delete the unneeded portals to the target on the
target server from the iSCSI initiator's discovered target database:
iscsiadm -m node -o delete -p TARGET_LAN_IP

iscsiadm -m node -o delete -p TARGET_SAN2_IP

iscsiadm -m node -o delete -p TARGET_DRBD_IP


4. Enter the following command to list the discovered targets:
iscsiadm -m node
You should see the target(s) available on the target server
5. Enter the following command to log into the discovered targets:
iscsiadm -m node -L all

56

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Configure Cluster Safe Logical Storage


6. Enter the following command to see the disks the machine is now connected to:
ls -l /dev/disk/by-path | grep iscsi
You should see a list of the iscsi disks the machine is connected to
7. Repeat these steps on the other cluster nodes

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

57

HA Clustering with the SLE-HAE11

7.4 Configure a Clone Resource Group for DLM and


CLVMD from the CLI

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise, you configure a cloned resource group for the DLM and cLVM daemon
resources using the crm command line.

Task I: Edit the lvm.conf File


Task II: Configure a Cloned Resource Group
Task III: Activate the Base Storage Cloned Resource Group

Special Instructions and Notes:


(none)

Task I: Edit the lvm.conf File

1. In the text editor of your choice, open the /etc/lvm/lvm.conf file to be edited.
2. Find the locking_type parameter in the global {} section and change the 1 to a 3 as
follows:

locking_type = 3

3. Save the file and close the text editor

4. Synchronize the /etc/lvm/lvm.conf file to the other cluster nodes:


csync2 -xv /etc/lvm/lvm.conf

Task II: Configure a Cloned Resource Group

1. If not already logged in as the root user, enter su to become root. When
prompted for the root user's password, enter novell

2. Enter the following command to open the crm CLI in configure mode:
crm configure

You should now be at a crm(live)configure# prompt

3. Enter the following commands to create a primitive resource for dlm and clvmd:
primitive dlm ocf:pacemaker:controld \
op monitor intrerval=10 timeout=20
primitive clvm ocf:lvm2:clvmd \
op monitor interval=10 timeout=20
group base_strg_grp dlm clvm

58

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Configure Cluster Safe Logical Storage


clone base_strg_clone base_strg_grp \
meta target-role=stopped interleave=true
commit
quit
4. View the resource state from the command line by entering the following

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

crm_mon -ri 1

command:
You should see the new cloned resource group listed along with its state

Task III: Activate the Base Storage Cloned Resource


Group
1. Open another terminal window. If not already logged in as the root user, use su
to become root using the same password as above.

2. Enter the following command to start the new clone resource:


crm resource start base_strg_clone

In the crm_mon terminal window you should see the new cloned resource group
listed as started

3. In the crm_mon terminal window, press Ctrl+C to to close the crm_mon utility

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

59

HA Clustering with the SLE-HAE11

7.5 Create a Clustered LVM Volume Group from Multiple


Disks

Description:

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

In this exercise you will use the LVM command line commands to create an LVM volume
group from multiple disks.

Objectives:

Task I: Configure an LVM Volume Group

Special Instructions and Notes:

Perform this exercise on only one of the cluster nodes (unless as directed otherwise by the
instructor).

Task I: Configure an LVM Volume Group

1. If not already logged in as the root user, enter su to become root. When
prompted for the root user's password, enter novell

2. Find and record the list of SAN LUNs that will be used in the clustered LVM
volume by entering the following command at the command line of the one of the
cluster nodes (they are most likely the ones you just connected to in a previous

exercise):

ls -l /dev/disk/by-path

List the persistent device file names of each SAN LUN that will be in the clustered
LVM volume group:

_____________________________________________________
_____________________________________________________
_____________________________________________________

_____________________________________________________

3. For each of the disks that will be used in the volume group (recorded above), use
the following command to create LVM Physical Volume(s) replacing BLOCKDEV
with the block device filename of the disk:
pvcreate /dev/BLOCKDEV
Repeat this command for each of the disks that will be used in the volume group
4. Use the following command to create an LVM Volume Group named cvg0 (list
block devices as a space delimited list):

60

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Configure Cluster Safe Logical Storage


vgcreate -c y cvg0 /dev/BLOCKDEV_1 /dev/BLOCKDEV_2
5. Verify that the volume group was created successfully by entering the following
commands (notice the similarities and differences in their outputs):
vgs
vgdisplay

6. To see how the physical volumes created are being used, enter the following

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

commands (notice the similarities and differences in their outputs):


pvs

pvdisplay

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

61

HA Clustering with the SLE-HAE11

7.6 Create a Logical Volume on the Cluster Nodes


Description:

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

In this exercise, you will create a logical volume in the cvg0 volume group on the cluster
nodes.

Objectives:

Task I: Configure a Basic LVM Logical Volume


Task II: Format the Basic LVM Logical Volume with a File System

Special Instructions and Notes:

Perform this exercise on only one of the cluster nodes (unless directed otherwise by the
instructor).
An LVM volume group named cvg0 with at least 512MB of free space must exist to
successfully complete this exercise.

Task I: Configure a Basic LVM Logical Volume

1. On one of the cluster nodes, if not already logged in as the root user, enter su to
become root. When prompted for the root user's password, enter novell

2. Use the following command to create one logical volume in the cvg0 volume
group:

lvcreate -L 512M -n datavol2 cvg0

3. Verify that the logical volume was created by entering the following command:
lvs

Task II: Format the Basic LVM Logical Volume with a File
System
1. On the same cluster node, enter the following command to create a file system in

the datavol2 logical volume:

mkfs.ext3 /dev/cvg0/datavol2

2. Enter the following command to create a mount point for the logical volume and
mount it:
mkdir /data2
Create this directory on all cluster nodes.
(End of Exercise)

62

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Configure Cluster Safe Logical Storage

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

63

HA Clustering with the SLE-HAE11

7.7 Configure a Cloned Resource for a Clustered Volume


Group from the CLI

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise, you configure a cloned resource for a clustered LVM volume group using
the crm command line.

Task I: Configure a Clustered LVM Volume Group Cloned Resource


Task II: Activate the Clustered Volume Group Resource

Special Instructions and Notes:


(none)

Task I: Configure a Clustered LVM Volume Group Cloned


Resource
1. If not already logged in as the root user, enter su to become root. When
prompted for the root user's password, enter novell

2. Enter the following command to open the crm CLI in configure mode:
crm configure

You should now be at a crm(live)configure# prompt

3. Enter the following commands to create a clone resource for the to activate the
clustered LVM volume group on all of the cluster nodes:

primitive cvg0_instance ocf:heartbeat:LVM \


op monitor interval=10 timeout=30 \
params volgrpname=cvg0

clone cvg0 cvg0_instance meta interleave=true \


meta target-role=stopped

commit

4. While still at the crm(live)configure# prompt, enter the following to create order
constraints to ensure that the resources start in the appropriate order:
order cvg0_after_base_strg_clone inf: base_strg-clone
cvg0
commit
quit
5. View the resource state from the command line by entering the following

64

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Configure Cluster Safe Logical Storage


command:
crm_mon -i 1
You should see the new cloned resource group listed along with its state

Task II: Activate the Clustered Volume Group Resource

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

to become root using the same password as above.

1. Open another terminal window. If not already logged in as the root user, use su
2. Enter the following command to start the new resource:
crm resource start cvg0

In the crm_mon terminal window you should see the new resource listed as started

3. In the crm_mon terminal window, press Ctrl+C to to close the crm_mon utility

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

65

HA Clustering with the SLE-HAE11

7.8 Configure a Resource for a Filesystem on an LVM


Volume from the CLI

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise, you configure a resource that mounts a filesystem that resides on an LVM
volume in a clustered LVM volume group using the crm command line.

Task I: Configure an LVM Volume Filesystem Resource


Task II: Activate the Filesystem Resource

Special Instructions and Notes:

You must have a clustered LVM volume group named cvg0 to perform this exercise.
Use the following values in this exercise:
DEVICE=_________________________________________
DIRECTORY=_____________________________________
FSTYPE=_________________________________________

Task I: Configure an LVM Volume Filesystem Resource


1. If not already logged in as the root user, enter su to become root. When
prompted for the root user's password, enter novell

2. Enter the following command to open the crm CLI in configure mode:
crm configure

You should now be at a crm(live)configure# prompt

3. Enter the following commands to create a clone resource for the to activate the
clustered LVM volume group on all of the cluster nodes:

primitive data2vol ocf:heartbeat:Filesystem \

params device=DEVICE directory=DIRECTORY \


fstype=FSTYPE \

op monitor interval=20 timeout=40 \

meta target-role=stopped
commit

4. While still at the crm(live)configure# prompt, enter the following to create order
constraints to ensure that the resources start in the appropriate order:
order data2vol_after_cvg0 inf: cgv0 data2vol
commit
quit

66

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Configure Cluster Safe Logical Storage


5. View the resource state from the command line by entering the following
command:
crm_mon -ri 1
You should see the new cloned resource group listed along with its state

Task II: Activate the Filesystem Resource

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

1. Open another terminal window. If not already logged in as the root user, use su
to become root using the same password as above.

2. Enter the following command to start the new resource:


crm resource start data2vol

In the crm_mon terminal window you should see the new resource listed as started

3. In the crm_mon terminal window, press Ctrl+C to to close the crm_mon utility

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

67

HA Clustering with the SLE-HAE11

Section 8 Configure Active/Active Clustered Storage

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

This section covers how configure cluster safe active/active storage resources with OCFS2
in a cluster.

68

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Configure Active/Active Clustered Storage

8.1 Create a Logical Volume for OCFS2


Description:

In this exercise, you will create a 8GB logical volume in the vg0 volume group.

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

Task I: Configure LVM Logical Volumes

Special Instructions and Notes:

Perform this exercise on the shared storage server.


An LVM volume group named vg0 with at least 8GB of free space must exist to
successfully complete this exercise.

Task I: Configure an LVM Logical Volume

1. If not already logged in as the root user, enter su to become root. When
prompted for the root user's password, enter novell

2. Use the following commands to create a logical volume in the vg0 Volume Group:
lvcreate

-L

8G

-n

ocfs2

vg0

3. Verify that the logical volumes were created by entering the following command:
lvs

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

69

HA Clustering with the SLE-HAE11

8.2 Create an iSCSI Target with 1 LUN for OCFS2 from the
CLI

Description:

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

In this exercise you will use the command line iSCSI tools to create a target containing 1
LUN on the iSCSI target server .

Objectives:

Task I: Create an iSCSI Target for OCFS2

Special Instructions and Notes:

Perform this exercise on the iSCSI target server machine (most likely storage1) as directed.
You must have an LVM volume group named vg0 that contains at least 1 logical volume
named ocfs2 to perform this exercise.

Task I: Create an iSCSI Target for OCFS2

1. In the text editor of your choice, open the /etc/ietd.conf file to be edited (as the
root user).

2. At the end of the file, add the following lines:


Target iqn.2010-05.com.example:ocfs2

Lun 0 Path=/dev/vg0/ocfs2,Type=fileio,ScsiId=ocfs2-0

3. Save the file and close the text editor

4. Restart the iSCSI target daemon by entering the following command:


rciscsitarget restart

(End of Exercise)

70

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Configure Active/Active Clustered Storage

8.3 Discover Targets with an iSCSI Initiator from the CLI


Description:

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise you will use the CLI tools to discover targets with an iSCSI initiator.

Task I: Configure the iSCSI Initiator Daemon


Task II: Discover and Log Into iSCSI Targets

Special Instructions and Notes:

You must have at least one target already configured on the target server to complete this
exercise.
You will need the IP address of the iSCSI Target Server.
TARGET_LAN_IP= _______________________________
TARGET_SAN1_IP=_______________________________
TARGET_SAN2_IP=_______________________________
TARGET_DRBD_IP=_______________________________
TARGET_NAME=______________________________

Task I: Discover and Log Into iSCSI Targets

1. On Node1, open a terminal window and if not already logged in as the root user,
enter su to become root. When prompted for the root user's password, enter
novell

2. Enter the following command to discover th targets on an iSCSI target server:


iscsiadm -m discovery -t st -p TARGET_SAN1_IP

3. Enter the following command to delete the unneeded portals to the target on the
target server from the iSCSI initiator's discovered target database:
iscsiadm -m node -o delete -p TARGET_LAN_IP

iscsiadm -m node -o delete -p TARGET_SAN2_IP

iscsiadm -m node -o delete -p TARGET_DRBD_IP


4. Enter the following command to list the discovered targets:
iscsiadm -m node
You should see the target(s) available on the target server
5. Enter the following command to log into the discovered targets:
iscsiadm -m node -L all

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

71

HA Clustering with the SLE-HAE11


6. Enter the following command to see the disks the machine is now connected to:
ls -l /dev/disk/by-path | grep iscsi
You should see a list of the iscsi disks the machine is connected to
7. Repeat these steps on the other cluster nodes

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

(End of Exercise)

72

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Configure Active/Active Clustered Storage

8.4 Create an OCFS2 File System on a SAN Volume


In this exercise you will create an OCFS2 file system on a SAN volume.

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Task I: Create an OCFS2 File System on a SAN Volume

Objectives:

Special Instructions and Notes:

Perform the following Lab on only one of the cluster nodes..


Use the following values in this exercise:
DEVICE=__________________________
MOUNT_POINT=____________________

Task I: Create an OCFS2 File System on a SAN Volume


1. On one of the cluster nodes, format the LVM with the OCFS2 file system:
mkfs.ocfs2 DEVICE

WARNING: Before you perform this step, if you have the SBD STONITH
daemon configured and it is using the watchdog device, because of the limitations
of the lab environment, you may need to disable the watchdog device and stop the
SBD cluster resource to prevent the cluster node(s) from rebooting unintentionally
due to temporary lack of SAN communication.

2. Enter the following command to create the mount point directory for the OCFS2
volume:

mkdir -p MOUNT_POINT

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

73

HA Clustering with the SLE-HAE11

8.5 Configure a Clone Resource Group for DLM, CLVMD


and O2CB from the CLI

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise, you configure a cloned resource group for the DLM, cLVM daemon, and
O2CB resources using the crm command line.

Task I: Edit the lvm.conf File


Task II: Configure a Cloned Resource Group
Task III: Activate the Base Storage Cloned Resource Group

Special Instructions and Notes:


(none)

Task I: Edit the lvm.conf File

1. In the text editor of your choice, open the /etc/lvm/lvm.conf file to be edited.
2. Find the locking_type parameter in the global {} section and change the 1 to a 3 as
follows:

locking_type = 3

3. Save the file and close the text editor

4. Copy the /etc/lvm/lvm.conf file to the other cluster nodes:


scp /etc/lvm/lvm.conf NODE2:/etc/lvm/
Repeat this command for each cluster node

Task II: Configure a Cloned Resource Group

1. If not already logged in as the root user, enter su to become root. When
prompted for the root user's password, enter novell

2. Enter the following command to open the crm CLI in configure mode:

crm configure

You should now be at a crm(live)configure# prompt


3. Enter the following commands to create a primitive resource for dlm, clvmd and
o2cb:
property stonith-enabled=false
commit
primitive dlm ocf:pacemaker:controld \

74

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Configure Active/Active Clustered Storage


op monitor interval=10 timeout=20
primitive clvm ocf:lvm2:clvmd \
op monitor interval=10 timeout=20
primitive o2cb ocf:ocfs2:o2cb \
op monitor interval=10 timeout=20

group base_strg_grp dlm clvm o2cb

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

clone base_strg_clone base_strg_grp meta


interleave=true
commit

quit

4. View the resource state from the command line by entering the following
command:

crm_mon -ri 1

You should see the new cloned resource group listed along with its state

Task III: Activate the Base Storage Cloned Resource


Group
1. Open another terminal window. If not already logged in as the root user, use su
to become root using the same password as above.

2. Enter the following command to start the new clone resource:


crm resource start base_strg_clone

In the crm_mon terminal window you should see the new cloned resource group
listed as started

3. In the crm_mon terminal window, press Ctrl+C to to close the crm_mon utility

(End of Exercise)

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

75

HA Clustering with the SLE-HAE11

8.6 Configure a OCFS2 Volume Clone Resource from the


CLI

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise, you configure an OCFS2 volume to be a cluster managed clone resource
using the crm command line.

Task I: Configure an OCFS2 Volume Resource


Task II: Activate the OCFS2 Volume Resource

Special Instructions and Notes:

This is a special instruction needed to complete the exercise.


DEVICE=______________________________________
DIRECTORY=__________________________________

Task I: Configure an OCFS2 Volume Resource

1. If not already logged in as the root user, enter su to become root. When
prompted for the root user's password, enter novell

2. Enter the following command to open the crm CLI in configure mode:
crm configure

You should now be at a crm(live)configure# prompt

3. Enter the following commands to create a primitive resource for NAME


primitive ocfs2vol ocf:heartbeat:Filesystem \

meta target-role=stopped params device=DEVICE \


directory=DIRECTORY fstype=ocfs2

clone ocfs2vol_clone ocfs2vol meta interleave=true


commit
quit

4. View the resource state from the command line by entering the following
command:
crm_mon -ri 1
You should see the new clone resource listed along with its state

Task II: Activate the OCFS2 Volume Resource


1. Open another terminal window. If not already logged in as the root user, use su
to become root using the same password as above.

76

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

Configure Active/Active Clustered Storage


2. Enter the following command to start the new clone resource:
crm resource start ocfs2vol
In the crm_mon terminal window you should see the new clone resource listed as
started

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

(End of Exercise)

3. In the crm_mon terminal window, press Ctrl+C to to close the crm_mon utility

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

77

HA Clustering with the SLE-HAE11

8.7 Configure an Order Constraint for the Base Storage


Clone & OCFS2

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Objectives:

In this exercise, you configure an order constraint using the crm command line.

Task I: Configure an Order Constraint

Special Instructions and Notes:


(none)

Task I: Configure an Order Constraint

1. If not already logged in as the root user, enter su to become root. When
prompted for the root user's password, enter novell

2. Enter the following command to open the crm CLI in configure mode:
crm configure

You should now be at a crm(live)configure# prompt

3. Enter the following commands to create an order constraint for HASI and the
OCFS2 volume:

order OCFS2_after_base_strg inf: base_strg_clone

ocfs2vol_clone
commit

4. While still at the crm(live)configure# prompt, enter the following command to see
the new order constraint:
show

You should see the new order constraint. (You might need to arrow down to see the

constraint if you have a lot of resources. Press q to close the built-in pager if you

are not returned to the crm prompt)

5. Enter the following command at the crm(live)configure# prompt to exit the crm
CLI:
quit
You should now be back at a shell prompt
(End of Exercise)

78

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

Configure Active/Active Clustered Storage

Version 1

Copying all or part of this manual, or distributing such copies, is strictly


prohibited. To report suspected copying, please call 1-800-PIRATES

79

ov
el
lA
N TT
ot I
fo ns
r d tru
is ct
tri or
bu U
tio se
n O
nl

HA Clustering with the SLE-HAE11

80

Copying all or part of this manual, or distributing such copies, is strictly prohibited.
To report suspected copying, please call 1-800-PIRATES

Version 1

You might also like