inst-9211-lab_manual.pdf
TRANSCRIPT
-
7/24/2019 Inst-9211-lab_manual.pdf
1/80
High Availability Clustering with the
SLE-HA Extension 11Workbook
Course 9211Version 11!
Lab "anual#anuary 11$2%11
-
7/24/2019 Inst-9211-lab_manual.pdf
2/80
Proprietary StatementCopyright 2011 Novell, Inc. All rights reserved.
Novell, Inc., has intellectual property rights relating to technology embodied inthe product that is described in this document. In particular, and withoutlimitation, these intellectual property rights may include one or more o the !.".patents listed on the Novell Legal Patents Web page(http://www.novell.com/company/legal/patents/)and one or moreadditional patents or pending patent applications in the !.". and in othercountries.
No part o this publication may be reproduced, photocopied, stored on a retrievalsystem, or transmitted without the e#press written consent o the publisher.
Novell, Inc.$0$ %yman "treet, "uite &00%altham, 'A 02$&1!.".A.www.novell.com
Novell Trademars!or Novell trademars" see the Novell Trademar and Service #ar list(http://www.novell.com/company/legal/trademars/tmlist.html).
Third$Party #aterialsAll third(party trademar)s are the property o their respective owners.
So%tware Piracy*hroughout the world, unauthori+ed duplication o sotware is subect to bothcriminal and civil penalties.
I you )now o illegal copying o sotware, contact your local "otwareAntipiracy -otline. !or the &otline n'mber %or yo'r area" access NovellsWorld Wide Web page (http://www.novell.com) and loo %or the piracy
page 'nder Programs.*r, contact Novell/s anti(piracy headuarters in the !.". at 00(I3A*4" 56$6(+,-) or ,0$,10$00.
2isclaimerNovell, Inc., ma)es no representations or warranties with respect to the contentsor use o this documentation, and speciically disclaims any e#press or impliedwarranties o merchantability or itness or any particular purpose.
7urther, Novell, Inc., reserves the right to revise this publication and to ma)echanges to its content, at any time, without obligation to notiy any person orentity o such revisions or changes. 7urther, Novell, Inc., ma)es norepresentations or warranties with respect to any sotware, and speciicallydisclaims any e#press or implied warranties o merchantability or itness or anyparticular purpose. 7urther, Novell, Inc., reserves the right to ma)e changes toany and all parts o Novell sotware, at any time, without any obligation to notiyany person or entity o such changes.
Any products or technical inormation provided under this Agreement may besubect to !.". e#port controls and the trade laws o other countries. 8ou agree tocomply with all e#port control regulations and to obtain any reuired licenses orclassiication to e#port, re(e#port or import deliverables. 8ou agree not to e#portor re(e#port to entities on the current !.". e#port e#clusion lists or to anyembargoed or terrorist countries as speciied in the !.". e#port laws. 8ou agreeto not use deliverables or prohibited nuclear, missile, or chemical biologicalweaponry end 'ses. See the Novell 3nternational Trade Services Webpage (http://www.novell.com/in%o/e4ports/) %or more in%ormation one4porting Novell sotware. Novell assumes no responsibility or your ailure toobtain any necessary e#port approvals.
*his Novell *raining 'anual is published solely to instruct students in the use oNovell networ)ing sotware. Although third(party application sotware pac)agesare used in Novell training courses, th is is or demonstration purposes only andshall not constitute an endorsement o any o these sotware applications.
7urther, Novell, Inc. does not represent itsel as having any particular e#pertisein these application sotware pac)ages and any use by students o the same shall
be done at the st'dents own ris.
http://www.novell.com/http://www.novell.com/ -
7/24/2019 Inst-9211-lab_manual.pdf
3/80
Contents
Se&tion 1 'ntro(u&tion to HA Clustering in SLE111!
5No 9ab 4#ercises:.......................................................................................................................1$
Se&tion 2 'nstall an( Con)igure HA Clustering in SLE111*
Exer&ise 21 'nstall the SLE HA Extension1+
*as) I; Add the -A 4#tension as an Installation "ource.............................................................1
-
7/24/2019 Inst-9211-lab_manual.pdf
14/80
&5 6l'stering with the SL7$&5700
=o Lab Exer&ises>
1$ Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
15/80
-
7/24/2019 Inst-9211-lab_manual.pdf
16/80
&5 6l'stering with the SL7$&5700
21 'nstall the SLE HA ExtensionIn this e#ercise, you add the "!"4 9inu# 4nterprise -igh Availability 4#tension as asotware installation source and then install the -A 4#tension components.
b?e&tives@*as) I; Add the -A 4#tension as an Installation "ource
S6e&ial 'nstru&tions an( otes@
5ptional: 9ocation o roduct I";
0ask '@ A(( the HA Extension as an 'nstallation Sour&e
1. 9aunch the 8a"* Add(on roducts module;YaST > Software > Add-on Products
I prompted or the root userDs password, enter novell
2. n the Installed Add(on roducts 58a"*: screen, clic) Add
>. n the 'edia type screen, select !and clic) "e#t
$. Insert the "9411 -A 4#tension product C=E=@= 5i you are running a virtual
machine, attach the "94 -A 4#tension I" to the @': and clic) Continue
&. n the 9icense Agreement screen, select Yes$ I agree to t%e License Agree&ent
and clic) "e#t
-
7/24/2019 Inst-9211-lab_manual.pdf
17/80
3nstall and 6on%ig're &5 6l'stering in SL700
22 Con)igure an HA Cluster with the SLE HAEIn this section, you use the 8a"* Cluster module to conigure an -A cluster with the "9411-4 4#tension. 8ou then copy the cluster coniguration iles to the other cluster nodes and
start the cluster daemon on them as well.
b?e&tives@*as) I; Conigure the Cluster 'anager*as) II; Copy the Cluster Coniguration to ther Cluster Nodes
S6e&ial 'nstru&tions an( otes@
*he "94 -A 4#tension must be installed beore perorming this e#ercise
0ask '@ Con)igure the Cluster "anager1. n the irst cluster node, launch the 8a"* Cluster module;
YaST > .iscellaneous > Cluster
I prompted or the root userDs password, enter novell
2. n the Cluster Communication Channels screen, in the Channel section, rom the
Bind Networ) Address drop(down list, select the networ) I o the 9AN networ)
>. In the 'ulticast Address ield, enter 2/01
$. In the 'ulticast ort ield, enter 343
"*TE; In the ?' release o the "94(-A411, the redundant channel is not
enabled even i deined. =eining the redundant channel could cause problems iyou will be using the =9'.
&. In the Node I= section, ensure that the Auto ?enerate Node I= chec) bo# is not
chec)ed
-
7/24/2019 Inst-9211-lab_manual.pdf
18/80
&5 6l'stering with the SL7$&5700
Also put a chec) in the Start &g&tdchec)bo#
1$. Clic) Start *)enAIS "ow
*he current "tatus should change to 7unning
1&. Clic) "e#t5or i listed in the let(hand pane, select Configure Cs(nc2:
1
-
7/24/2019 Inst-9211-lab_manual.pdf
19/80
3nstall and 6on%ig're &5 6l'stering in SL700
2. 4nter the ollowing commands to copy the other cluster node5s:;
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/scp /etc/csync2/key_hagroup root@node2:/etc/csync2/
>. !se ssh to connect to the other cluster node;
ssh root@node2
$. In the te#t editor o your choice, open the8etc8coros(nc8coros(ncconfile to be
edited.
&. 7ind the line that begins with nodeid9and increment it to match the nodeDs number
5i.e. use 2 or node2, > or node>, etc.:
-
7/24/2019 Inst-9211-lab_manual.pdf
20/80
&5 6l'stering with the SL7$&5700
20 Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
21/80
3nstall and 6on%ig're &5 6l'stering in SL700
Section / Introduction to t%e Cluster Infor&ation :ase
*his section introduces you the Cluster Inormation Base 5CIB: and the tools used tomanage the cluster.
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
21
-
7/24/2019 Inst-9211-lab_manual.pdf
22/80
&5 6l'stering with the SL7$&5700
!1 Set Cluster /e)aults an( /isable S0'0H in theCluster
In this e#ercise, you set some deault values in the cluster and disable "*NI*-.
It is important to note that you should only disable "*NI*- i you are going to use clusterresource that donDt reuire "*NI*-. 4ven in those cases it is still recommended that youenable and use "*NI*- anyway.
b?e&tives@*as) I; "et "ome Cluster =eaults*as) II; =isable "*NI*-
S6e&ial 'nstru&tions an( otes@
*he cluster must be running and have uorum to perorm this e#ercise
0ask '@ Set Soe Cluster /e)aults
1. n Node1, launch the acema)er ?!I;
YaST > *t%er > Pace&a;er 5
-
7/24/2019 Inst-9211-lab_manual.pdf
23/80
3ntrod'ction to the 6l'ster 3n%ormation 8ase
0ask ''@ /isable S0'0H
1. In the let(hand pane, select C7.-Config
2. n the olicy 4ngine tab, deselect 5unchec): the Stonti% Ena'ledvalue
>. Clic) A))l(
"*TE; 8ou could also disable "*NI*- using the crm command as ollows;
crm configure
property stonith-enabled=false
commit
quit
"*NI*- should now be disabled in the cluster
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
2>
-
7/24/2019 Inst-9211-lab_manual.pdf
24/80
&5 6l'stering with the SL7$&5700
2$ Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
25/80
3ntrod'ction to the 6l'ster 3n%ormation 8ase
Section 4 Introduction to Cluster 7esources
*his section introduces you the concept o cluster resources and resource agents.
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
2&
-
7/24/2019 Inst-9211-lab_manual.pdf
26/80
&5 6l'stering with the SL7$&5700
31 Con)igure an '5 A((ress Cluster 4esour&eIn this e#ercise, you conigure an I address to be a cluster managed resource.
b?e&tives@*as) I; Conigure an I Address Cluster 3esource*as) II; Activate the I Address Cluster 3esource
S6e&ial 'nstru&tions an( otes@
*he cluster must be running and have uorum to perorm this e#erciseCLUSTER_IP1GCLUSTER_IP1_SNMGCLUSTER_IP1_NICG
0ask '@ Con)igure an '5 A((ress Cluster 4esour&e
1. 9aunch the acema)er ?!I;
YaST > *t%er > Pace&a;er 5
-
7/24/2019 Inst-9211-lab_manual.pdf
27/80
3ntrod'ction to 6l'ster 9eso'rces
. "elect IProm the attributes list and clic) Edit
10. In the 4dit nvpair window, in the value ield, enterCLUSTER_IP1and then clic)
*+
11. Bac) on Add rimitive F "ummary o H... screen clic) Add
12. 7rom the Name drop(down list, select cidrnet&as;
1>. In the @alue ield, enter CLUSTER_IP1_SNM
1$. Clic) *+
1&. Clic) Addagain
1
-
7/24/2019 Inst-9211-lab_manual.pdf
28/80
&5 6l'stering with the SL7$&5700
32 Con)igure a vs)t6 4esour&e )ro the CL'In this e#ercise, you conigure a vstp server to be a cluster managed resource using thecrm command line.
b?e&tives@*as) I; Conigure a vstp 3esource*as) II; Activate the vstp 3esource
S6e&ial 'nstru&tions an( otes@
5none:
0ask '@ Con)igure a vs)t6 4esour&e
1. I not already logged in as the root user, enter su to become root. %hen
prompted or the root userDs password, enter novell
2. 4nter the ollowing command to open the crm C9I in conigure mode;
crm configure
8ou should now be at a cr&,liveconfigure?prompt
>. 4nter the ollowing commands to create a primitive resource or vstp;
primitive vsftp lsb:vsftpd meta target-role=stopped
commit
quit
$. @iew the resource state rom the command line by entering the ollowing
command;
crm_mon -ri 1
8ou should see the new resource listed along with its state
0ask ''@ A&tivate the vs)t6 4esour&e
1. pen another terminal window. I not already logged in as the root user, use su
to become root using the same password as above.
2. 4nter the ollowing command to start the new resource;
crm resource start vsftp
In the crmmon terminal window you should see the new vstp resource listed as
started
>. In the crmmon terminal window, press Ctrl+Cto to close the crmmon utility
2 Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
29/80
3ntrod'ction to 6l'ster 9eso'rces
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
2
-
7/24/2019 Inst-9211-lab_manual.pdf
30/80
&5 6l'stering with the SL7$&5700
3! Con)igure a 4esour&e 8rou6 )or an '5 an( vs)t6 )rothe CL'
In this e#ercise, you conigure and I address and vstpd be a cluster managed resources ina resource group using the crm command line.
b?e&tives@*as) I; Conigure a 3esource ?roup*as) II; Activate the New 3esource ?roup
S6e&ial 'nstru&tions an( otes@
5none:
0ask '@ Con)igure a 4esour&e 8rou6
1. I not already logged in as the root user, enter su to become root. %hen
prompted or the root userDs password, enter novell
2. 4nter the ollowing command to open the crm C9I in conigure mode;
crm configure
8ou should now be at a cr&,liveconfigure?prompt
>. 4nter the ollowing commands to create a resource group or I1, vstp;
group ftpgrp IP_1 vsftp
commit
quit
$. @iew the resource group state rom the command line by entering the ollowing
command;
crm_mon -ri 1
8ou should see the new resource group listed along with its state
0ask ''@ A&tivate the ew 4esour&e 8rou6
1. pen another terminal window. I not already logged in as the root user, use su
to become root using the same password as above.
2. 4nter the ollowing command to stat the resource group;
crm resource start ftpgrp
In the crmmon terminal window you should see the new resource group listed as
started
>0 Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
31/80
3ntrod'ction to 6l'ster 9eso'rces
"*TE; I the I1 andEor the vstp cluster resources already have the target-role@parameter set, you must delete those parameters orm the attributes o theindividual cluster resources beore you can set it at the group level 5by runningcrm resource starton the group:.
8ou may easily do this by using the crm configure editcommand to open
the cluster coniguration 5in vi: and deleting the meta target-role@lines rom theI1 and vstp primitive resources. 'a)e sure you save the edited conigurationby issuing a commitcommand once you are bac) at the cr&,liveconfigure?
prompt.
>. In the crmmon terminal window, press Ctrl+Cto to close the crmmon utility
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
>1
-
7/24/2019 Inst-9211-lab_manual.pdf
32/80
&5 6l'stering with the SL7$&5700
>2 Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
33/80
3ntrod'ction to 6l'ster 9eso'rces
Section 3 .anage Clustered Storage wit% a SA"
*his section covers using a "AN or clustered storage.
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
>>
-
7/24/2019 Inst-9211-lab_manual.pdf
34/80
&5 6l'stering with the SL7$&5700
*1 Create an LV" Volue 8rou6 )ro "ulti6le /isks
/es&ri6tion@
In this e#ercise you will use the 9@' command line commands to create an 9@' volumegroup rom multiple dis)s.
b?e&tives@*as) I; Conigure an 9@' @olume ?roup
S6e&ial 'nstru&tions an( otes@
erorm this e#ercise on the "torage1 machine 5unless otherwise directed by the instructor:.
0ask '@ Con)igure an LV" Volue 8rou6
1. I not already logged in as the root user, enter su to become root. %hen
prompted or the root userDs password, enter novell
2. =etermine what type o dis) 5A*AGhda vs. "A*AGsda: your machine is using by
entering the ollowing command at the command line o the "torage1 machine;
fdisk -l
9ist the device ile named o each dis) in the machine;
dis;s;
>. =etermine which dis) is used by the " by entering the ollowing command;mount
9ist the device ile that is used by the ";
*his dis) will N* be used in the volume group
$. 4nable the lvm boot script;
insserv boot.lvm
&. 7or each o the dis)s that will be used in the volume group, use the ollowing
command to create 9@' hysical @olume5s: replacingBLOCKDEVwith the
bloc) device ilename o the dis);
)vcreate 8dev8BLOCKDEV
3epeat this command or each o the dis)s that will be used in the volume group
-
7/24/2019 Inst-9211-lab_manual.pdf
35/80
#anage 6l'stered Storage with a S5N
6. @eriy that the volume group was created successully by entering the ollowing
commands 5notice the similarities and dierences in their outputs:;
vgs
vgdisplay
. *o see how the physical volumes created are being used, enter the ollowingcommands 5notice the similarities and dierences in their outputs:;
pvs
pvdisplay
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
>&
-
7/24/2019 Inst-9211-lab_manual.pdf
36/80
&5 6l'stering with the SL7$&5700
*2 Create a 38. Logi&al Volue
/es&ri6tion@
In this e#ercise, you will create a $?B logical volume in the vg1 volume group.
b?e&tives@*as) I; Conigure 9@' 9ogical @olumes
S6e&ial 'nstru&tions an( otes@
erorm this e#ercise on the "torage1 server 5unless otherwise directed by the instructor:An 9@' volume group named vg0 with at least $?B o ree space must e#ist tosuccessully complete this e#ercise.
Task I: Configure LVM Logical Volumes
1. !se the ollowing commands to create 1 9ogical @olumes in the vg0 @olume
?roup;
lvcreate -L 4G -n data1 vg0
2. @eriy that the logical volume was created by entering the ollowing command;
lvs
,End of E#ercise
>< Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
37/80
#anage 6l'stered Storage with a S5N
*! Con)igure an iSCS' 0arget Server )ro the CL'
/es&ri6tion@
In this e#ercise you will use the C9I tools to conigure an i"C"I target server.
b?e&tives@*as) I; Conigure i"C"I *arget "erver
S6e&ial 'nstru&tions an( otes@
erorm this e#ercise on the storage1 machine 5unless directed otherwise by the instructor:.
0ask '@ Con)igure iSCS' 0arget Server
1. n the i"C"I target server open a terminal window and i not already logged in as
the root user, enter su to become root. %hen prompted or the root userDs
password, enter novell
2. 4nter the ollowing commands to enable the iscsi target server to start at boot time
and then start now;
insserv iscsitarget
rciscsitarget start
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
>6
-
7/24/2019 Inst-9211-lab_manual.pdf
38/80
&5 6l'stering with the SL7$&5700
*3 Create an iSCS' 0arget )or the (ata1 L )ro the CL'
/es&ri6tion@
In this e#ercise you will use the command line i"C"I tools to create a target containing 19!N on the i"C"I target server .
b?e&tives@*as) I; Create an i"C"I *arget or the data1 9!N
S6e&ial 'nstru&tions an( otes@
erorm this e#ercise on the i"C"I target server machine 5most li)ely storage1: as directed.8ou must have an 9@' volume group named vg0 that contains at least 1 $?B logical
volume name data1 to perorm this e#ercise.
0ask '@ Create an iSCS' 0arget )or the (ata1 L
1. In the te#t editor o your choice, open the8etc8ietdconfile to be edited 5as the
root user:.
2. I it e#ists, and is not already commented out, comment out the e#ample target line
as ollows;
?Target iBn21-4co&e#a&)le9storagedis;2s(s1#(
>. At the end o the ile, add the ollowing lines;
Target iBn21-3co&e#a&)le9data1
Lun Pat%@8dev8vg8data1$T()e@fileio$ScsiId@data1-
$. "ave the ile and close the te#t editor
&. 3estart the i"C"I target daemon by entering the ollowing command;
rciscsitarget restart
,End of E#ercise
> Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
39/80
#anage 6l'stered Storage with a S5N
** Con)igure an iSCS' 'nitiator )ro the CL'
/es&ri6tion@
In this e#ercise you will use the C9I tools to conigure and then discover targets with ani"C"I initiator.
b?e&tives@*as) I; Conigure the i"C"I Initiator =aemon*as) II; =iscover and 9og Into i"C"I *argets
S6e&ial 'nstru&tions an( otes@
8ou must have at least one target already conigured on the target server to complete this
e#ercise.8ou will need the I address o the i"C"I *arget "erver.TARGET_LAN_IPG TARGET_SAN1_IPGTARGET_SAN2_IPGTARGET_DRBD_IPGTARGET_NAMEG
0ask '@ Con)igure the iSCS' 'nitiator /aeon
1. n Node1, open a terminal window and i not already logged in as the root user,
enter su to become root. %hen prompted or the root userDs password, enter
novell
2. In the te#t editor o your choice, open the8etc8iscsi8initiatorna&eiscsiile to be
edited. 4dit the ollowing line to match;
Initiator"a&e@iBn100D-4desuse9NODENAME
>. "ave and then close the ile
$. In the te#t editor o your choice, open the8etc8iscsi8iscsidconfile to be edited.
4dit the ollowing line to match;
nodestartu) @ auto&atic
&. "ave the ile and close the te#t editor
-
7/24/2019 Inst-9211-lab_manual.pdf
40/80
&5 6l'stering with the SL7$&5700
6. 3epeat this tas) on the other cluster nodes
0ask ''@ /is&over an( Log 'nto iSCS' 0argets
1. n Node1, open a terminal window and i not already logged in as the root user,
enter su to become root. %hen prompted or the root userDs password, enter
novell
2. 4nter the ollowing command to discover th targets on an i"C"I target server;
iscsiadm -m discovery -t st -p TARGET_SAN1_IP
>. 4nter the ollowing command to delete the unneeded portals to the target on the
target server rom the i"C"I initiatorDs 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
$. 4nter the ollowing command to list the discovered targets;
iscsiadm -m node
8ou should see the target5s: available on the target server
&. 4nter the ollowing command to log into the discovered targets;
iscsiadm -m node -L all
-
7/24/2019 Inst-9211-lab_manual.pdf
41/80
#anage 6l'stered Storage with a S5N
*+ Con)igure a Cluster "anage( Storage VolueIn this e#ercise, you conigure a basic cluster managed storage volume.
b?e&tives@*as) I; Conigure a Cluster 'anaged "torage @olume*as) II; Activate the Cluster 'anage "torage @olume
S6e&ial 'nstru&tions an( otes@
*he cluster must be running and have uorum to perorm this e#erciseDEVICEGDIRECTORYGFSTYPEG
0ask '@ Con)igure a Cluster "anage( Storage Volue
1. 9aunch the acema)er ?!I;
YaST > *t%er > Pace&a;er 5
-
7/24/2019 Inst-9211-lab_manual.pdf
42/80
&5 6l'stering with the SL7$&5700
. n the Add rimitive F "ummary o H... screen, select the Instance Attri'utestab
. "elect the deviceattribute rom the attributes list and clic) Edit
10. In the 4dit nvpair window, in the value ield, enterDEVICEand then clic) *+
11. "elect the director(attribute rom the attributes list and clic) Edit
12. In the nvpair window, in the value ield, enterDIRCTORYand then clic) *+
1>. "elect thefst()eattribute rom the attributes list and clic) Edit
1$. In the nvpair window, in the value ield, enterFSTYPEand clic) *+
1&. Clic) *+
1
-
7/24/2019 Inst-9211-lab_manual.pdf
43/80
#anage 6l'stered Storage with a S5N
0ask ''@ A&tivate the Cluster "anage Storage Volue
1. In the let(hand pane, select .anage&ent
8ou should see the data1vol resource listed under 3esources
2. "elect the data1vol resource and clic) the Start 7esourcebutton on the button bar
5the button loo)s li)e a right pointing triangle:8ou should see that the data1vol resource is now running
>. *o show the resources relative to the cluster nodes, clic) the 5rou)s 7esources '(
"odebutton on the top let o the button bar 5the button loo)s li)e $ ?reen dots in
a vertical line ne#t to a downward pointing arrow:
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
$>
-
7/24/2019 Inst-9211-lab_manual.pdf
44/80
&5 6l'stering with the SL7$&5700
Section D S)lit-'rain Avoidance and .anage&ent
*his section covers how to conigure an -A cluster to avoid, detect, and manage a split(brain scenario.
$$ Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
45/80
Split$brain 5voidance and #anagement
+1 Create a 3". Logi&al Volue )or an S./ /evi&e
/es&ri6tion@
In this e#ercise, you create a $'B logical volume in the vg0 volume group or use as an"B= device in a cluster.
b?e&tives@*as) I; Conigure 9@' 9ogical @olumes
S6e&ial 'nstru&tions an( otes@
erorm this e#ercise on the "torage1 server 5unless otherwise directed by the instructor:An 9@' volume group named vg0 with at least $'B o ree space must e#ist to
successully complete this e#ercise.
Task I: Configure an LVM Logical Volume
1. !se the ollowing commands to create 1 9ogical @olumes in the vg0 @olume
?roup;
lvcreate -L 4M -n sbd vg0
2. @eriy that the logical volume was created by entering the ollowing command;
lvs
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
$&
-
7/24/2019 Inst-9211-lab_manual.pdf
46/80
&5 6l'stering with the SL7$&5700
+2 Create an iSCS' 0arget )or the S./ /evi&e )ro theCL'
/es&ri6tion@
In this e#ercise you will use the command line i"C"I tools to create a target containing 19!N on the i"C"I target server .
b?e&tives@*as) I; Create an i"C"I *arget or the "B= =evice
S6e&ial 'nstru&tions an( otes@
erorm this e#ercise on the i"C"I target server machine 5most li)ely storage1: as directed.8ou must have an 9@' volume group named vg0 that contains at least 1 logical volumenamed sbd to perorm this e#ercise.
0ask '@ Create an iSCS' 0arget )or the S./ /evi&e
1. In the te#t editor o your choice, open the8etc8ietdconfile to be edited 5as the
root user:.
2. At the end o the ile, add the ollowing lines;
Target iBn21-3co&e#a&)le9s'd
Lun Pat%@8dev8vg8s'd$T()e@fileio$ScsiId@s'd-
>. "ave the ile and close the te#t editor
$. 3estart the i"C"I target daemon by entering the ollowing command;
rciscsitarget restart
,End of E#ercise
$< Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
47/80
Split$brain 5voidance and #anagement
+! /is&over 0argets with an iSCS' 'nitiator )ro the CL'
/es&ri6tion@
In this e#ercise you will use the C9I tools to discover targets with an i"C"I initiator.
b?e&tives@*as) I; Conigure the i"C"I Initiator =aemon*as) II; =iscover and 9og Into i"C"I *argets
S6e&ial 'nstru&tions an( otes@
8ou must have at least one target already conigured on the target server to complete thise#ercise.
8ou will need the I address o the i"C"I *arget "erver.TARGET_LAN_IPG TARGET_SAN1_IPGTARGET_SAN2_IPGTARGET_DRBD_IPGTARGET_NAMEG
0ask '@ /is&over an( Log 'nto iSCS' 0argets
1. n Node1, open a terminal window and i not already logged in as the root user,
enter su to become root. %hen prompted or the root userDs password, enter
novell
2. 4nter the ollowing command to discover th targets on an i"C"I target server;
iscsiadm -m discovery -t st -p TARGET_SAN1_IP
>. 4nter the ollowing command to delete the unneeded portals to the target on the
target server rom the i"C"I initiatorDs 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
$. 4nter the ollowing command to list the discovered targets;iscsiadm -m node
8ou should see the target5s: available on the target server
&. 4nter the ollowing command to log into the discovered targets;
iscsiadm -m node -L all
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
$6
-
7/24/2019 Inst-9211-lab_manual.pdf
48/80
&5 6l'stering with the SL7$&5700
-
7/24/2019 Inst-9211-lab_manual.pdf
49/80
Split$brain 5voidance and #anagement
+3 Con)igure an S./ S0'0H Cluster 4esour&eIn this e#ercise, you conigure an "B= "*NI*- to be a cluster resource to proved nodeencing.
b?e&tives@*as) I; Conigure the "B= daemon*as) II; Conigure a "B= Cluster 3esource*as) III; Activate the "B= Cluster 3esource*as) I@; *est the "B= Cluster 3esource
S6e&ial 'nstru&tions an( otes@
*he cluster must be running and have uorum to perorm this e#ercise
*he "B= 9!N must be connected to perorm this e#erciseSBD_DEVICEGVHOST1GVHOST2G
0ask '@ Con)igure the S./ (aeon
1. n Node1, i not already logged in as the root user, enter su to become root.
%hen prompted or the root userDs password, enter novell
2. In the te#t editor o your choice, open 5or create i missing: the8etc8s(sconfig8s'd
ile.
>. Add 5or edit i the already e#ist: the ollowing lines to match;
S:E!ICE@FSBD_DEVICEF
S:*PTS@F-F
$. "ave the ile and close the te#t editor
&. 4nter the ollowing commands to synchroni+e this ile with the other cluster nodes;
csyn2 -f /etc/sysconfig/sbd
csync2 -xv
-
7/24/2019 Inst-9211-lab_manual.pdf
50/80
&5 6l'stering with the SL7$&5700
ssh VHOST2modprobe softdog
3epeat or each cluster node
. *o ensure that the sotdog )ernel module gets loaded at boot time, in the te#t editor
o your choice, open the8etc8s(sconfig8;ernelile to be edited
. Add softdogto the end o the )ernel modules listed in the
H'=!94"9A=4=NB* variable
10. "ave the ile and close the te#t editor
11. 4nter the ollowing command to copy the modiied ile to the other cluster nodes;
scp /etc/sysconfig/kernel VHOST2:/etc/sysconfig
3epeat this command or each cluster node
I.P*7TA"T; Coniguration o the watchdog device is optional but does giveyou protection against communication ailure with the "AN. Because olimitations in our lab environment, activating the watchdog device could cause thecluster nodes to reboot unintentionally. 8ou may want to undo the watchdog
coniguration ater e#periencing how to conigure it.12. 4nter the ollowing command to initiali+e the "B= device;
sbd -d SBD_DEVICEcreate
"*TE; = N* repeat this command on the other nodes.
1>. 4nter the ollowing command to create the nodeDs slot on the "B= device;
sbd -d SBD_DEVICEallocate NODE_NAME
3epeat this command on the other cluster nodes
"*TE; *his step is not reuired, however it is a good idea because it is a way tomanually ensure that the cluster nodes get a slot on the "B= device.
1$. 4nter the ollowing command to veriy the "B= device was initiali+ed;
sbd -d SBD_DEVICEdump
1&. 3estart the openais daemon to have it start the "B= daemon;
rcopenais restart
3epeat this command on each o the cluster nodes
I.P*7TA"T; I the sbd device is not connected to the cluster node when thecorosyncEopenais daemon tries to start, the openais daemon will not start
1
-
7/24/2019 Inst-9211-lab_manual.pdf
51/80
Split$brain 5voidance and #anagement
0ask ''@ Con)igure a S./ Cluster 4esour&e
1. n Node1, launch the acema)er ?!I;
YaST > *t%er > Pace&a;er 5
-
7/24/2019 Inst-9211-lab_manual.pdf
52/80
&5 6l'stering with the SL7$&5700
op monitor interval=30 timeout=15 \
params sbd_device=SBD_DEVICE
commit
1$. 8ou should now see a new resource or the "B= "*NI*- device
0ask '''@ A&tivate the S./ Cluster 4esour&e
1. In the let(hand pane, select .anage&ent
8ou should see the "B= resource listed under 3esources
2. "elect the irst instance o the "B= resource and clic) the Start 7esourcebutton
on the button bar 5the button loo)s li)e a right pointing triangle:
8ou should see the that "B= resource is now running on a cluster node
>. *o show the resources relative to the cluster nodes, clic) the 5rou)s 7esources '(
"odebutton on the top let o the button bar 5the button loo)s li)e $ ?reen dots in
a vertical line ne#t to a downward pointing arrow:
0ask 'V@ 0est the S./ Cluster 4esour&e
1. n Node1 5as root: enter the ollowing command to test the "B= resource;
sbd -d SBD_DEVICEmessage node2 reset
8ou should see the node2 machine reboot
,End of E#ercise
&2 Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
53/80
Split$brain 5voidance and #anagement
Section = Configure Cluster Safe Logical Storage
*his section covers how conigure sae logical storage resources with 9@' in a cluster.
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
&>
-
7/24/2019 Inst-9211-lab_manual.pdf
54/80
&5 6l'stering with the SL7$&5700
,1 Create 3 18. Logi&al Volues on Share( Storage
/es&ri6tion@
In this e#ercise, you create $ 1?B logical volumes on the shared storage server.
b?e&tives@*as) I; Conigure 9@' 9ogical @olumes
S6e&ial 'nstru&tions an( otes@
erorm this e#ercise on the "torage1 server 5unless otherwise directed by the instructor:An 9@' volume group named vg0 with at least $?B o ree space must e#ist tosuccessully complete this e#ercise.
Task I: Configure an LVM Logical Volume
1. !se the ollowing commands to create $ 9ogical @olumes in the vg0 @olume
?roup;
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. @eriy that the logical volumes were created by entering the ollowing command;
lvs
,End of E#ercise
&$ Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
55/80
6on%ig're 6l'ster Sa%e Logical Storage
,2 Create an iSCS' 0arget with 3 Ls )ro the CL'
/es&ri6tion@
In this e#ercise you will use the command line i"C"I tools to create a target containing $9!Ns on the i"C"I target server .
b?e&tives@*as) I; Create an i"C"I *arget with $ 9!Ns
S6e&ial 'nstru&tions an( otes@
erorm this e#ercise on the i"C"I target server machine 5most li)ely storage1: as directed.8ou must have an 9@' volume group named vg0 that contains at least $ logical volumes to
perorm this e#ercise.
0ask '@ Create an iSCS' 0arget with 3 Ls
1. In the te#t editor o your choice, open the8etc8ietdconfile to be edited 5as the
root user:.
2. At the end o the ile, add the ollowing lines;
Target iBn21-3co&e#a&)le94luns
Lun Pat%@8dev8vg8lun$T()e@fileio$ScsiId@4luns-
Lun 1 Pat%@8dev8vg8lun1$T()e@fileio$ScsiId@4luns-1
Lun 2 Pat%@8dev8vg8lun2$T()e@fileio$ScsiId@4luns-2
Lun / Pat%@8dev8vg8lun/$T()e@fileio$ScsiId@4luns-/
>. "ave the ile and close the te#t editor
$. 3estart the i"C"I target daemon by entering the ollowing command;
rciscsitarget restart
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
&&
-
7/24/2019 Inst-9211-lab_manual.pdf
56/80
&5 6l'stering with the SL7$&5700
,! /is&over 0argets with an iSCS' 'nitiator )ro the CL'
/es&ri6tion@
In this e#ercise you will use the C9I tools to discover targets with an i"C"I initiator.
b?e&tives@*as) I; Conigure the i"C"I Initiator =aemon*as) II; =iscover and 9og Into i"C"I *argets
S6e&ial 'nstru&tions an( otes@
8ou must have at least one target already conigured on the target server to complete thise#ercise.
8ou will need the I address o the i"C"I *arget "erver.TARGET_LAN_IPG TARGET_SAN1_IPGTARGET_SAN2_IPGTARGET_DRBD_IPGTARGET_NAMEG
0ask '@ /is&over an( Log 'nto iSCS' 0argets
1. n Node1, open a terminal window and i not already logged in as the root user,
enter su to become root. %hen prompted or the root userDs password, enter
novell
2. 4nter the ollowing command to discover th targets on an i"C"I target server;
iscsiadm -m discovery -t st -p TARGET_SAN1_IP
>. 4nter the ollowing command to delete the unneeded portals to the target on the
target server rom the i"C"I initiatorDs 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
$. 4nter the ollowing command to list the discovered targets;iscsiadm -m node
8ou should see the target5s: available on the target server
&. 4nter the ollowing command to log into the discovered targets;
iscsiadm -m node -L all
&< Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
57/80
6on%ig're 6l'ster Sa%e Logical Storage
-
7/24/2019 Inst-9211-lab_manual.pdf
58/80
&5 6l'stering with the SL7$&5700
,3 Con)igure a Clone 4esour&e 8rou6 )or /L" an(CLV"/ )ro the CL'
In this e#ercise, you conigure a cloned resource group or the =9' and c9@' daemonresources using the crm command line.
b?e&tives@*as) I; 4dit the lvm.con 7ile*as) II; Conigure a Cloned 3esource ?roup*as) III; Activate the Base "torage Cloned 3esource ?roup
S6e&ial 'nstru&tions an( otes@
5none:
0ask '@ E(it the lv&on) :ile
1. In the te#t editor o your choice, open the8etc8lv&8lv&confile to be edited.
2. 7ind the loc;ingt()eparameter in the global JK section and change the 1 to a > as
ollows;
loc;ingt()e @ /
>. "ave the ile and close the te#t editor
$. "ynchroni+e the EetcElvmElvm.con ile to the other cluster nodes;
csync2 -xv /etc/lvm/lvm.conf
0ask ''@ Con)igure a Clone( 4esour&e 8rou6
1. I not already logged in as the root user, enter su to become root. %hen
prompted or the root userDs password, enter novell
2. 4nter the ollowing command to open the crm C9I in conigure mode;
crm configure
8ou should now be at a cr&,liveconfigure?prompt
>. 4nter the ollowing commands to create a primitive resource or 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
& Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
59/80
6on%ig're 6l'ster Sa%e Logical Storage
clone base_strg_clone base_strg_grp \
meta target-role=stopped interleave=true
commit
quit
$. @iew the resource state rom the command line by entering the ollowingcommand;
crm_mon -ri 1
8ou should see the new cloned resource group listed along with its state
0ask '''@ A&tivate the .ase Storage Clone( 4esour&e8rou6
1. pen another terminal window. I not already logged in as the root user, use su
to become root using the same password as above.
2. 4nter the ollowing command to start the new clone resource;
crm resource start base_strg_clone
In the crmmon terminal window you should see the new cloned resource group
listed as started
>. In the crmmon terminal window, press Ctrl+Cto to close the crmmon utility
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
&
-
7/24/2019 Inst-9211-lab_manual.pdf
60/80
&5 6l'stering with the SL7$&5700
,* Create a Clustere( LV" Volue 8rou6 )ro "ulti6le/isks
/es&ri6tion@
In this e#ercise you will use the 9@' command line commands to create an 9@' volumegroup rom multiple dis)s.
b?e&tives@*as) I; Conigure an 9@' @olume ?roup
S6e&ial 'nstru&tions an( otes@
erorm this e#ercise on only one o the cluster nodes 5unless as directed otherwise by theinstructor:.
0ask '@ Con)igure an LV" Volue 8rou6
1. I not already logged in as the root user, enter su to become root. %hen
prompted or the root userDs password, enter novell
2. 7ind and record the list o "AN 9!Ns that will be used in the clustered 9@'
volume by entering the ollowing command at the command line o the one o the
cluster nodes 5they are most li)ely the ones you ust connected to in a previous
e#ercise:;
ls -l /dev/disk/by-path
9ist the persistent device ile names o each "AN 9!N that will be in the clustered
9@' volume group;
>. 7or each o the dis)s that will be used in the volume group 5recorded above:, use
the ollowing command to create 9@' hysical @olume5s: replacing BLOCKDEVwith the bloc) device ilename o the dis);
)vcreate 8dev8BLOCKDEV
3epeat this command or each o the dis)s that will be used in the volume group
$. !se the ollowing command to create an 9@' @olume ?roup named cvg0 5list
bloc) devices as a space delimited list:;
-
7/24/2019 Inst-9211-lab_manual.pdf
61/80
6on%ig're 6l'ster Sa%e Logical Storage
vgcreate -c ( cvg 8dev8BLOCKDEV_1/dev/BLOCKDEV_2
&. @eriy that the volume group was created successully by entering the ollowing
commands 5notice the similarities and dierences in their outputs:;
vgs
vgdisplay
-
7/24/2019 Inst-9211-lab_manual.pdf
62/80
&5 6l'stering with the SL7$&5700
,+ Create a Logi&al Volue on the Cluster o(es
/es&ri6tion@
In this e#ercise, you will create a logical volume in the cvg0 volume group on the clusternodes.
b?e&tives@*as) I; Conigure a Basic 9@' 9ogical @olume*as) II; 7ormat the Basic 9@' 9ogical @olume with a 7ile "ystem
S6e&ial 'nstru&tions an( otes@
erorm this e#ercise on only one o the cluster nodes 5unless directed otherwise by the
instructor:.An 9@' volume group named cvg0 with at least &12'B o ree space must e#ist tosuccessully complete this e#ercise.
Task I: Configure a Basic LVM Logical Volume
1. n one o the cluster nodes, i not already logged in as the root user, enter su to
become root. %hen prompted or the root userDs password, enter novell
2. !se the ollowing command to create one logical volume in the cvg0 volume
group;
lvcreate -L 512M -n datavol2 cvg0
>. @eriy that the logical volume was created by entering the ollowing command;
lvs
Task II: Format the Basic LVM Logical Volume with a FileSystem
1. n the same cluster node, enter the ollowing command to create a ile system in
the datavol2 logical volume;
mkfs.ext3 /dev/cvg0/datavol2
2. 4nter the ollowing command to create a mount point or the logical volume and
mount it;
mkdir /data2
Create this directory on all cluster nodes.
,End of E#ercise
-
7/24/2019 Inst-9211-lab_manual.pdf
63/80
6on%ig're 6l'ster Sa%e Logical Storage
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
-
7/24/2019 Inst-9211-lab_manual.pdf
64/80
&5 6l'stering with the SL7$&5700
,, Con)igure a Clone( 4esour&e )or a Clustere( Volue8rou6 )ro the CL'
In this e#ercise, you conigure a cloned resource or a clustered 9@' volume group usingthe crm command line.
b?e&tives@*as) I; Conigure a Clustered 9@' @olume ?roup Cloned 3esource*as) II; Activate the Clustered @olume ?roup 3esource
S6e&ial 'nstru&tions an( otes@
5none:
0ask '@ Con)igure a Clustere( LV" Volue 8rou6 Clone(4esour&e
1. I not already logged in as the root user, enter su to become root. %hen
prompted or the root userDs password, enter novell
2. 4nter the ollowing command to open the crm C9I in conigure mode;
crm configure
8ou should now be at a cr&,liveconfigure?prompt
>. 4nter the ollowing commands to create a clone resource or the to activate the
clustered 9@' volume group on all o 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
$. %hile still at the cr&,liveconfigure? prompt, enter the ollowing 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
&. @iew the resource state rom the command line by entering the ollowing
-
7/24/2019 Inst-9211-lab_manual.pdf
65/80
6on%ig're 6l'ster Sa%e Logical Storage
command;
crm_mon -i 1
8ou should see the new cloned resource group listed along with its state
0ask ''@ A&tivate the Clustere( Volue 8rou6 4esour&e
1. pen another terminal window. I not already logged in as the root user, use su
to become root using the same password as above.
2. 4nter the ollowing command to start the new resource;
crm resource start cvg0
In the crmmon terminal window you should see the new resource listed as started
>. In the crmmon terminal window, press Ctrl+Cto to close the crmmon utility
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
-
7/24/2019 Inst-9211-lab_manual.pdf
66/80
&5 6l'stering with the SL7$&5700
,7 Con)igure a 4esour&e )or a :ilesyste on an LV"Volue )ro the CL'
In this e#ercise, you conigure a resource that mounts a ilesystem that resides on an 9@'volume in a clustered 9@' volume group using the crm command line.
b?e&tives@*as) I; Conigure an 9@' @olume 7ilesystem 3esource*as) II; Activate the 7ilesystem 3esource
S6e&ial 'nstru&tions an( otes@
8ou must have a clustered 9@' volume group named cvg0 to perorm this e#ercise.!se the ollowing values in this e#ercise;DEVICEGDIRECTORYGFSTYPEG
0ask '@ Con)igure an LV" Volue :ilesyste 4esour&e
1. I not already logged in as the root user, enter su to become root. %hen
prompted or the root userDs password, enter novell
2. 4nter the ollowing command to open the crm C9I in conigure mode;
crm configure
8ou should now be at a cr&,liveconfigure?prompt
>. 4nter the ollowing commands to create a clone resource or the to activate the
clustered 9@' volume group on all o 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
$. %hile still at the cr&,liveconfigure? prompt, enter the ollowing to create order
constraints to ensure that the resources start in the appropriate order;
order data2vol_after_cvg0 inf: cgv0 data2vol
commit
quit
-
7/24/2019 Inst-9211-lab_manual.pdf
67/80
6on%ig're 6l'ster Sa%e Logical Storage
&. @iew the resource state rom the command line by entering the ollowing
command;
crm_mon -ri 1
8ou should see the new cloned resource group listed along with its state
0ask ''@ A&tivate the :ilesyste 4esour&e
1. pen another terminal window. I not already logged in as the root user, use su
to become root using the same password as above.
2. 4nter the ollowing command to start the new resource;
crm resource start data2vol
In the crmmon terminal window you should see the new resource listed as started
>. In the crmmon terminal window, press Ctrl+Cto to close the crmmon utility
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
-
7/24/2019 Inst-9211-lab_manual.pdf
68/80
&5 6l'stering with the SL7$&5700
Section G Configure Active8Active Clustered Storage
*his section covers how conigure cluster sae activeEactive storage resources with C7"2in a cluster.
-
7/24/2019 Inst-9211-lab_manual.pdf
69/80
6on%ig're 5ctive/5ctive 6l'stered Storage
71 Create a Logi&al Volue )or C:S2
/es&ri6tion@
In this e#ercise, you will create a ?B logical volume in the vg0 volume group.
b?e&tives@*as) I; Conigure 9@' 9ogical @olumes
S6e&ial 'nstru&tions an( otes@
erorm this e#ercise on the shared storage server.An 9@' volume group named vg0 with at least ?B o ree space must e#ist tosuccessully complete this e#ercise.
Task I: Configure an LVM Logical Volume
1. I not already logged in as the root user, enter su to become root. %hen
prompted or the root userDs password, enter novell
2. !se the ollowing commands to create a logical volume in the vg0 @olume ?roup;
lvcreate -L 8G -n ocfs2 vg0
>. @eriy that the logical volumes were created by entering the ollowing command;
lvs
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
-
7/24/2019 Inst-9211-lab_manual.pdf
70/80
&5 6l'stering with the SL7$&5700
72 Create an iSCS' 0arget with 1 L )or C:S2 )ro theCL'
/es&ri6tion@
In this e#ercise you will use the command line i"C"I tools to create a target containing 19!N on the i"C"I target server .
b?e&tives@*as) I; Create an i"C"I *arget or C7"2
S6e&ial 'nstru&tions an( otes@
erorm this e#ercise on the i"C"I target server machine 5most li)ely storage1: as directed.8ou must have an 9@' volume group named vg0 that contains at least 1 logical volumenamed ocs2 to perorm this e#ercise.
0ask '@ Create an iSCS' 0arget )or C:S2
1. In the te#t editor o your choice, open the8etc8ietdconfile to be edited 5as the
root user:.
2. At the end o the ile, add the ollowing lines;
Target iBn21-3co&e#a&)le9ocfs2
Lun Pat%@8dev8vg8ocfs2$T()e@fileio$ScsiId@ocfs2-
>. "ave the ile and close the te#t editor
$. 3estart the i"C"I target daemon by entering the ollowing command;
rciscsitarget restart
,End of E#ercise
60 Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
71/80
6on%ig're 5ctive/5ctive 6l'stered Storage
7! /is&over 0argets with an iSCS' 'nitiator )ro the CL'
/es&ri6tion@
In this e#ercise you will use the C9I tools to discover targets with an i"C"I initiator.
b?e&tives@*as) I; Conigure the i"C"I Initiator =aemon*as) II; =iscover and 9og Into i"C"I *argets
S6e&ial 'nstru&tions an( otes@
8ou must have at least one target already conigured on the target server to complete thise#ercise.
8ou will need the I address o the i"C"I *arget "erver.TARGET_LAN_IPG TARGET_SAN1_IPGTARGET_SAN2_IPGTARGET_DRBD_IPGTARGET_NAMEG
0ask '@ /is&over an( Log 'nto iSCS' 0argets
1. n Node1, open a terminal window and i not already logged in as the root user,
enter su to become root. %hen prompted or the root userDs password, enter
novell
2. 4nter the ollowing command to discover th targets on an i"C"I target server;
iscsiadm -m discovery -t st -p TARGET_SAN1_IP
>. 4nter the ollowing command to delete the unneeded portals to the target on the
target server rom the i"C"I initiatorDs 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
$. 4nter the ollowing command to list the discovered targets;iscsiadm -m node
8ou should see the target5s: available on the target server
&. 4nter the ollowing command to log into the discovered targets;
iscsiadm -m node -L all
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
61
-
7/24/2019 Inst-9211-lab_manual.pdf
72/80
&5 6l'stering with the SL7$&5700
-
7/24/2019 Inst-9211-lab_manual.pdf
73/80
6on%ig're 5ctive/5ctive 6l'stered Storage
73 Create an C:S2 :ile Syste on a SA VolueIn this e#ercise you will create an C7"2 ile system on a "AN volume.
b?e&tives@*as) I; Create an C7"2 7ile "ystem on a "AN @olume
S6e&ial 'nstru&tions an( otes@
erorm the ollowing 9ab on only one o the cluster nodes..!se the ollowing values in this e#ercise;DEVICEGMOUNT_POINTG
0ask '@ Create an C:S2 :ile Syste on a SA Volue1. n one o the cluster nodes, ormat the 9@' with the C7"2 ile system;
mkfs.ocfs2 DEVICE
A7"I"5; Beore you perorm this step, i you have the "B= "*NI*-daemon conigured and it is using the watchdog device, because o the limitationso the lab environment, you may need to disable the watchdog device and stop the"B= cluster resource to prevent the cluster node5s: rom rebooting unintentionallydue to temporary lac) o "AN communication.
2. 4nter the ollowing command to create the mount point directory or the C7"2
volume;
mkdir -p MOUNT_POINT
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
6>
-
7/24/2019 Inst-9211-lab_manual.pdf
74/80
&5 6l'stering with the SL7$&5700
7* Con)igure a Clone 4esour&e 8rou6 )or /L"$ CLV"/an( 2C. )ro the CL'
In this e#ercise, you conigure a cloned resource group or the =9', c9@' daemon, and2CB resources using the crm command line.
b?e&tives@*as) I; 4dit the lvm.con 7ile*as) II; Conigure a Cloned 3esource ?roup*as) III; Activate the Base "torage Cloned 3esource ?roup
S6e&ial 'nstru&tions an( otes@
5none:
0ask '@ E(it the lv&on) :ile
1. In the te#t editor o your choice, open the8etc8lv&8lv&confile to be edited.
2. 7ind the loc;ingt()eparameter in the global JK section and change the 1 to a > as
ollows;
loc;ingt()e @ /
>. "ave the ile and close the te#t editor
$. Copy the EetcElvmElvm.con ile to the other cluster nodes;
scp /etc/lvm/lvm.conf NODE2:/etc/lvm/
3epeat this command or each cluster node
0ask ''@ Con)igure a Clone( 4esour&e 8rou6
1. I not already logged in as the root user, enter su to become root. %hen
prompted or the root userDs password, enter novell
2. 4nter the ollowing command to open the crm C9I in conigure mode;
crm configure
8ou should now be at a cr&,liveconfigure?prompt
>. 4nter the ollowing commands to create a primitive resource or dlm, clvmd ando2cb;
property stonith-enabled=false
commit
primitive dlm ocf:pacemaker:controld \
6$ Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
75/80
6on%ig're 5ctive/5ctive 6l'stered 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=20group base_strg_grp dlm clvm o2cb
clone base_strg_clone base_strg_grp meta
interleave=true
commit
quit
$. @iew the resource state rom the command line by entering the ollowing
command;
crm_mon -ri 1
8ou should see the new cloned resource group listed along with its state
0ask '''@ A&tivate the .ase Storage Clone( 4esour&e8rou6
1. pen another terminal window. I not already logged in as the root user, use su
to become root using the same password as above.
2. 4nter the ollowing command to start the new clone resource;
crm resource start base_strg_clone
In the crmmon terminal window you should see the new cloned resource group
listed as started
>. In the crmmon terminal window, press Ctrl+Cto to close the crmmon utility
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
6&
-
7/24/2019 Inst-9211-lab_manual.pdf
76/80
&5 6l'stering with the SL7$&5700
7+ Con)igure a C:S2 Volue Clone 4esour&e )ro theCL'
In this e#ercise, you conigure an C7"2 volume to be a cluster managed clone resourceusing the crm command line.
b?e&tives@*as) I; Conigure an C7"2 @olume 3esource*as) II; Activate the C7"2 @olume 3esource
S6e&ial 'nstru&tions an( otes@
*his is a special instruction needed to complete the e#ercise.DEVICEGDIRECTORYG
0ask '@ Con)igure an C:S2 Volue 4esour&e
1. I not already logged in as the root user, enter su to become root. %hen
prompted or the root userDs password, enter novell
2. 4nter the ollowing command to open the crm C9I in conigure mode;
crm configure
8ou should now be at a cr&,liveconfigure?prompt
>. 4nter the ollowing commands to create a primitive resource or NA'4
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
$. @iew the resource state rom the command line by entering the ollowing
command;
crm_mon -ri 18ou should see the new clone resource listed along with its state
0ask ''@ A&tivate the C:S2 Volue 4esour&e
1. pen another terminal window. I not already logged in as the root user, use su
to become root using the same password as above.
6< Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
77/80
6on%ig're 5ctive/5ctive 6l'stered Storage
2. 4nter the ollowing command to start the new clone resource;
crm resource start ocfs2vol
In the crmmon terminal window you should see the new clone resource listed as
started
>. In the crmmon terminal window, press Ctrl+Cto to close the crmmon utility
,End of E#ercise
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
66
-
7/24/2019 Inst-9211-lab_manual.pdf
78/80
&5 6l'stering with the SL7$&5700
7, Con)igure an r(er Constraint )or the .ase StorageClone < C:S2
In this e#ercise, you conigure an order constraint using the crm command line.
b?e&tives@*as) I; Conigure an rder Constraint
S6e&ial 'nstru&tions an( otes@
5none:
0ask '@ Con)igure an r(er Constraint
1. I not already logged in as the root user, enter su to become root. %hen
prompted or the root userDs password, enter novell
2. 4nter the ollowing command to open the crm C9I in conigure mode;
crm configure
8ou should now be at a cr&,liveconfigure?prompt
>. 4nter the ollowing commands to create an order constraint or -A"I and the
C7"2 volume;
order OCFS2_after_base_strg inf: base_strg_clone
ocfs2vol_clone
commit
$. %hile still at the crm5live:conigureL prompt, enter the ollowing command to see
the new order constraint;
show
8ou should see the new order constraint. 58ou might need to arrow down to see the
constraint i you have a lot o resources. ress Bto close the built(in pager i you
are not returned to the crm prompt:
&. 4nter the ollowing command at the crm5live:conigureL prompt to e#it the crm
C9I;
quit
8ou should now be bac) at a shell prompt
,End of E#ercise
6 Copying all or part of this manual, or distributing such copies, is strictly prohibited.To report suspected copying, please call 1-800-PIRT!"
@ersion 1
-
7/24/2019 Inst-9211-lab_manual.pdf
79/80
6on%ig're 5ctive/5ctive 6l'stered Storage
@ersion 1 Copying all or part of this manual, or distributing such copies, is strictlyprohibited. To report suspected copying, please call 1-800-PIRT!"
6
-
7/24/2019 Inst-9211-lab_manual.pdf
80/80
&5 6l'stering with the SL7$&5700