-
IBM AIX HACMP V6 구축 하는 방법[3]System of Infra/Unix System 2021. 4. 3. 00:49728x90반응형
IBM AIX HACMP V6 구축하는 방법[3]
[root@test_svr1:/]# smit hacmp Initialization and Standard Configuration Extended Configuration--->선택 System Management (C-SPOC) Problem Determination Tools Can't find what you are looking for ? Not sure where to start ?
-> Extended Configuration의 항목을 선택합니다.
Discover HACMP-related Information from Configured Nodes Extended Topology Configuration Extended Resource Configuration Extended Cluster Services Settings Extended Cluster Event Configuration Extended Performance Tuning Parameters Security and Users Configuration Snapshot Configuration Export Definition File for Online Planning Worksheets Import Cluster Configuration from Online Planning Worksheets File Extended Verification and Synchronization--->선택 HACMP Cluster Test Tool
-> Extended Verification and Synchronization의 항목을 선택하여 HACMP를 기동 하기 전에 양쪽 노드의 SYNC를 맞춰 주도록 합니다.
* Verify, Synchronize or Both[Both] * Automatically correct errors found during[Yes] verification? * Force synchronization if verification fails? [No] * Verify changes only?[No] * Logging[Standard] Command: OK stdout: yes stderr: no Before command completion, additional instructions may appear below. [TOP] Verification to be performed on the following: Cluster Topology Cluster Resources Verification will automatically correct verification errors. Retrieving data from available cluster nodes.This could take a few minutes. Start data collection on node test_node1 Start data collection on node test_node2 Collector on node test_node2 completed Collector on node test_node1 completed Data collection complete Verifying Cluster Topology... Completed 10 percent of the verification checks For nodes with a single Network Interface Card per logical network configured, it is recommended to include the file '/usr/es/sbin/cluster/netmon.cf' with a "pingable" IP address as described in the 'HACMP Planning Guide'. WARNING: File 'netmon.cf' is missing or empty on the following nodes: test_node1 test_node2 Completed 20 percent of the verification checks Completed 30 percent of the verification checks Completed 40 percent of the verification checks Verifying Cluster Resources... Completed 50 percent of the verification checks Completed 60 percent of the verification checks ERROR: The HACMP timestamp file for shared volume group: HACMPVG is inconsistent with the time stamp in the VGDA for the following nodes: test_node1 Starting Corrective Action: cl_resource_modify_vg_time_stamp. <01> Updating volume group definitions of shared VG: HACMPVG participating in resource group HACMPRG on nod e: test_node1 so that it will be consistent across all the nodes from this resource group: PASS Completed 70 percent of the verification checks Completed 80 percent of the verification checks ...(생략)
-> 양쪽 노드인 test_node1와 test_node2의 현재 HACMPVG로 구성되어 있는 볼륨 그룹이 SYNC를 맞추고 정합성을 보장할 수 있도록 하였습니다.
간혹 HACMP 구성에서 아이피 변경이라던지 볼륨 추가의 작업들이 있을 경우에는 HA를 오프라인으로 중지하고 작업을 진행한 후 기존과 다른 설정이 되어 있는 작업이면 Extended Verification and Synchronization를 통해서 정합성을 확인 후 HA를 기동시켜주면 됩니다.
[root@test_svr1:/]# smit clstart * Start now, on system restart or bothnow Start Cluster Services on these nodes[test_node1,test_node2]--->선택 * Manage Resource GroupsAutomatically BROADCAST message at startup? false Startup Cluster Information Daemon? false Ignore verification errors? false Automatically correct errors found during Yes cluster start? [root@test_svr2:/var/hacmp/log]# tail -f hacmp.out Warning: There is no cluster found. cllsnode: Error reading configuration cllsif: A flag requires a parameter: i cllsif: A flag requires a parameter: i Warning: There is no cluster found. cllsclstr: No cluster defined cllsclstr: Error reading configuration Warning: There is no cluster found. cllsnode: Error reading configuration cllsif: A flag requires a parameter: i ...(생략) Command: OKstdout: yes stderr: no Before command completion, additional instructions may appear below. [TOP] migcheck[475]: cl_connect() error, nodename=test_node1, rc=-1 migcheck[475]: cl_connect() error, nodename=test_node2, rc=-1 WARNING: A communication error was encountered trying to get the VRMF from remote nodes. Please make sure c lcomd is running Verifying Cluster Configuration Prior to Starting Cluster Services. There are no active cluster nodes to verify against. Verifying node(s): test_node1 test_node2 requested to start WARNING: File 'netmon.cf' is missing or empty on the following nodes: test_node1 test_node2
-> test_svr1에서 기동을 하게 되면 콘솔을 볼 수 없기 때문에 clone session을 열어줘도 되겠지만, 작업환경에서 그러지 못한 경우에는 test_svr2의 2호기에서 tail -f hacmp.out을 통해서 HA가 기동 되는 것을 확인할 수 있습니다.
[root@test_svr1:/]# lspv hdisk000008492ef481bbc rootvg active hdisk100c5c6d7197155b8 None hdisk200c5c6d704818cbb heartbeatvg ...(생략) hdisk10 00c5c6d704818f65 HACMPVG concurrent hdisk11 00c5c6d704818fa3 HACMPVG concurrent hdisk12 00c5c6d7f37cb73c altinst_rootvg [root@test_svr1:/]# clRGinfo -v Cluster Name: TESTHA_cluster Resource Group Name: HACMPRG Startup Policy: Online On Home Node Only Fallover Policy: Fallover To Next Priority Node In The List Fallback Policy: Never Fallback Site Policy: ignore Node Group State test_node1 ONLINE test_node2 OFFLINE
-> 1호기에서 현재 lspv를 통해서 리소스그룹(HACMPRG)에 등록되어 있던 HACMPVG의 hdisk11과 hdisk12의 볼륨 그룹이 concurrent의 형태로 보이게 되고 현재 test_svr1이 active로 설정되어 있으며 test_svr2는 standby로 설정이 되어 있기 때문에 takeover를 하게 되면 서로 ONLINE/OFFLINE가 바뀌게 될 것입니다.
[root@test_svr2:/]# lspv hdisk000008492ef481bbcrootvgactive hdisk100c5c6d719710615None hdisk200c5c6d704818cbbheartbeatvg ...(생략) hdisk10 00c5c6d704818f65HACMPVG concurrent hdisk11 00c5c6d704818fa3HACMPVG concurrent hdisk12 00c5c6d7afc075e0altinst_rootvg [root@test_svr2:/]# clRGinfo -v Cluster Name: TESTHA_cluster Resource Group Name: HACMPRG Startup Policy: Online On Home Node Only Fallover Policy: Fallover To Next Priority Node In The List Fallback Policy: Never Fallback Site Policy: ignore Node Group State test_node1 ONLINE test_node2 OFFLINE
-> 2호기인 root@test_svr2의 노드에서도 현재 오프라인 상태 인것을 확인할 수 있습니다.
[root@test_svr1:/]# lssrc -ls clstrmgrES Current state: ST_STABLE sccsid = "@(#)361.135.6.5 src/43haes/usr/sbin/cluster/hacmprd/main.C, hacmp.pe, 53haes_r610, 1442A_hacmp610 9/11/14 13:15:08" i_local_nodeid 0, i_local_siteid -1, my_handle 1 ml_idx[1]=0 ml_idx[2]=1 There are 0 events on the Ibcast queue There are 0 events on the RM Ibcast queue CLversion: 11 local node vrmf is 6111 cluster fix level is "1" The following timer(s) are currently active: Current DNP values DNP Values for NodeId - 0NodeName - test_node1 PgSpFree = 0PvPctBusy = 0PctTotalTimeIdle = 0.000000 DNP Values for NodeId - 0NodeName - test_node2 PgSpFree = 0PvPctBusy = 0PctTotalTimeIdle = 0.000000
-> 현재 test_svr1의 클러스터의 상태를 확인 할 수 있는데 ST_STABLE의 상태가 HA cluster의 정상적인 상태입니다.
[root@test_svr1:/]# lsvg -l HACMPVG; HACMPVG: LV NAME TYPE LPs PPs PVsLV STATEMOUNT POINT HACMPLV jfs2 10101closed/syncd/HACMPFS loglv00 jfs2log1 1 1closed/syncdN/A
-> 현재 HACMPVG 안에는 HACMPLV를 생성해 두었지만 파일 시스템을 생성 후 마운트가 되지 않았기 때문에 마운트를 해주도록 합니다.(리소스 그룹의 takeover 테스트를 할 경우 파일이 보존되는지 확인하기 위함)
[root@test_svr1:/]# mount HACMPFS [root@test_svr1:/HACMPFS]# mkdir takeovrfile1 [root@test_svr1:/HACMPFS]# mkdir takeovrfile2 [root@test_svr1:/HACMPFS]# mkdir takeovrfile3 [root@test_svr1:/HACMPFS]# ls -al drwxr-xr-x2 root system256 Mar 21 18:11 . drwxr-xr-x 21 root system 4096 Mar 21 18:09 .. -rw-r--r--1 root system0 Mar 21 18:11 takeovrfile1 -rw-r--r--1 root system0 Mar 21 18:11 takeovrfile2 -rw-r--r--1 root system0 Mar 21 18:11 takeovrfile3
-> HACMPFS의 파일시스템을 마운트 한 후에 takeovrfile1, 2, 3의 touch 파일을 생성하여 이 파일을 통해서 테스트를 진행하도록 하겠습니다.
[root@test_svr1:/]# ifconfig -a en3: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.50.1.151 netmask 0xffffff00 broadcast 10.50.1.255 inet 10.50.1.153 netmask 0xffffff00 broadcast 10.50.1.255 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 [root@test_svr2:/]# ifconfig -a en3: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.50.1.152 netmask 0xffffff00 broadcast 10.50.1.255 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
-> 초기 구성시에 test_svr1과 test_svr2의 IP를 제외한 HACMP를 구성하기 위한 서비스 아이피가 현재 1호기에 붙어 있는 것을 확인할 수 있습니다.(서비스 아이피: 10.50.1.153)
[root@test_svr1:/]# smit clstop * Stop now, on system restart or both now Stop Cluster Services on these nodes [test_node1]--->선택 BROADCAST cluster shutdown? true * Select an Action on Resource Groups Move Resource Groups Command: OKstdout: yes stderr: no Before command completion, additional instructions may appear below. test_node1: Mar 21 2021 18:15:46 /usr/es/sbin/cluster/utilities/clstop: called with flags -N -gr test_node1: 0513-004 The Subsystem or Group, clinfoES, is currently inoperative.
-> 노드1호기인 test_svr1의 HA를 오프라인 시키면서 노드 2호기인 test_svr2의 HA로 리소스 그룹이 이동할 수 있도록 진행하겠습니다.
[root@test_svr1:/]# clRGinfo -v Cluster Name: TESTHA_cluster Resource Group Name: HACMPRG Startup Policy: Online On Home Node Only Fallover Policy: Fallover To Next Priority Node In The List Fallback Policy: Never Fallback Site Policy: ignore Node Group State test_node1 OFFLINE test_node2 ONLINE [root@test_svr2:/]# clRGinfo -v Cluster Name: TESTHA_cluster Resource Group Name: HACMPRG Startup Policy: Online On Home Node Only Fallover Policy: Fallover To Next Priority Node In The List Fallback Policy: Never Fallback Site Policy: ignore Node Group State test_node1 OFFLINE test_node2 ONLINE
-> 노드1에서 노드 2로 takeover 한 경우 리소스 그룹이 서비스 아이피를 바라보고 있기 때문에 리소스 그룹에 다운타임 없이 2호기로 넘어간 것을 확인할 수 있습니다. 현재 test_node1의 경우 오프라인이 되었고, test_svr2의 경우 온라인으로 서로 변경이 된 것을 확인할 수 있습니다.
[root@test_svr1:/]# ifconfig -a en3: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.50.1.151 netmask 0xffffff00 broadcast 10.50.1.255 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1 [root@test_svr2:/]# ifconfig -a en3: flags=1e084863,480<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST,GROUPRT,64BIT,CHECKSUM_OFFLOAD(ACTIVE),CHAIN> inet 10.50.1.152 netmask 0xffffff00 broadcast 10.50.1.255 inet 10.50.1.153 netmask 0xffffff00 broadcast 10.50.1.255 tcp_sendspace 262144 tcp_recvspace 262144 rfc1323 1
-> 위에서 본것과 같이 서비스 아이피가 test_svr2로 옮겨진 것을 확인할 수 있습니다. 리소스 그룹이 넘어가면서 2호기에서 마스터로 서비스 아이피를 바라본 것으로 확인할 수 있습니다.
[root@test_svr2:/HACMPFS]# ls -al drwxr-xr-x6 root system256 Mar 21 18:22 . drwxr-xr-x 24 root system 4096 Mar 21 18:15 .. drwxr-xr-x2 root system256 Mar 21 18:22 takeovrfile1 drwxr-xr-x2 root system256 Mar 21 18:22 takeovrfile2 drwxr-xr-x2 root system256 Mar 21 18:22 takeovrfile3 drwxr-xr-x2 root system256 Mar 21 18:09 lost+found
-> 2호기에서 HACMPFS 파일시스템 경로를 보게 되면 1호기에서 생성했던 takeovrfile1,2,3의 파일들이 그대로 남아 있는 것을 확인할 수 있습니다.
[root@test_svr1:/]# lssrc -ls clstrmgrES Current state: ST_INIT sccsid = "@(#)361.135.6.5 src/43haes/usr/sbin/cluster/hacmprd/main.C, hacmp.pe, 53haes_r610, 1442A_hacmp610 9/11/14 13:15:08" [root@test_svr2:/HACMPFS]# lssrc -ls clstrmgrES Current state: ST_STABLE sccsid = "@(#)361.135.6.5 src/43haes/usr/sbin/cluster/hacmprd/main.C, hacmp.pe, 53haes_r610, 1442A_hacmp610 9/11/14 13:15:08"
-> 클러스터의 상태를 보게되면 현재 1호기에서는 HA 클러스터의 기동을 내렸기 때문에 Current state: ST_INIT의 상태로 오프라인 상태인 것을 확인할 수 있고 2호기의 경우는 계속해서 HA 클러스터가 기동 되어 있기 때문에 Current state: ST_STABLE의 상태로 보이게 됩니다.
[root@test_svr1:/]# smit clstart [Entry Fields] * Start now, on system restart or bothnow Start Cluster Services on these nodes[test_node1]--->선택 * Manage Resource GroupsAutomatically BROADCAST message at startup? false Startup Cluster Information Daemon? false Ignore verification errors? false Automatically correct errors found during Yes cluster start? Command: OKstdout: yes stderr: no Before command completion, additional instructions may appear below. [TOP] migcheck[475]: cl_connect() error, nodename=test_node1, rc=-1 migcheck[475]: cl_connect() error, nodename=test_node2, rc=-1 WARNING: A communication error was encountered trying to get the VRMF from remote nodes. Please make sure c lcomd is running Verifying Cluster Configuration Prior to Starting Cluster Services. Verifying node(s): test_node1 against the running node test_node2 WARNING: File 'netmon.cf' is missing or empty on the following nodes: test_node1 test_node2
-> 오프라인으로 되었던 노드1호기의 HA를 다시 기동 해주도록 합니다. test_node1을 선택해서 기동을 시켜주고 이번에는 노드를 죽이지 않고 리소스 그룹만 넘기는 방식으로 진행해보도록 하겠습니다.
[root@test_svr1:/]# lssrc -ls clstrmgrES Current state: ST_STABLE sccsid = "@(#)361.135.6.5 src/43haes/usr/sbin/cluster/hacmprd/main.C, hacmp.pe, 53haes_r610, 1442A_hacmp610 9/11/14 13:15:08"
-> HA 1호기 기동으로 인해서 1호기의 클러스터 상태가 ST_INIT에서 ST_STABLE로 변경이 된것을 확인할 수 있습니다.
[root@test_svr2:/]# smit hacmp Storage HACMP Services Communication Interfaces Resource Groups and Applications--->선택 HACMP Logs File Collections Security and Users Configure GPFS Open a SMIT Session on a Node
-> Resource Groups and Applications의 항목을 선택합니다.
Show the Current State of Applications and Resource Groups Bring a Resource Group Online Bring a Resource Group Offline Move a Resource Group to Another Node / Site--->선택 Suspend/Resume Application Monitoring Application Availability Analysis
-> Move a Resource Group to Another Node / Site의 항목을 선택합니다.
Move Resource Groups to Another Node--->선택 Move Resource Groups to Another Site rshexec: cannot connect to node test_node1 rshexec: cannot connect to node test_node2 Resource GroupStateNode(s) / Site HACMPRG ONLINE test_node2 /--->선택
-> 현재 2번 노드에 있는 리소스 그룹의 항목을 이동시키기 위한 절차입니다.
Resource groups in node or site collocation configuration: Resource Group(s) StateNode / Site rshexec: cannot connect to node test_node1 rshexec: cannot connect to node test_node2 *Denotes Originally Configured Highest Priority Node test_node1--->선택 Resource Group(s) to be Moved HACMPRG Destination Nodetest_node1
-> 목적지인 test_svr1의 노드로 리소스 그룹을 옮겨주기 위한 절차입니다.
[root@test_svr2:/]# clRGinfo -v Cluster Name: TESTHA_cluster Resource Group Name: HACMPRG Startup Policy: Online On Home Node Only Fallover Policy: Fallover To Next Priority Node In The List Fallback Policy: Never Fallback Site Policy: ignore Node Group State test_node1 ONLINE test_node2 OFFLINE
-> 노드 1호기와 노드 2호기의 관계가 active/standby의 상태로 구성된 hacmp인것을 다시한번 확인할 수 있습니다.
[root@test_svr1:/HACMPFS]# lssrc -ls clstrmgrES Current state: ST_STABLE sccsid = "@(#)361.135.6.5 src/43haes/usr/sbin/cluster/hacmprd/main.C, hacmp.pe, 53haes_r610, 1442A_hacmp610 9/11/14 13:15:08" i_local_nodeid 0, i_local_siteid -1, my_handle 1 ml_idx[1]=0 ml_idx[2]=1 There are 0 events on the Ibcast queue There are 0 events on the RM Ibcast queue CLversion: 11 local node vrmf is 6111 cluster fix level is "1" The following timer(s) are currently active: Current DNP values DNP Values for NodeId - 1NodeName - test_node1 PgSpFree = 2094483PvPctBusy = 0PctTotalTimeIdle = 99.359078 DNP Values for NodeId - 2NodeName - test_node2 PgSpFree = 2094383PvPctBusy = 0PctTotalTimeIdle = 98.140809 [root@test_svr2:/]# lssrc -ls clstrmgrES Current state: ST_STABLE sccsid = "@(#)361.135.6.5 src/43haes/usr/sbin/cluster/hacmprd/main.C, hacmp.pe, 53haes_r610, 1442A_hacmp610 9/11/14 13:15:08" i_local_nodeid 1, i_local_siteid -1, my_handle 2 ml_idx[1]=0 ml_idx[2]=1 There are 0 events on the Ibcast queue There are 0 events on the RM Ibcast queue CLversion: 11 local node vrmf is 6111 cluster fix level is "1" The following timer(s) are currently active: Current DNP values DNP Values for NodeId - 1NodeName - test_node1 PgSpFree = 0PvPctBusy = 0PctTotalTimeIdle = 0.000000 DNP Values for NodeId - 2NodeName - test_node2 PgSpFree = 2094385PvPctBusy = 0PctTotalTimeIdle = 89.589775
-> 노드1호기와 노드2호기의 클러스터 상태가 양쪽 모두 Current state: ST_STABLE의 상태가 된 것을 확인할 수 있습니다.
[root@test_svr1:/HACMPFS]# clRGinfo -v Cluster Name: TESTHA_cluster Resource Group Name: HACMPRG Startup Policy: Online On Home Node Only Fallover Policy: Fallover To Next Priority Node In The List Fallback Policy: Never Fallback Site Policy: ignore Node Group State test_node1 ONLINE test_node2 OFFLINE
-> 현재 hacmp의 상태가 노드 1이 온라인이 되고 노드 2가 오프라인이 된 것을 확인할 수 있습니다. 처음과 같은 상태라고 생각하면 됩니다.
[root@test_svr1:/HACMPFS]# ls -al drwxr-xr-x6 root system256 Mar 21 18:22 . drwxr-xr-x 21 root system 4096 Mar 21 18:09 .. drwxr-xr-x2 root system256 Mar 21 18:22 takeovrfile1 drwxr-xr-x2 root system256 Mar 21 18:22 takeovrfile2 drwxr-xr-x2 root system256 Mar 21 18:22 takeovrfile3 drwxr-xr-x2 root system256 Mar 21 18:09 lost+found
-> 마지막으로 HACMPFS의 디렉터리의 파일인 takeoverfile1,2,3의 파일들이 1호기에 다시 원복 되어 있는 것을 확인할 수 있습니다.
2021.04.01 - [System and Cloud/Unix] - IBM AIX HACMP V6 구축 하는 방법[2]
2021.03.30 - [System and Cloud/Unix] - IBM AIX HACMP V6 구축 하는 방법[1]
2021.03.22 - [System and Cloud/Unix] - IBM AIX HACMP V6 설치 및 업데이트 하는 방법
PS. 포스팅의 내용은 제 기준으로 작성한 것이기 때문에 참고해서 보시면 감사하겠습니다.
포스팅 과정의 오류 및 오타 그리고 궁금한 점에 대해서는 댓글 남겨주세요.
728x90반응형'System of Infra > Unix System' 카테고리의 다른 글
IBM AIX GPFS 설치하는 방법 (0) 2021.07.08 IBM AIX HACMP V7 설치 및 업데이트 하는 방법 (3) 2021.04.20 IBM AIX HACMP V6 구축 하는 방법[2] (0) 2021.04.01 IBM AIX HACMP V6 구축 하는 방법[1] (0) 2021.03.30 IBM AIX HACMP V6 설치 및 업데이트 하는 방법 (0) 2021.03.22