Creating HORCM Configuration File in Unix Systems

8
Description : Creating the horcm.conf in UNIX Systems Platform : Hitachi Model : AMS 2100/2300/2500 Category : Configuration Problem : Creating the horcm.conf file Prerequisites: CCI Software installed in both Production and DR Server’s. Host Platform (AIX, Solaris, Linux, HP_UX, IRIX, Windows NT) AMS Array with True Copy License Installed Storage Navigator Modular 2 (For Mapping Command Device and Creating True Copy Path) Command device (1Gb LUNS in both the Storage Mapped to the Host) Two True Copy Paths Must be established (Path from Production to DR and DR to Production) Procedure for creating the configuration definition files manually on UNIX Platforms : Step 1: Copy the sample horcm.conf file from /HORCM/usr/bin directory to /etc directory Step 2: Open the configuration definition file (/etc/horcm.conf) and Set the parameters for HORCM_MON and HORCM_CMD, save the file. Step 3: Start the HORCM using the horcmstart.sh Script. Step 4: Execute the raidscan command and write down the target IDs displayed in the execution result. Step 5: Shutdown the HORCM using the horcmshutdown.sh Script. Step 6: Open the configuration definition file (/etc/horcm.conf) and set the target ID based on the output from step 4 above for the HORCM_DEV parameter. Step 7: Set the HORCM_INST parameter, and then save the configuration definition file. Step 8: Start the instances and issue cci commands Output: Setting up HORCM Configuration Definition Files Step 1: Copy the Sample horcm.conf file from /HORCM/usr/bin to /etc/horcmX.conf In the Primary server copy the horcm.conf as horcm0.conf #cp –p /HORCM/usr/bin/horcm.conf /etc/horcm0.conf In the Secondary server copy the horcm.conf as horcm1.conf #cp –p /HORCM/usr/bin/horcm.conf /etc/horcm1.conf Open the configuration definition file and make entries HORCM_MON and HORCM_CMD

description

Configuring HORCM

Transcript of Creating HORCM Configuration File in Unix Systems

Page 1: Creating HORCM Configuration File in Unix Systems

Description : Creating the horcm.conf in UNIX Systems

Platform : Hitachi

Model : AMS 2100/2300/2500

Category : Configuration

Problem : Creating the horcm.conf file

Prerequisites:

CCI Software installed in both Production and DR Server’s.

Host Platform (AIX, Solaris, Linux, HP_UX, IRIX, Windows NT)

AMS Array with True Copy License Installed

Storage Navigator Modular 2 (For Mapping Command Device and Creating True Copy Path)

Command device (1Gb LUNS in both the Storage Mapped to the Host)

Two True Copy Paths Must be established (Path from Production to DR and DR to Production)

Procedure for creating the configuration definition files manually on UNIX Platforms :

Step 1: Copy the sample horcm.conf file from /HORCM/usr/bin directory to /etc directory

Step 2: Open the configuration definition file (/etc/horcm.conf) and Set the parameters for

HORCM_MON and HORCM_CMD, save the file.

Step 3: Start the HORCM using the horcmstart.sh Script.

Step 4: Execute the raidscan command and write down the target IDs displayed in the execution result.

Step 5: Shutdown the HORCM using the horcmshutdown.sh Script.

Step 6: Open the configuration definition file (/etc/horcm.conf) and set the target ID based on the

output from step 4 above for the HORCM_DEV parameter.

Step 7: Set the HORCM_INST parameter, and then save the configuration definition file.

Step 8: Start the instances and issue cci commands

Output: Setting up HORCM Configuration Definition Files Step 1: Copy the Sample horcm.conf file from /HORCM/usr/bin to /etc/horcmX.conf In the Primary server copy the horcm.conf as horcm0.conf #cp –p /HORCM/usr/bin/horcm.conf /etc/horcm0.conf In the Secondary server copy the horcm.conf as horcm1.conf #cp –p /HORCM/usr/bin/horcm.conf /etc/horcm1.conf Open the configuration definition file and make entries HORCM_MON and HORCM_CMD

Page 2: Creating HORCM Configuration File in Unix Systems

Note: The Sample horcm.conf files will be fully commented with description for each entry. Before making entry in the configuration file need to have some details mentioned below

Primary and Secondary Server Hostname or IP address

