How to configure DB2 HADR Agent in Veritas Cluster Server.
book
Article ID: 100001843
calendar_today
Updated On:
Resolution
Summary :
The Veritas agent for IBM DB2HADR providesfail over support and recovery. The agent provides this support in anenvironment that uses DB2 HADR to replicate data between DB2 databases. Itmonitors and manages the state of a replicated DB2 database that runs on VCSnodes. For a system where the DB2HADRresource is online, the agent replicatesthe DB2 database transactions from a primary to a standby databaseserver.
It isrecommended to use DB2 HADR Agent in Veritas Cluster Serverwith GCO(Global Cluster Option).
You need to create 2 Service Groups here.
1) Service Group with DB2 database and DB2 HADR Link operation
2)Service Group with DB2 HADR Switch operation only.
Procedure :
1)Add the Service Group as follows..
#hagrp -add DB2_HADR_SWITCH;
#hagrp-modify DB2_HADR_SWITCH SystemList sys1 sys2
#hagrp -modify DB2_HADR_SWITCHAutoStartList sys1
#hares -addTest_Db2HADR_SWITCH Db2HADR DB2_HADR_SWITCH;
#hares -modifyDb2HADR_SWITCH Critical 0
#hares -modify Db2HADR_SWITCHDb2dbRes db2_TEST
#hares -modify Db2HADR_SWITCHDBName DB1
#hares -modify Db2HADR_SWITCH HADROper SWITCH
2)Add the other service Group for DB2 Link
#hagrp -addDB2_HADR_LINK
#hagrp -modify DB2_HADR_LINK SystemList sys1 sys2
#hagrp-modify DB2_HADR_LINK AutoStartList sys1
Add the Resource with typeDB2HADR and Attributes.
#hares -add Test_Db2HADR_LINKDb2HADR DB2_HADR_LINK;
#hares -modify Test_Db2HADR_LINKCritical 0
#hares -modify Test_Db2HADR_LINKDb2dbRes db2_TEST
#hares -modify Test_Db2HADR_LINKDBName DB1
#hares -modify Test_Db2HADR_LINK HADROper LINK
NowAdd the DB2 Database Resource in the same service group..
#hares -adddb2_TEST Db2udb DB2_HADR_LINK;
#hares -modify db2_TESTCritical 0
#hares -modify db2_TEST Enabled 0
#hares -modifydb2_TEST DB2InstOwner db2inst1
#hares -modify db2_TESTDB2InstHome /db2
#hares -modify db2_TEST DatabaseName DB1
NowAdd other Infrastructure resources in the same Service Group.
For IPResource :
#hares -add IP_db2 IP DB2_HADR_LINK
#hares -modify IP_db2Address 10.154.146.178 (here 10.154.146.178 is the Virtual IP)
#hares-modify IP_db2 Device ce0 (herece0 is the NIC Device)
For NIC Resource :
#hares -add NIC_db2 NICDB2_HADR_LINK
#hares -modify NIC_db2 Devicece0 (here ce0 is the NICDevice. This NIC is separate NIC and not used anywhere)
For VolumeResource :
#hares -add db2vol Volume DB2_HADR_LINK
#hares -modifydb2Vol Volume testvol (here testvol is the volume for DB2 Home)
#hares-modify db2Vol DiskGroup testdg (heretestdg is the Diskgroup for volume)
For Diskgroup Resource:
#hares-add db2dg DiskGroup DB2_HADR_LINK
#hares -modify db2DG DiskGrouptestdg (here testdg is the Diskgroupfor volume)
#hares -modify db2DG DiskGroupType private
For MountResource :
#hares -add db2MOUNT Mount DB2_HADR_LINK
#hares -modifydb2MOUNT BlockDevice /dev/vx/dsk/testdg/testvol
#hares -modify db2MOUNTFSType vxfs
#hares -modify db2MOUNT FsckOpt "%-y"
#hares -modify db2MOUNTMountPoint /db2
3) Now add the Resource Dependency..
#hares-link DB2_HADR_LINK db2_TEST
#hares -link db2_TEST db2MOUNT
#hares -linkdb2_TEST IP_db2
#hares -link IP_db2 NIC_db2
#hares -link db2MOUNTdb2vol
#hares -link db2vol db2dg
4) Now add the service Groupdependency :
#hagrp -link DB2_HADR_SWITCH DB2_HADR_LINK online localhard
5) Now Enable all the Resources in the ServiceGroups.
#hagrp -enableresources DB2_HADR_LINK
#hagrp -enableresourcesDB2_HADR_SWITCH
6) Online the Service Groups on eithernode.
#hagrp -online DB2_HADR_LINK -sys sys1
#hagrp -onlineDB2_HADR_SWITCH -sys sys1
Issue/Introduction
How to configure DB2 HADR Agent in Veritas Cluster Server.
Was this article helpful?
thumb_up
Yes
thumb_down
No