Command device name in the Host Step 2: Identifying the Command Device in UNIX Machines. For HP-UX®: HORCM_CMD of HOSTA = /dev/rdsk/c0t0d0 HORCM_CMD of HOSTB = /dev/rdsk/c1t0d0 For Solaris™: HORCM_CMD of HOSTA = /dev/rdsk/c0t0d0s2 HORCM_CMD of HOSTB = /dev/rdsk/c1t0d0s2 You can use the command device without a label in the format command. For AIX®: HORCM_CMD of HOSTA = /dev/rhdiskX HORCM_CMD of HOSTB = /dev/rhdiskX Where X = device number created automatically by AIX®. For Linux®: HORCM_CMD of HOSTA = /dev/sdX HORCM_CMD of HOSTB = /dev/sdX Where X = device number assigned by Linux®. Note: A Command Device is defined using system raw device name Step 3: Need to identify the Primary Server and Secondary Server Hostname or IP address.

HOST A HORCM_MON

File name Horcm0.conf

Ip Address 193.1.1.190

Service horcm0

Poll 12000

Timeout 3000

HOST B HORCM_MON

File Name Horcm1.conf

Ip Address 193.1.1.177

Service horcm1

Poll 12000

Timeout 3000

HOST A HORCM_CMD

Page 3: Creating HORCM Configuration File in Unix Systems

dev_name /dev/rhdisk3

HOST B HORCM_CMD

dev_name /dev/rhdisk10

Step 4: Editing the configuration files in primary and secondary servers In the Primary Server edit the horcm0.conf located inside the /etc directory #Primary Server HORCM Configuration File HORCM_MON #ip_address service poll(10ms) timeout(10ms) 193.1.1.190 horcm0 12000 3000 HORCM_CMD #dev_name /dev/rhdisk13 #HORCM_DEV #dev_group dev_name port# TargetID LU# MU# #HORCM_INST #dev_group ip_address service In the Secondary Server edit the horcm1.conf located inside /etc directory #Secondary Server HORCM Configuration File HORCM_MON #ip_address service poll(10ms) timeout(10ms) 193.1.1.177 horcm1 12000 3000 HORCM_CMD #dev_name /dev/rhdisk10 #HORCM_DEV #dev_group dev_name port# TargetID LU# MU# #HORCM_INST #dev_group ip_address service Note: The last two sections in both files have been commented out. If you have any device or group entries in these two sections comment them out before you proceed Step 5: Setting up Operating System Environment

Page 4: Creating HORCM Configuration File in Unix Systems

Edit the /etc/services file in both the Primary and Secondary Servers and the entries below for two horcm services . horcm0 11000/udp #Source Server (PVOL) horcm1 11001/udp #Destination Server (SVOL) Step 6: For the horcm instance to communicate set the HORCMINST in both the servers bash-3.0# HORCMINST=0; export HORCMINST //on Primary Server bash-3.0# HORCMINST=1; export HORCMINST //on Secondary Server Check for the existence of this variable in both the servers by using the command: bash-3.0#set | grep –i horc* Step 7: Start the Instances On the primary site change to the /HORCM/usr/bin folder and run the horcmstart.sh script bash-3.2# cd /HORCM/usr/bin/ bash-3.2# ./horcmstart.sh 0 starting HORCM inst 0 HORCM inst 0 starts successfully. This will start the horcm0 instance. On the secondary site change to the /HORCM/usr/bin folder and run the horcmstart.sh script bash-3.2# cd /HORCM/usr/bin/ bash-3.2# ./horcmstart.sh 1 starting HORCM inst 1 HORCM inst 1 starts successfully. This will start the horcm1 instance. If you do not get a successful start you can troubleshoot the error bash-3.0#tail –20 /HORCM/log0/curlog/*.log This will allow you to view the end of the error message log. Step 8: Determine the Absolute LUN Numbers After a successful start to get the target ID and abslute LUN numbers use the below mentioned command bash-3.2# raidscan -p cl1-a -fx PORT# /ALPA/C,TID#, LU#.Num(LDEV#....)...P/S, Status,Fence, LDEV#,P-Seq#,P-LDEV#

Page 5: Creating HORCM Configuration File in Unix Systems

CL1-A /ef/ 0, 0, 0.1(0).............P-VOL PAIR NEVER 0, 83040466 0 CL1-A /ef/ 0, 0, 1.1(1).............P-VOL PAIR NEVER 1, 83040466 1 CL1-A /ef/ 0, 0, 2.1(2).............P-VOL PAIR NEVER 2, 83040466 2 CL1-A /ef/ 0, 0, 3.1(3).............P-VOL PAIR NEVER 3, 83040466 3 CL1-A /ef/ 0, 0, 4.1(4).............P-VOL PAIR NEVER 4, 83040466 4 CL1-A /ef/ 0, 0, 5.1(5).............P-VOL PAIR NEVER 5, 83040466 5 CL1-A /ef/ 0, 0, 6.1(6).............P-VOL PAIR NEVER 6, 83040466 6 CL1-A /ef/ 0, 0, 7.1(7).............P-VOL PAIR NEVER 7, 83040466 7 bash-3.2# raidscan -p cl2-a -fx PORT# /ALPA/C,TID#, LU#.Num(LDEV#....)...P/S, Status,Fence, LDEV#,P-Seq#,P-LDEV# CL1-A /ef/ 0, 0, 0.1(0).............P-VOL PAIR NEVER 0, 83040466 0 CL1-A /ef/ 0, 0, 1.1(1).............P-VOL PAIR NEVER 1, 83040466 1 CL1-A /ef/ 0, 0, 2.1(2).............P-VOL PAIR NEVER 2, 83040466 2 CL1-A /ef/ 0, 0, 3.1(3).............P-VOL PAIR NEVER 3, 83040466 3 CL1-A /ef/ 0, 0, 4.1(4).............P-VOL PAIR NEVER 4, 83040466 4 CL1-A /ef/ 0, 0, 5.1(5).............P-VOL PAIR NEVER 5, 83040466 5 CL1-A /ef/ 0, 0, 6.1(6).............P-VOL PAIR NEVER 6, 83040466 6 CL1-A /ef/ 0, 0, 7.1(7).............P-VOL PAIR NEVER 7, 83040466 7 bash-3.2# raidscan -p cl2-b -fx bash-3.2# raidscan -p cl1-b -fx Note: The Raidscan command will show the LUNS only if it’s mapped through that port. In the above example LUNS are mapped only through 0A and 1A cl1-a – Controller 0 Port A cl1-b – Controller 0 Port B cl2-a – Controller 1 Port A cl2-b – Controller 1 Port B This needs to be executed individually on both the primary and secondary management servers. Record the absolute LUN numbers and Target id of the LUNS Step 9: Shut Down the Instances in both Primary and Secondary Servers Change to the /HORCM/usr/bin folder and type the below mentioned Commands bash-3.0#./horcmshutdown.sh 0 //on the primary subsystem bash-3.0#./horcmshutdown.sh 1 //on the secondary subsystem This Script will shutdown the instances in both the Hosts Step 10: Edit the horcm files with Absolute LUN Numbers and Target ID’s in both Primary and Secondary Servers

Primary site Completed horcm1.conf

Page 6: Creating HORCM Configuration File in Unix Systems

#/************************* For HORCM_MON *************************************/ HORCM_MON #ip_address service poll(10ms) timeout(10ms) 193.1.1.190 horcm0 12000 3000 #/************************** For HORCM_CMD ************************************/ HORCM_CMD #dev_name /dev/rhdisk13 #/************************** For HORCM_DEV ************************************/ #HORCM_DEV #dev_group dev_name port# TargetID LU# MU# VG01 oracle CL1-A 1 0 VG01 datadisk1 CL1-A 1 1 VG01 datadisk2 CL1-A 1 2 VG01 datadisk3 CL1-A 1 3 VG01 datadisk4 CL1-A 1 4 VG01 datadisk5 CL1-A 1 5 VG01 arch CL1-A 1 6 VG01 ias CL1-A 1 7 #/************************* For HORCM_INST ************************************/ #HORCM_INST #dev_group ip_address service VG01 193.1.1.177 horcm1

Secondary site Completed horcm1.conf #/************************* For HORCM_MON *************************************/ HORCM_MON #ip_address service poll(10ms) timeout(10ms) 193.1.1.177 horcm1 12000 3000 #/************************** For HORCM_CMD ************************************/ HORCM_CMD #dev_name /dev/rhdisk10 #/************************** For HORCM_DEV ************************************/ #HORCM_DEV #dev_group dev_name port# TargetID LU# MU# VG01 oracle CL1-A 1 0 VG01 datadisk1 CL1-A 1 1 VG01 datadisk2 CL1-A 1 2 VG01 datadisk3 CL1-A 1 3 VG01 datadisk4 CL1-A 1 4 VG01 datadisk5 CL1-A 1 5

Page 7: Creating HORCM Configuration File in Unix Systems

VG01 arch CL1-A 1 6 VG01 ias CL1-A 1 7 #/************************* For HORCM_INST ************************************/ #HORCM_INST #dev_group ip_address service VG01 193.1.1.190 horcm0 Note: The dev_name name used in the above example is the name of the mount point. It can be anything like VG01_01, LUN01, Disk1 etc. But it should be unique for each LUN. Step 11: Restart the HORCM Instances in both Primary and Secondary Servers Change to the /HORCM/usr/bin folder and type the below mentioned Commands bash-3.0#./horcmstart.sh 0 //on the primary server bash-3.0#./horcmstart.sh 1 //on the secondary server Step 12: Issue CCI Commands Once both instances start successfully, the below mentioned commands and check the status. bash-3.0#pairdisplay –g VG01 //Display Pair Status bash-3.0#pairsplit -g VG01 //Splits the Pair bash-3.0#pairresync -g VG01 -c 10 //Resync the Pair Sample Outputs Of CCI commands from Production Server bash-3.2# pairdisplay -g VG01 Group PairVol(L/R) (Port#,TID, LU),Seq#, LDEV#.P/S,Status,Fence,Seq#,P-LDEV# M VG01 oracle(L) (CL1-A , 0, 0)83040454 0.P-VOL PAIR NEVER ,83040466 0 - VG01 oracle(R) (CL1-A , 0, 0)83040466 0.S-VOL PAIR NEVER ,----- 0 - VG01 datadisk1(L) (CL1-A , 0, 1)83040454 1.P-VOL PAIR NEVER ,83040466 1 - VG01 datadisk1(R) (CL1-A , 0, 1)83040466 1.S-VOL PAIR NEVER ,----- 1 - VG01 datadisk2(L) (CL1-A , 0, 2)83040454 2.P-VOL PAIR NEVER ,83040466 2 - VG01 datadisk2(R) (CL1-A , 0, 2)83040466 2.S-VOL PAIR NEVER ,----- 2 - VG01 datadisk3(L) (CL1-A , 0, 3)83040454 3.P-VOL PAIR NEVER ,83040466 3 - VG01 datadisk3(R) (CL1-A , 0, 3)83040466 3.S-VOL PAIR NEVER ,----- 3 - VG01 datadisk4(L) (CL1-A , 0, 4)83040454 4.P-VOL PAIR NEVER ,83040466 4 - VG01 datadisk4(R) (CL1-A , 0, 4)83040466 4.S-VOL PAIR NEVER ,----- 4 - VG01 datadisk5(L) (CL1-A , 0, 5)83040454 5.P-VOL PAIR NEVER ,83040466 5 - VG01 datadisk5(R) (CL1-A , 0, 5)83040466 5.S-VOL PAIR NEVER ,----- 5 - VG01 arch(L) (CL1-A , 0, 6)83040454 6.P-VOL PAIR NEVER ,83040466 6 - VG01 arch(R) (CL1-A , 0, 6)83040466 6.S-VOL PAIR NEVER ,----- 6 - VG01 ias(L) (CL1-A , 0, 7)83040454 7.P-VOL PAIR NEVER ,83040466 7 - VG01 ias(R) (CL1-A , 0, 7)83040466 7.S-VOL PAIR NEVER ,----- 7 - bash-3.2# pairsplit -g VG01

Page 8: Creating HORCM Configuration File in Unix Systems

bash-3.2# pairdisplay -g VG01 Group PairVol(L/R) (Port#,TID, LU),Seq#, LDEV#.P/S,Status,Fence,Seq#,P-LDEV# M VG01 oracle(L) (CL1-A , 0, 0)83040454 0.P-VOL PSUS NEVER ,83040466 0 - VG01 oracle(R) (CL1-A , 0, 0)83040466 0.S-VOL SSUS NEVER ,----- 0 - VG01 datadisk1(L) (CL1-A , 0, 1)83040454 1.P-VOL PSUS NEVER ,83040466 1 - VG01 datadisk1(R) (CL1-A , 0, 1)83040466 1.S-VOL SSUS NEVER ,----- 1 - VG01 datadisk2(L) (CL1-A , 0, 2)83040454 2.P-VOL PSUS NEVER ,83040466 2 - VG01 datadisk2(R) (CL1-A , 0, 2)83040466 2.S-VOL SSUS NEVER ,----- 2 - VG01 datadisk3(L) (CL1-A , 0, 3)83040454 3.P-VOL PSUS NEVER ,83040466 3 - VG01 datadisk3(R) (CL1-A , 0, 3)83040466 3.S-VOL SSUS NEVER ,----- 3 - VG01 datadisk4(L) (CL1-A , 0, 4)83040454 4.P-VOL PSUS NEVER ,83040466 4 - VG01 datadisk4(R) (CL1-A , 0, 4)83040466 4.S-VOL SSUS NEVER ,----- 4 - VG01 datadisk5(L) (CL1-A , 0, 5)83040454 5.P-VOL PSUS NEVER ,83040466 5 - VG01 datadisk5(R) (CL1-A , 0, 5)83040466 5.S-VOL SSUS NEVER ,----- 5 - VG01 arch(L) (CL1-A , 0, 6)83040454 6.P-VOL PSUS NEVER ,83040466 6 - VG01 arch(R) (CL1-A , 0, 6)83040466 6.S-VOL SSUS NEVER ,----- 6 - VG01 ias(L) (CL1-A , 0, 7)83040454 7.P-VOL PSUS NEVER ,83040466 7 - VG01 ias(R) (CL1-A , 0, 7)83040466 7.S-VOL SSUS NEVER ,----- 7 - bash-3.2# pairvolchk -g VG01 pairvolchk : Volstat is P-VOL.[status = PAIR fence = NEVER MINAP = 2 ] bash-3.2# pairresync -g VG01 -c 10 bash-3.2# pairdisplay -g VG01 Group PairVol(L/R) (Port#,TID, LU),Seq#, LDEV#.P/S,Status,Fence,Seq#,P-LDEV# M VG01 oracle(L) (CL1-A , 0, 0)83040454 0.P-VOL PAIR NEVER ,83040466 0 - VG01 oracle(R) (CL1-A , 0, 0)83040466 0.S-VOL PAIR NEVER ,----- 0 - VG01 datadisk1(L) (CL1-A , 0, 1)83040454 1.P-VOL PAIR NEVER ,83040466 1 - VG01 datadisk1(R) (CL1-A , 0, 1)83040466 1.S-VOL PAIR NEVER ,----- 1 - VG01 datadisk2(L) (CL1-A , 0, 2)83040454 2.P-VOL PAIR NEVER ,83040466 2 - VG01 datadisk2(R) (CL1-A , 0, 2)83040466 2.S-VOL PAIR NEVER ,----- 2 - VG01 datadisk3(L) (CL1-A , 0, 3)83040454 3.P-VOL PAIR NEVER ,83040466 3 - VG01 datadisk3(R) (CL1-A , 0, 3)83040466 3.S-VOL PAIR NEVER ,----- 3 - VG01 datadisk4(L) (CL1-A , 0, 4)83040454 4.P-VOL PAIR NEVER ,83040466 4 - VG01 datadisk4(R) (CL1-A , 0, 4)83040466 4.S-VOL PAIR NEVER ,----- 4 - VG01 datadisk5(L) (CL1-A , 0, 5)83040454 5.P-VOL PAIR NEVER ,83040466 5 - VG01 datadisk5(R) (CL1-A , 0, 5)83040466 5.S-VOL PAIR NEVER ,----- 5 - VG01 arch(L) (CL1-A , 0, 6)83040454 6.P-VOL PAIR NEVER ,83040466 6 - VG01 arch(R) (CL1-A , 0, 6)83040466 6.S-VOL PAIR NEVER ,----- 6 - VG01 ias(L) (CL1-A , 0, 7)83040454 7.P-VOL PAIR NEVER ,83040466 7 - VG01 ias(R) (CL1-A , 0, 7)83040466 7.S-VOL PAIR NEVER ,----- 7 -