SAP 애플리케이션용 SUSE Linux Enterprise Server의 Azure VM에 있는 SAP NetWeaver에 대한 고가용성
이 문서에서는 가상 머신을 배포하고, 가상 머신을 구성하고, 클러스터 프레임워크를 설치하고, 고가용성 SAP NetWeaver 또는 SAP ABAP 플랫폼 기반 시스템을 설치하는 방법을 설명합니다. 예제 구성에서는 ASCS 인스턴스 번호 00, ERS 인스턴스 번호 02 및 SAP 시스템 ID NW1이 사용됩니다.
SAP 애플리케이션 15용 SLES의 새로운 구현을 위해 간단한 탑재 구성에서 SAP ASCS/ERS에 대한 고가용성을 배포하는 것이 좋습니다. 이 문서에 설명된 SAP 중앙 서비스 디렉터리에 대한 클러스터 제어 파일 시스템을 기반으로 하는 클래식 Pacemaker 구성은 여전히 지원됩니다.
먼저 다음 SAP 노트 및 논문을 읽어 보세요.
- SAP Note 1928533 다음과 같습니다.
- SAP 소프트웨어 배포에 지원되는 Azure VM 크기 목록
- Azure VM 크기에 대한 중요한 용량 정보
- 지원되는 SAP 소프트웨어, OS(운영 체제) 및 데이터베이스 조합
- Microsoft Azure에서 Windows 및 Linux에 필요한 SAP 커널 버전
- SAP Note 2015553 Azure에서 SAP 지원 SAP 소프트웨어 배포를 위한 필수 구성 요소를 나열합니다.
- SAP Note 2205917에는 SAP 애플리케이션용 SUSE Linux Enterprise Server에 권장되는 OS 설정이 나와 있습니다.
- SAP Note 1944799 SAP 애플리케이션용 SUSE Linux Enterprise Server에 대한 SAP HANA 지침이 있습니다.
- SAP Note 2178632는 Azure에서 SAP에 대해 보고된 모든 모니터링 메트릭에 대한 자세한 정보를 포함하고 있습니다.
- SAP Note 2191498 Azure의 Linux에 필요한 SAP 호스트 에이전트 버전이 있습니다.
- SAP Note 2243692 Azure의 Linux에서 SAP 라이선스에 대한 정보를 포함하고 있습니다.
- SAP Note 1984787 SUSE Linux Enterprise Server 12에 대한 일반적인 정보가 있습니다.
- SAP Note 1999351 SAP용 Azure 고급 모니터링 확장에 대한 추가 문제 해결 정보가 있습니다.
- SAP Community WIKI는 Linux에 필요한 모든 SAP Note를 포함하고 있습니다.
- Linux에서 SAP용 Azure Virtual Machines 계획 및 구현
- Linux에서 SAP용 Azure Virtual Machines 배포
- Linux에서 SAP용 Azure Virtual Machines DBMS 배포
- SUSE SAP HA 모범 사례 가이드 가이드 가이드에는 Netweaver HA 및 SAP HANA 시스템 복제 온-프레미스를 설정하는 데 필요한 모든 정보가 포함되어 있습니다. 이러한 가이드를 일반적인 기준선으로 사용합니다. 훨씬 더 자세한 정보를 제공합니다.
- SUSE High Availability Extension 12 SP3 릴리스 정보
개요
고가용성을 달성하려면 SAP NetWeaver에 NFS 서버가 필요합니다. NFS 서버는 별도의 클러스터에서 구성되며, 여러 SAP 시스템에서 사용할 수 있습니다.
NFS 서버, SAP NetWeaver ASCS, SAP NetWeaver SCS, SAP NetWeaver ERS 및 SAP HANA 데이터베이스는 가상 호스트 이름 및 가상 IP 주소를 사용합니다. Azure에서는 가상 IP 주소를 사용하려면 부하 분산 장치가 필요합니다. 표준 부하 분산 장치를 사용하는 것이 좋습니다. 제시된 구성은 다음이 포함된 부하 분산 장치를 보여 줍니다.
- ASCS용 프런트 엔드 IP 주소 10.0.0.7
- ERS용 프런트 엔드 IP 주소 10.0.0.8
- ASCS용 프로브 포트 62000
- ERS용 프로브 포트 62101
고가용성 NFS 서버 설정
참고 항목
Azure 자사 NFS 서비스 중 하나인 Azure Files 의 NFS 또는 고가용성 SAP 시스템에 공유 데이터를 저장하기 위한 NFS ANF 볼륨 중 하나를 배포하는 것이 좋습니다. NFS 클러스터를 활용하여 SAP 참조 아키텍처를 강조하지 않습니다.
네이티브 NFS 서비스를 사용하는 SAP NW 고가용성 SAP 시스템에 대한 SAP 구성 가이드는 다음과 같습니다.
SAP NetWeaver에는 전송 및 프로필 디렉터리에 대한 공유 스토리지가 필요합니다. SAP NetWeaver용 NFS 서버를 설정하는 방법에 대한 자세한 내용은 SUSE Linux Enterprise Server의 Azure VM에서 NFS에 대한 고가용성을 읽어보십시오.
설정(A)SCS
Azure Portal을 통해 수동으로 Linux 배포
이 문서에서는 리소스 그룹, Azure Virtual Network 및 서브넷을 이미 배포했다고 가정합니다.
SAP ASCS, ERS 및 애플리케이션 서버 인스턴스용 가상 머신을 배포합니다. SAP 시스템에서 지원되는 적합한 SLES 이미지를 선택합니다. 확장 집합, 가용성 영역 또는 가용성 집합과 같은 가용성 옵션 중 하나에서 VM을 배포할 수 있습니다.
Azure Portal를 통해 수동으로 Azure Load Balancer 배포
SAP 시스템용 VM을 배포한 후 부하 분산 장치를 만듭니다. 백 엔드 풀에서 SAP ASCS/ERS 인스턴스용으로 만든 VM을 사용합니다.
- 부하 분산 장치 만들기(내부, 표준):
- 프런트 엔드 IP 주소 만들기
- ASCS의 IP 주소 10.0.0.7
- 부하 분산 장치 열기, 프런트 엔드 IP 풀 선택 및 추가 클릭
- 새 프런트 엔드 IP 풀의 이름을 입력합니다(예: nw1-ascs-frontend).
- 할당을 정적으로 설정하고 IP 주소를 입력합니다(예: 10.0.0.7).
- 확인을 클릭합니다.
- ASCS ERS의 IP 주소 10.0.0.8
- 위의 단계를 반복하여 ERS에 대한 IP 주소(예 : 10.0.0.8 및 nw1-aers-backend)를 만듭니다.
- ASCS의 IP 주소 10.0.0.7
- 단일 백 엔드 풀을 만듭니다.
- 부하 분산 장치를 열고 백 엔드 풀을 선택한 다음 추가를 선택합니다.
- 새 백 엔드 풀의 이름(예: nw1-backend)을 입력합니다.
- 백 엔드 풀 구성에 대해 NIC를 선택합니다.
- 가상 머신 추가를 선택합니다.
- ASCS 클러스터의 가상 머신을 선택합니다.
- 추가를 선택합니다.
- 저장을 선택합니다.
- 상태 프로브 만들기
- ASCS용 포트 62000
- 부하 분산 장치를 열고 상태 프로브를 선택한 다음 추가를 클릭합니다.
- 새 상태 프로브의 이름 입력(예: nw1-ascs-hp)
- 프로토콜로 TCP를 선택하고, 포트 62000을 선택한 다음, 간격은 5로 유지
- 확인을 클릭합니다.
- ASCS ERS용 포트 62102
- 위의 단계를 반복하여 ERS에 대한 상태 프로브를 만듭니다(예: 62102 및 nw1-aers-hp).
- ASCS용 포트 62000
- 부하 분산 규칙
- ASCS에 대한 부하 분산 규칙
- 부하 분산 장치를 열고, 부하 분산 규칙을 선택하고, 추가 클릭
- 새 부하 분산 장치 규칙의 이름 입력(예: nw1-lb-ascs)
- 이전에 만든 프런트 엔드 IP 주소, 백 엔드 풀 및 상태 프로브를 선택합니다(예: nw1-ascs-frontend, nw1-backend 및 nw1-ascs-hp).
- HA 포트 선택
- 유휴 시간 제한을 30분으로 늘리기
- 부동 IP를 사용하도록 설정해야 합니다.
- 확인을 클릭합니다.
- 위의 단계를 반복하여 ERS에 대한 부하 분산 규칙 만들기(예: nw1-lb-ers)
- ASCS에 대한 부하 분산 규칙
- 프런트 엔드 IP 주소 만들기
Important
부동 IP는 부하 분산 시나리오의 NIC 보조 IP 구성에서 지원되지 않습니다. 자세한 내용은 Azure Load Balancer 제한 사항을 참조 하세요. VM에 대한 추가 IP 주소가 필요한 경우 두 번째 NIC를 배포합니다.
참고 항목
공용 IP 주소가 없는 VM이 내부(공용 IP 주소 없음) 표준 Azure 부하 분산 장치의 백 엔드 풀에 배치되는 경우 공용 엔드포인트로 라우팅을 허용하기 위해 추가 구성을 수행하지 않는 한 아웃바운드 인터넷 연결이 없습니다. 아웃바운드 연결을 설정하는 방법에 대한 자세한 내용은 SAP 고가용성 시나리오에서 Azure 표준 Load Balancer를 사용하는 Virtual Machines에 대한 퍼블릭 엔드포인트 연결을 참조하세요.
Important
Azure Load Balancer 뒤에 배치되는 Azure VM에서 TCP 타임스탬프를 사용하도록 설정하면 안 됩니다. TCP 타임스탬프를 사용하도록 설정하면 상태 프로브에 오류가 발생합니다. 매개 변수 net.ipv4.tcp_timestamps 0으로 설정합니다. 자세한 내용은 Load Balancer 상태 프로브를 참조 하세요.
Pacemaker 클러스터 만들기
Azure의 SUSE Linux Enterprise Server에서 Pacemaker를 설정하는 단계에 따라 이 (A)SCS 서버에 대한 기본 Pacemaker 클러스터를 만듭니다.
설치
다음 항목에는 접두사 [A] - 모든 노드에 적용, [1] - 노드 1에만 적용 1 또는 [2] - 노드 2에만 적용이 지정됩니다.
[A] SUSE 커넥트or 설치
sudo zypper install sap-suse-cluster-connector
참고 항목
호스트 이름에 대시 사용과 관련된 알려진 문제는 패키지 sap-suse-cluster-connector의 버전 3.1.1에서 해결되었습니다. 호스트 이름에 대시가 있는 클러스터 노드를 사용하는 경우 sap-suse-cluster-connector 패키지 버전 3.1.1 이상을 사용하고 있는지 확인합니다. 그렇지 않으면 클러스터가 작동하지 않습니다.
SAP SUSE 클러스터 커넥터의 새 버전을 설치했는지 확인합니다. 이전 항목은 sap_suse_cluster_connector 호출되었으며 새 커넥터를 sap-suse-cluster-connector라고 합니다.
sudo zypper info sap-suse-cluster-connector Information for package sap-suse-cluster-connector: --------------------------------------------------- Repository : SLE-12-SP3-SAP-Updates Name : sap-suse-cluster-connector <b>Version : 3.0.0-2.2</b> Arch : noarch Vendor : SUSE LLC <https://www.suse.com/> Support Level : Level 3 Installed Size : 41.6 KiB <b>Installed : Yes</b> Status : up-to-date Source package : sap-suse-cluster-connector-3.0.0-2.2.src Summary : SUSE High Availability Setup for SAP Products
[A] SAP 리소스 에이전트 업데이트
이 문서에 설명된 새 구성을 사용하려면 리소스 에이전트 패키지에 대한 패치가 필요합니다. 다음 명령을 사용하여 패치가 이미 설치되었는지를 확인할 수 있습니다.
sudo grep 'parameter name="IS_ERS"' /usr/lib/ocf/resource.d/heartbeat/SAPInstance
출력은 다음과 유사해야 합니다.
<parameter name="IS_ERS" unique="0" required="0">
grep 명령이 IS_ERS 매개 변수를 찾지 못하는 경우 SUSE 다운로드 페이지에 나열된 패치를 설치해야 합니다.
# example for patch for SLES 12 SP1 sudo zypper in -t patch SUSE-SLE-HA-12-SP1-2017-885=1 # example for patch for SLES 12 SP2 sudo zypper in -t patch SUSE-SLE-HA-12-SP2-2017-886=1
[A] 호스트 이름 확인 설정
DNS 서버를 사용하거나 모든 노드에서 /etc/hosts를 수정할 수 있습니다. 이 예에서는 /etc/hosts 파일 사용 방법을 보여줍니다. 다음 명령에서 IP 주소와 호스트 이름을 바꿉니다.
sudo vi /etc/hosts # Insert the following lines to /etc/hosts. Change the IP address and hostname to match your environment # IP address of the load balancer frontend configuration for NFS 10.0.0.4 nw1-nfs # IP address of the load balancer frontend configuration for SAP NetWeaver ASCS 10.0.0.7 nw1-ascs # IP address of the load balancer frontend configuration for SAP NetWeaver ASCS ERS 10.0.0.8 nw1-aers # IP address of the load balancer frontend configuration for database 10.0.0.13 nw1-db
SAP NetWeaver 설치 준비
[A] 공유 디렉터리 만들기
sudo mkdir -p /sapmnt/NW1 sudo mkdir -p /usr/sap/trans sudo mkdir -p /usr/sap/NW1/SYS sudo mkdir -p /usr/sap/NW1/ASCS00 sudo mkdir -p /usr/sap/NW1/ERS02 sudo chattr +i /sapmnt/NW1 sudo chattr +i /usr/sap/trans sudo chattr +i /usr/sap/NW1/SYS sudo chattr +i /usr/sap/NW1/ASCS00 sudo chattr +i /usr/sap/NW1/ERS02
[A] autofs 구성
sudo vi /etc/auto.master # Add the following line to the file, save and exit +auto.master /- /etc/auto.direct
아래 코드를 사용하여 파일을 만듭니다.
sudo vi /etc/auto.direct # Add the following lines to the file, save and exit /sapmnt/NW1 -nfsvers=4,nosymlink,sync nw1-nfs:/NW1/sapmntsid /usr/sap/trans -nfsvers=4,nosymlink,sync nw1-nfs:/NW1/trans /usr/sap/NW1/SYS -nfsvers=4,nosymlink,sync nw1-nfs:/NW1/sidsys
autofs를 다시 시작하여 새 공유를 탑재합니다.
sudo systemctl enable autofs sudo service autofs restart
[A] SWAP 파일 구성
Azure Linux VM에 대한 SWAP 파일 만들기에 정의된 대로 스왑 파일 만들기
#!/bin/sh # Percent of space on the ephemeral disk to dedicate to swap. Here 30% is being used. Modify as appropriate. PCT=0.3 # Location of swap file. Modify as appropriate based on location of ephemeral disk. LOCATION=/mnt if [ ! -f ${LOCATION}/swapfile ] then # Get size of the ephemeral disk and multiply it by the percent of space to allocate size=$(/bin/df -m --output=target,avail | /usr/bin/awk -v percent="$PCT" -v pattern=${LOCATION} '$0 ~ pattern {SIZE=int($2*percent);print SIZE}') echo "$size MB of space allocated to swap file" # Create an empty file first and set correct permissions /bin/dd if=/dev/zero of=${LOCATION}/swapfile bs=1M count=$size /bin/chmod 0600 ${LOCATION}/swapfile # Make the file available to use as swap /sbin/mkswap ${LOCATION}/swapfile fi # Enable swap /sbin/swapon ${LOCATION}/swapfile /sbin/swapon -a # Display current swap status /sbin/swapon -s
파일을 실행 가능하게 만듭니다.
chmod +x /var/lib/cloud/scripts/per-boot/swap.sh
VM을 중지하고 시작합니다. VM을 중지하고 시작하는 것은 SWAP 파일을 만든 후에만 처음 필요합니다.
SAP NetWeaver ASCS/ERS 설치
[1] ASCS 인스턴스에 대한 가상 IP 리소스 및 상태 프로브 만들기
Important
최근 테스트 결과, 백로그와 하나의 연결만 처리하는 제한으로 인해 netcat이 요청에 응답하지 않는 것으로 확인되었습니다. netcat 리소스는 Azure Load Balancer 요청 수신을 중지하고 부동 IP를 사용할 수 없게 됩니다.
기존 Pacemaker 클러스터의 경우 과거에 netcat을 socat으로 바꾸는 것이 좋습니다. 현재 다음 패키지 버전 요구 사항을 사용하여 패키지 리소스 에이전트의 일부인 azure-lb 리소스 에이전트를 사용하는 것이 좋습니다.- SLES 12 SP4/SP5의 경우 버전은 resource-agents-4.3.018.a7fb5035-3.30.1 이상이어야 합니다.
- SLES 15/15 SP1의 경우 버전은 resource-agents-4.3.0184.6ee15eb2-4.13.1 이상이어야 합니다.
변경에는 짧은 가동 중지 시간이 필요합니다.
기존 Pacemaker 클러스터의 경우 Azure Load-Balancer 감지 강화의 설명에 따라 socat을 사용하도록 구성을 이미 변경한 경우 즉시 azure-lb 리소스 에이전트로 전환할 필요가 없습니다.sudo crm node standby nw1-cl-1 sudo crm configure primitive fs_NW1_ASCS Filesystem device='nw1-nfs:/NW1/ASCS' directory='/usr/sap/NW1/ASCS00' fstype='nfs4' \ op start timeout=60s interval=0 \ op stop timeout=60s interval=0 \ op monitor interval=20s timeout=40s sudo crm configure primitive vip_NW1_ASCS IPaddr2 \ params ip=10.0.0.7 \ op monitor interval=10 timeout=20 sudo crm configure primitive nc_NW1_ASCS azure-lb port=62000 \ op monitor timeout=20s interval=10 sudo crm configure group g-NW1_ASCS fs_NW1_ASCS nc_NW1_ASCS vip_NW1_ASCS \ meta resource-stickiness=3000
클러스터 상태 정상이고 모든 리소스가 시작되었는지 확인합니다. 리소스가 실행되는 노드는 중요하지 않습니다.
sudo crm_mon -r # Node nw1-cl-1: standby # Online: [ nw1-cl-0 ] # # Full list of resources: # # stonith-sbd (stonith:external/sbd): Started nw1-cl-0 # Resource Group: g-NW1_ASCS # fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-0 # nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-0 # vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-0
[1] SAP NetWeaver ASCS 설치
ASCS에 대한 부하 분산 장치 프런트 엔드 구성의 IP 주소(예: nw1-ascs, 10.0.0.7 및 부하 분산 장치의 프로브에 사용한 인스턴스 번호(예: 00)에 매핑되는 가상 호스트 이름을 사용하여 첫 번째 노드에 SAP NetWeaver ASCS를 루트로 설치합니다.
sapinst 매개 변수 SAPINST_REMOTE_ACCESS_USER 사용하여 루트가 아닌 사용자가 sapinst에 연결할 수 있도록 할 수 있습니다.
sudo <swpm>/sapinst SAPINST_REMOTE_ACCESS_USER=sapadmin SAPINST_USE_HOSTNAME=virtual_hostname
설치에서 /usr/sap/NW1/ASCS00에 하위 폴더를 만들지 못하면 ASCS00 폴더의 소유자와 그룹을 설정하고 다시 시도합니다.
chown nw1adm /usr/sap/NW1/ASCS00 chgrp sapsys /usr/sap/NW1/ASCS00
[1] ERS 인스턴스에 대한 가상 IP 리소스 및 상태 프로브 만들기
sudo crm node online nw1-cl-1 sudo crm node standby nw1-cl-0 sudo crm configure primitive fs_NW1_ERS Filesystem device='nw1-nfs:/NW1/ASCSERS' directory='/usr/sap/NW1/ERS02' fstype='nfs4' \ op start timeout=60s interval=0 \ op stop timeout=60s interval=0 \ op monitor interval=20s timeout=40s sudo crm configure primitive vip_NW1_ERS IPaddr2 \ params ip=10.0.0.8 \ op monitor interval=10 timeout=20 sudo crm configure primitive nc_NW1_ERS azure-lb port=62102 \ op monitor timeout=20s interval=10 sudo crm configure group g-NW1_ERS fs_NW1_ERS nc_NW1_ERS vip_NW1_ERS
클러스터 상태 정상이고 모든 리소스가 시작되었는지 확인합니다. 리소스가 실행되는 노드는 중요하지 않습니다.
sudo crm_mon -r # Node nw1-cl-0: standby # Online: [ nw1-cl-1 ] # # Full list of resources: # # stonith-sbd (stonith:external/sbd): Started nw1-cl-1 # Resource Group: g-NW1_ASCS # fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 # nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 # vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 # Resource Group: g-NW1_ERS # fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-1 # nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-1 # vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-1
[2] SAP NetWeaver ERS 설치
ERS에 대한 부하 분산 장치 프런트 엔드 구성의 IP 주소(예: nw1-aers, 10.0.0.8 및 부하 분산 장치의 프로브에 사용한 인스턴스 번호(예: 02)에 매핑되는 가상 호스트 이름을 사용하여 두 번째 노드에 SAP NetWeaver ERS를 루트로 설치합니다.
sapinst 매개 변수 SAPINST_REMOTE_ACCESS_USER 사용하여 루트가 아닌 사용자가 sapinst에 연결할 수 있도록 할 수 있습니다.
sudo <swpm>/sapinst SAPINST_REMOTE_ACCESS_USER=sapadmin SAPINST_USE_HOSTNAME=virtual_hostname
참고 항목
SWPM SP 20 PL 05 이상을 사용합니다. 그 이전 버전은 권한을 올바르게 설정하지 않으므로 설치가 실패합니다.
설치가 /usr/sap/NW1/ERS 02에서 하위 폴더를 만들지 못하는 경우 ERS02 폴더의 소유자 및 그룹을 설정하고 다시 시도합니다.
chown nw1adm /usr/sap/NW1/ERS02 chgrp sapsys /usr/sap/NW1/ERS02
[1] ASCS/SCS 및 ERS 인스턴스 프로필 조정
ASCS/SCS 프로필
sudo vi /sapmnt/NW1/profile/NW1_ASCS00_nw1-ascs # Change the restart command to a start command #Restart_Program_01 = local $(_EN) pf=$(_PF) Start_Program_01 = local $(_EN) pf=$(_PF) # Add the following lines service/halib = $(DIR_CT_RUN)/saphascriptco.so service/halib_cluster_connector = /usr/bin/sap_suse_cluster_connector # Add the keep alive parameter, if using ENSA1 enque/encni/set_so_keepalive = true
ENSA1 및 ENSA2 모두에서
keepalive
OS 매개 변수는 SAP Note 1410736에 설명된 대로 설정해야 합니다.ERS 프로필
sudo vi /sapmnt/NW1/profile/NW1_ERS02_nw1-aers # Change the restart command to a start command #Restart_Program_00 = local $(_ER) pf=$(_PFL) NR=$(SCSID) Start_Program_00 = local $(_ER) pf=$(_PFL) NR=$(SCSID) # Add the following lines service/halib = $(DIR_CT_RUN)/saphascriptco.so service/halib_cluster_connector = /usr/bin/sap_suse_cluster_connector # remove Autostart from ERS profile # Autostart = 1
[A] Keep Alive 구성
SAP NetWeaver 애플리케이션 서버와 ASCS/SCS 간의 통신은 소프트웨어 부하 분산 장치를 통해 라우팅됩니다. 부하 분산 장치는 구성 가능한 시간 제한이 지나면 비활성 연결을 끊습니다. 이런 상황을 방지하려면 ENSA1 사용 시에는 SAP NetWeaver ASCS/SCS 프로필에 매개 변수를 설정하고, ENSA1/ENSA2 양쪽의 경우에는 모든 SAP 서버에서 Linux 시스템
keepalive
설정을 변경합니다. 자세한 내용은 SAP Note 1410736 읽어보세요.# Change the Linux system configuration sudo sysctl net.ipv4.tcp_keepalive_time=300
[A] 설치 후 SAP 사용자 구성
# Add sidadm to the haclient group sudo usermod -aG haclient nw1adm
[1] SAPservice 파일에 ASCS 및 ERS SAP 서비스 추가
두 번째 노드에 ASCS 서비스 항목을 추가하고 ERS 서비스 항목을 첫 번째 노드에 복사합니다.
cat /usr/sap/sapservices | grep ASCS00 | sudo ssh nw1-cl-1 "cat >>/usr/sap/sapservices" sudo ssh nw1-cl-1 "cat /usr/sap/sapservices" | grep ERS02 | sudo tee -a /usr/sap/sapservices
[1] SAP 클러스터 리소스 만들기
큐에 넣기 서버 1 아키텍처(ENSA1)를 사용하는 경우 다음과 같이 리소스를 정의합니다.
sudo crm configure property maintenance-mode="true" sudo crm configure primitive rsc_sap_NW1_ASCS00 SAPInstance \ operations \$id=rsc_sap_NW1_ASCS00-operations \ op monitor interval=11 timeout=60 on-fail=restart \ params InstanceName=NW1_ASCS00_nw1-ascs START_PROFILE="/sapmnt/NW1/profile/NW1_ASCS00_nw1-ascs" \ AUTOMATIC_RECOVER=false \ meta resource-stickiness=5000 failure-timeout=60 migration-threshold=1 priority=10 sudo crm configure primitive rsc_sap_NW1_ERS02 SAPInstance \ operations \$id=rsc_sap_NW1_ERS02-operations \ op monitor interval=11 timeout=60 on-fail=restart \ params InstanceName=NW1_ERS02_nw1-aers START_PROFILE="/sapmnt/NW1/profile/NW1_ERS02_nw1-aers" AUTOMATIC_RECOVER=false IS_ERS=true \ meta priority=1000 sudo crm configure modgroup g-NW1_ASCS add rsc_sap_NW1_ASCS00 sudo crm configure modgroup g-NW1_ERS add rsc_sap_NW1_ERS02 sudo crm configure colocation col_sap_NW1_no_both -5000: g-NW1_ERS g-NW1_ASCS sudo crm configure location loc_sap_NW1_failover_to_ers rsc_sap_NW1_ASCS00 rule 2000: runs_ers_NW1 eq 1 sudo crm configure order ord_sap_NW1_first_start_ascs Optional: rsc_sap_NW1_ASCS00:start rsc_sap_NW1_ERS02:stop symmetrical=false sudo crm_attribute --delete --name priority-fencing-delay sudo crm node online nw1-cl-0 sudo crm configure property maintenance-mode="false"
SAP는 SAP NW 7.52를 기준으로 복제본(replica)tion을 포함하여 큐에 넣기 서버 2에 대한 지원을 도입했습니다. ABAP Platform 1809부터 큐에 넣기 서버 2가 기본적으로 설치됩니다. 큐에 넣기 서버 2 지원에 대한 SAP 참고 2630416 참조하세요.
ENSA2(큐에 넣기 서버 2 아키텍처)를 사용하는 경우 다음과 같이 리소스를 정의합니다.
참고 항목
ENSA2를 실행하는 2노드 클러스터가 있는 경우 priority-fencing-delay 클러스터 속성을 구성하는 옵션이 있습니다. 이 속성은 분할 브레인 시나리오가 발생할 때 총 자원 우선 순위가 더 높은 노드를 펜싱하는 추가 지연을 발생합니다. 자세한 내용은 SUSE Linux Enteprise Server 고가용성 확장 관리 가이드를 참조하세요.
속성 우선 순위 펜싱 지연은 2노드 클러스터에서 실행되는 ENSA2에만 적용됩니다.
sudo crm configure property maintenance-mode="true" sudo crm configure property priority-fencing-delay=30 sudo crm configure primitive rsc_sap_NW1_ASCS00 SAPInstance \ operations \$id=rsc_sap_NW1_ASCS00-operations \ op monitor interval=11 timeout=60 on-fail=restart \ params InstanceName=NW1_ASCS00_nw1-ascs START_PROFILE="/sapmnt/NW1/profile/NW1_ASCS00_nw1-ascs" \ AUTOMATIC_RECOVER=false \ meta resource-stickiness=5000 priority=100 sudo crm configure primitive rsc_sap_NW1_ERS02 SAPInstance \ operations \$id=rsc_sap_NW1_ERS02-operations \ op monitor interval=11 timeout=60 on-fail=restart \ params InstanceName=NW1_ERS02_nw1-aers START_PROFILE="/sapmnt/NW1/profile/NW1_ERS02_nw1-aers" AUTOMATIC_RECOVER=false IS_ERS=true sudo crm configure modgroup g-NW1_ASCS add rsc_sap_NW1_ASCS00 sudo crm configure modgroup g-NW1_ERS add rsc_sap_NW1_ERS02 sudo crm configure colocation col_sap_NW1_no_both -5000: g-NW1_ERS g-NW1_ASCS sudo crm configure order ord_sap_NW1_first_start_ascs Optional: rsc_sap_NW1_ASCS00:start rsc_sap_NW1_ERS02:stop symmetrical=false sudo crm node online nw1-cl-0 sudo crm configure property maintenance-mode="false"
이전 버전에서 업그레이드하고 큐에 넣기 서버 2로 전환하는 경우 SAP Note 2641019를 참조하세요.
클러스터 상태 정상이고 모든 리소스가 시작되었는지 확인합니다. 리소스가 실행되는 노드는 중요하지 않습니다.
sudo crm_mon -r # Online: [ nw1-cl-0 nw1-cl-1 ] # # Full list of resources: # # stonith-sbd (stonith:external/sbd): Started nw1-cl-1 # Resource Group: g-NW1_ASCS # fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 # nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 # vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 # rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 # Resource Group: g-NW1_ERS # fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-0 # nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-0 # vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 # rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-0
SAP NetWeaver 애플리케이션 서버 준비
일부 데이터베이스는 애플리케이션 서버에서 데이터베이스 인스턴스 설치를 실행해야 합니다. 이러한 경우 사용할 수 있도록 애플리케이션 서버 가상 머신을 준비합니다.
이 단계에서는 ASCS/SCS 및 HANA 서버와 다른 서버에 애플리케이션 서버를 설치한다고 가정합니다. 그렇지 않으면 아래 단계 중 일부(예: 호스트 이름 확인 구성)가 필요하지 않습니다.
운영 체제 구성
더티 캐시의 크기를 줄입니다. 자세한 내용은 RAM이 큰 SLES 11/12 서버에서 낮은 쓰기 성능을 참조하세요.
sudo vi /etc/sysctl.conf # Change/set the following settings vm.dirty_bytes = 629145600 vm.dirty_background_bytes = 314572800
호스트 이름 확인 설정
DNS 서버를 사용하거나 모든 노드에서 /etc/hosts를 수정할 수 있습니다. 이 예에서는 /etc/hosts 파일 사용 방법을 보여줍니다. 다음 명령에서 IP 주소와 호스트 이름 바꾸기
sudo vi /etc/hosts
다음 줄을 /etc/hosts에 삽입합니다. 환경에 맞게 IP 주소와 호스트 이름 변경
# IP address of the load balancer frontend configuration for NFS 10.0.0.4 nw1-nfs # IP address of the load balancer frontend configuration for SAP NetWeaver ASCS/SCS 10.0.0.7 nw1-ascs # IP address of the load balancer frontend configuration for SAP NetWeaver ERS 10.0.0.8 nw1-aers # IP address of the load balancer frontend configuration for database 10.0.0.13 nw1-db # IP address of all application servers 10.0.0.20 nw1-di-0 10.0.0.21 nw1-di-1
sapmnt 디렉터리를 만듭니다.
sudo mkdir -p /sapmnt/NW1 sudo mkdir -p /usr/sap/trans sudo chattr +i /sapmnt/NW1 sudo chattr +i /usr/sap/trans
autofs를 구성합니다.
sudo vi /etc/auto.master # Add the following line to the file, save and exit +auto.master /- /etc/auto.direct
를 사용하여 새 파일 만들기
sudo vi /etc/auto.direct # Add the following lines to the file, save and exit /sapmnt/NW1 -nfsvers=4,nosymlink,sync nw1-nfs:/NW1/sapmntsid /usr/sap/trans -nfsvers=4,nosymlink,sync nw1-nfs:/NW1/trans
autofs를 다시 시작하여 새 공유를 탑재합니다.
sudo systemctl enable autofs sudo service autofs restart
SWAP 파일 구성
sudo vi /etc/waagent.conf # Set the property ResourceDisk.EnableSwap to y # Create and use swapfile on resource disk. ResourceDisk.EnableSwap=y # Set the size of the SWAP file with property ResourceDisk.SwapSizeMB # The free space of resource disk varies by virtual machine size. Make sure that you do not set a value that is too big. You can check the SWAP space with command swapon # Size of the swapfile. ResourceDisk.SwapSizeMB=2000
에이전트를 다시 시작하여 변경 내용 활성화
sudo service waagent restart
데이터베이스 설치
이 예제에서는 SAP NetWeaver가 SAP HANA에 설치됩니다. 이 설치에 지원되는 모든 데이터베이스를 사용할 수 있습니다. Azure에서 SAP HANA를 설치하는 방법에 대한 자세한 내용은 Azure VM(Virtual Machines)에서 SAP HANA의 고가용성을 참조하세요. 지원되는 데이터베이스 목록은 SAP Note 1928533을 참조하세요.
SAP 데이터베이스 인스턴스 설치 실행
데이터베이스에 대한 부하 분산 장치 프런트 엔드 구성의 IP 주소(예 : nw1-db 및 10.0.0.13)에 매핑되는 가상 호스트 이름을 사용하여 SAP NetWeaver 데이터베이스 인스턴스를 루트로 설치합니다.
sapinst 매개 변수 SAPINST_REMOTE_ACCESS_USER 사용하여 루트가 아닌 사용자가 sapinst에 연결할 수 있도록 할 수 있습니다.
sudo <swpm>/sapinst SAPINST_REMOTE_ACCESS_USER=sapadmin SAPINST_USE_HOSTNAME=virtual_hostname
SAP NetWeaver 애플리케이션 서버 설치
다음 단계에 따라 SAP 애플리케이션 서버를 설치합니다.
애플리케이션 서버 준비
위의 SAP NetWeaver 애플리케이션 서버 준비 장의 단계에 따라 애플리케이션 서버를 준비합니다.
SAP NetWeaver 애플리케이션 서버 설치
기본 또는 추가 SAP NetWeaver 애플리케이션 서버를 설치합니다.
sapinst 매개 변수 SAPINST_REMOTE_ACCESS_USER 사용하여 루트가 아닌 사용자가 sapinst에 연결할 수 있도록 할 수 있습니다.
sudo <swpm>/sapinst SAPINST_REMOTE_ACCESS_USER=sapadmin SAPINST_USE_HOSTNAME=virtual_hostname
SAP HANA 보안 저장소 업데이트
SAP HANA 시스템 복제 설정의 가상 이름을 가리키도록 SAP HANA 보안 저장소를 업데이트합니다.
다음 명령을 실행하여 항목을 나열합니다.
hdbuserstore List
이 경우 모든 항목을 나열해야 하며 다음과 비슷합니다.
DATA FILE : /home/nw1adm/.hdb/nw1-di-0/SSFS_HDB.DAT KEY FILE : /home/nw1adm/.hdb/nw1-di-0/SSFS_HDB.KEY KEY DEFAULT ENV : 10.0.0.14:30313 USER: SAPABAP1 DATABASE: HN1
출력은 기본 항목의 IP 주소가 부하 분산 장치의 IP 주소가 아니라 가상 머신을 가리키고 있음을 보여 줍니다. 이 항목은 부하 분산 장치의 가상 호스트 이름을 가리키도록 변경해야 합니다. 동일한 포트(위의 출력에서 30313 ) 및 데이터베이스 이름(위의 출력에서 HN1 )을 사용해야 합니다.
su - nw1adm hdbuserstore SET DEFAULT nw1-db:30313@HN1 SAPABAP1 <password of ABAP schema>
클러스터 설정 테스트
다음 테스트는 SUSE 모범 사례 가이드의 테스트 사례 복사본입니다. 편의를 위해 복사됩니다. 또한 항상 모범 사례 가이드를 읽고 추가되었을 수 있는 모든 추가 테스트를 수행합니다.
HAGetFailoverConfig, HACheckConfig 및 HACheckFailoverConfig 테스트
ASCS 인스턴스를 현재 실행 중인 노드에서 <sapsid>adm으로 다음 명령을 실행합니다. FAIL: 메모리 부족으로 명령이 실패하는 경우 호스트 이름의 대시로 인해 발생할 수 있습니다. 이는 알려진 문제이며 sap-suse-cluster-connector 패키지의 SUSE에서 해결됩니다.
nw1-cl-0:nw1adm 54> sapcontrol -nr 00 -function HAGetFailoverConfig # 15.08.2018 13:50:36 # HAGetFailoverConfig # OK # HAActive: TRUE # HAProductVersion: Toolchain Module # HASAPInterfaceVersion: Toolchain Module (sap_suse_cluster_connector 3.0.1) # HADocumentation: https://www.suse.com/products/sles-for-sap/resource-library/sap-best-practices/ # HAActiveNode: # HANodes: nw1-cl-0, nw1-cl-1 nw1-cl-0:nw1adm 55> sapcontrol -nr 00 -function HACheckConfig # 15.08.2018 14:00:04 # HACheckConfig # OK # state, category, description, comment # SUCCESS, SAP CONFIGURATION, Redundant ABAP instance configuration, 2 ABAP instances detected # SUCCESS, SAP CONFIGURATION, Redundant Java instance configuration, 0 Java instances detected # SUCCESS, SAP CONFIGURATION, Enqueue separation, All Enqueue server separated from application server # SUCCESS, SAP CONFIGURATION, MessageServer separation, All MessageServer separated from application server # SUCCESS, SAP CONFIGURATION, ABAP instances on multiple hosts, ABAP instances on multiple hosts detected # SUCCESS, SAP CONFIGURATION, Redundant ABAP SPOOL service configuration, 2 ABAP instances with SPOOL service detected # SUCCESS, SAP STATE, Redundant ABAP SPOOL service state, 2 ABAP instances with active SPOOL service detected # SUCCESS, SAP STATE, ABAP instances with ABAP SPOOL service on multiple hosts, ABAP instances with active ABAP SPOOL service on multiple hosts detected # SUCCESS, SAP CONFIGURATION, Redundant ABAP BATCH service configuration, 2 ABAP instances with BATCH service detected # SUCCESS, SAP STATE, Redundant ABAP BATCH service state, 2 ABAP instances with active BATCH service detected # SUCCESS, SAP STATE, ABAP instances with ABAP BATCH service on multiple hosts, ABAP instances with active ABAP BATCH service on multiple hosts detected # SUCCESS, SAP CONFIGURATION, Redundant ABAP DIALOG service configuration, 2 ABAP instances with DIALOG service detected # SUCCESS, SAP STATE, Redundant ABAP DIALOG service state, 2 ABAP instances with active DIALOG service detected # SUCCESS, SAP STATE, ABAP instances with ABAP DIALOG service on multiple hosts, ABAP instances with active ABAP DIALOG service on multiple hosts detected # SUCCESS, SAP CONFIGURATION, Redundant ABAP UPDATE service configuration, 2 ABAP instances with UPDATE service detected # SUCCESS, SAP STATE, Redundant ABAP UPDATE service state, 2 ABAP instances with active UPDATE service detected # SUCCESS, SAP STATE, ABAP instances with ABAP UPDATE service on multiple hosts, ABAP instances with active ABAP UPDATE service on multiple hosts detected # SUCCESS, SAP STATE, SCS instance running, SCS instance status ok # SUCCESS, SAP CONFIGURATION, SAPInstance RA sufficient version (nw1-ascs_NW1_00), SAPInstance includes is-ers patch # SUCCESS, SAP CONFIGURATION, Enqueue replication (nw1-ascs_NW1_00), Enqueue replication enabled # SUCCESS, SAP STATE, Enqueue replication state (nw1-ascs_NW1_00), Enqueue replication active nw1-cl-0:nw1adm 56> sapcontrol -nr 00 -function HACheckFailoverConfig # 15.08.2018 14:04:08 # HACheckFailoverConfig # OK # state, category, description, comment # SUCCESS, SAP CONFIGURATION, SAPInstance RA sufficient version, SAPInstance includes is-ers patch
ASCS 인스턴스 수동 마이그레이션
테스트를 시작하기 전의 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-0 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-0 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-1
다음 명령을 루트로 실행하여 ASCS 인스턴스를 마이그레이션합니다.
nw1-cl-0:~ # crm resource migrate rsc_sap_NW1_ASCS00 force # INFO: Move constraint created for rsc_sap_NW1_ASCS00 nw1-cl-0:~ # crm resource unmigrate rsc_sap_NW1_ASCS00 # INFO: Removed migration constraints for rsc_sap_NW1_ASCS00 # Remove failed actions for the ERS that occurred as part of the migration nw1-cl-0:~ # crm resource cleanup rsc_sap_NW1_ERS02
테스트 후 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-0 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-0
HAFailoverToNode 테스트
테스트를 시작하기 전의 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-0 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-0
ASCS 인스턴스를 마이그레이션하려면 다음 명령을 <sapsid>adm으로 실행합니다.
nw1-cl-0:nw1adm 55> sapcontrol -nr 00 -host nw1-ascs -user nw1adm <password> -function HAFailoverToNode "" # run as root # Remove failed actions for the ERS that occurred as part of the migration nw1-cl-0:~ # crm resource cleanup rsc_sap_NW1_ERS02 # Remove migration constraints nw1-cl-0:~ # crm resource clear rsc_sap_NW1_ASCS00 #INFO: Removed migration constraints for rsc_sap_NW1_ASCS00
테스트 후 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-0 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-0 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-1
노드 충돌 시뮬레이션
테스트를 시작하기 전의 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-0 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-0 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-1
ASCS 인스턴스가 실행 중인 노드에서 루트로 다음 명령을 실행합니다.
nw1-cl-0:~ # echo b > /proc/sysrq-trigger
SBD를 사용하는 경우 Pacemaker는 종료된 노드에서 자동으로 시작하지 않아야 합니다. 노드가 다시 시작된 후의 상태는 다음과 같습니다.
Online: [ nw1-cl-1 ] OFFLINE: [ nw1-cl-0 ] Full list of resources: stonith-sbd (stonith:external/sbd): Started nw1-cl-1 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Failed Actions: * rsc_sap_NW1_ERS02_monitor_11000 on nw1-cl-1 'not running' (7): call=219, status=complete, exitreason='none', last-rc-change='Wed Aug 15 14:38:38 2018', queued=0ms, exec=0ms
다음 명령을 사용하여 종료된 노드에서 Pacemaker를 시작하고, SBD 메시지를 클린, 실패한 리소스를 클린.
# run as root # list the SBD device(s) nw1-cl-0:~ # cat /etc/sysconfig/sbd | grep SBD_DEVICE= # SBD_DEVICE="/dev/disk/by-id/scsi-36001405772fe8401e6240c985857e116;/dev/disk/by-id/scsi-36001405034a84428af24ddd8c3a3e9e1;/dev/disk/by-id/scsi-36001405cdd5ac8d40e548449318510c3" nw1-cl-0:~ # sbd -d /dev/disk/by-id/scsi-36001405772fe8401e6240c985857e116 -d /dev/disk/by-id/scsi-36001405034a84428af24ddd8c3a3e9e1 -d /dev/disk/by-id/scsi-36001405cdd5ac8d40e548449318510c3 message nw1-cl-0 clear nw1-cl-0:~ # systemctl start pacemaker nw1-cl-0:~ # crm resource cleanup rsc_sap_NW1_ASCS00 nw1-cl-0:~ # crm resource cleanup rsc_sap_NW1_ERS02
테스트 후 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-1 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-0
네트워크 통신 차단
테스트를 시작하기 전의 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-1 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-0
방화벽 규칙을 실행하여 노드 중 하나에서 통신을 차단합니다.
# Execute iptable rule on nw1-cl-0 (10.0.0.5) to block the incoming and outgoing traffic to nw1-cl-1 (10.0.0.6) iptables -A INPUT -s 10.0.0.6 -j DROP; iptables -A OUTPUT -d 10.0.0.6 -j DROP
클러스터 노드가 서로 통신할 수 없는 경우 분할 브레인 시나리오의 위험이 있습니다. 이러한 상황에서 클러스터 노드는 동시에 서로 울타리를 시도하여 펜스 경합을 초래합니다.
펜싱 디바이스를 구성할 때 속성을 구성하는
pcmk_delay_max
것이 좋습니다. 따라서 분할 브레인 시나리오의 경우 클러스터는 각 노드의 펜싱 작업에 값까지pcmk_delay_max
임의 지연을 도입합니다. 가장 짧은 지연이 있는 노드가 펜싱에 대해 선택됩니다.또한 ENSA 2 구성에서 분할 브레인 시나리오 중에 다른 노드보다 ASCS 리소스를 호스트하는 노드의 우선 순위를 지정하려면 클러스터에서 속성을 구성하는
priority-fencing-delay
것이 좋습니다. priority-fencing-delay 속성을 사용하도록 설정하면 클러스터가 ASCS 리소스를 호스트하는 노드에서 특히 펜싱 작업에 추가 지연을 도입하여 ASCS 노드가 펜스 경합에서 승리할 수 있습니다.아래 명령을 실행하여 방화벽 규칙을 삭제합니다.
# If the iptables rule set on the server gets reset after a reboot, the rules will be cleared out. In case they have not been reset, please proceed to remove the iptables rule using the following command. iptables -D INPUT -s 10.0.0.6 -j DROP; iptables -D OUTPUT -d 10.0.0.6 -j DROP
ASCS 인스턴스의 수동 다시 시작 테스트
테스트를 시작하기 전의 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-1 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-0
예를 들어 트랜잭션 su01에서 사용자를 편집하여 큐에 넣기 잠금을 만듭니다. ASCS 인스턴스를 실행 중인 노드에서 <sapsid>adm으로 다음 명령을 실행합니다. 명령은 ASCS 인스턴스를 중지하고 다시 시작합니다. 큐에 넣기 서버 1 아키텍처를 사용하는 경우 이 테스트에서 큐에 넣기 잠금이 손실될 것으로 예상됩니다. 큐에 넣기 서버 2 아키텍처를 사용하는 경우 큐에 넣기가 유지됩니다.
nw1-cl-1:nw1adm 54> sapcontrol -nr 00 -function StopWait 600 2
이제 Pacemaker에서 ASCS 인스턴스를 사용하지 않도록 설정해야 합니다.
rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Stopped (disabled)
동일한 노드에서 ASCS 인스턴스를 다시 시작합니다.
nw1-cl-1:nw1adm 54> sapcontrol -nr 00 -function StartWait 600 2
트랜잭션 su01의 큐에 넣기 잠금이 손실되고 백 엔드가 다시 설정되어야 합니다. 테스트 후 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-1 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-0
메시지 서버 프로세스 종료
테스트를 시작하기 전의 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-1 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-0
다음 명령을 루트로 실행하여 메시지 서버의 프로세스를 식별하고 종료합니다.
nw1-cl-1:~ # pgrep -f ms.sapNW1 | xargs kill -9
메시지 서버를 한 번만 종료하면 sapstart에서 다시 시작됩니다. 충분히 자주 종료하면 Pacemaker는 결국 ASCS 인스턴스를 ENSA1의 경우 다른 노드로 이동합니다. 다음 명령을 루트로 실행하여 테스트 후 ASCS 및 ERS 인스턴스의 리소스 상태를 클린.
nw1-cl-0:~ # crm resource cleanup rsc_sap_NW1_ASCS00 nw1-cl-0:~ # crm resource cleanup rsc_sap_NW1_ERS02
테스트 후 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-1 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-0 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-1
큐에 넣기 서버 프로세스 종료
테스트를 시작하기 전의 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-1 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-0 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-1
다음 명령을 ASCS 인스턴스가 실행 중인 노드에서 루트로 실행하여 큐에 넣기 서버를 종료합니다.
nw1-cl-0:~ # #If using ENSA1 pgrep -f en.sapNW1 | xargs kill -9 #If using ENSA2 pgrep -f enq.sapNW1 | xargs kill -9
ENSA1의 경우 ASCS 인스턴스는 즉시 다른 노드로 장애 조치(Failover)되어야 합니다. ASCS 인스턴스가 시작된 후에도 ERS 인스턴스가 장애 조치(failover)되어야 합니다. 다음 명령을 루트로 실행하여 테스트 후 ASCS 및 ERS 인스턴스의 리소스 상태를 클린.
nw1-cl-0:~ # crm resource cleanup rsc_sap_NW1_ASCS00 nw1-cl-0:~ # crm resource cleanup rsc_sap_NW1_ERS02
테스트 후 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-1 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-0
큐에 넣기 복제 서버 프로세스 종료
테스트를 시작하기 전의 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-1 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-0
ERS 인스턴스가 실행 중인 노드에서 루트로 다음 명령을 실행하여 큐에 넣기 복제본(replica) 서버 프로세스를 종료합니다.
nw1-cl-0:~ # pgrep -f er.sapNW1 | xargs kill -9
명령을 한 번만 실행하면 sapstart에서 프로세스를 다시 시작합니다. 충분히 자주 실행하면 sapstart에서 프로세스를 다시 시작하지 않고 리소스가 중지된 상태가 됩니다. 다음 명령을 루트로 실행하여 테스트 후 ERS 인스턴스의 리소스 상태를 클린.
nw1-cl-0:~ # crm resource cleanup rsc_sap_NW1_ERS02
테스트 후 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-1 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-0
큐에 넣기 sapstartsrv 프로세스 종료
테스트를 시작하기 전의 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-1 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-0
ASCS가 실행 중인 노드에서 루트로 다음 명령을 실행합니다.
nw1-cl-1:~ # pgrep -fl ASCS00.*sapstartsrv # 59545 sapstartsrv nw1-cl-1:~ # kill -9 59545
sapstartsrv 프로세스는 항상 Pacemaker 리소스 에이전트에 의해 다시 시작되어야 합니다. 테스트 후 리소스 상태:
stonith-sbd (stonith:external/sbd): Started nw1-cl-1 Resource Group: g-NW1_ASCS fs_NW1_ASCS (ocf::heartbeat:Filesystem): Started nw1-cl-1 nc_NW1_ASCS (ocf::heartbeat:azure-lb): Started nw1-cl-1 vip_NW1_ASCS (ocf::heartbeat:IPaddr2): Started nw1-cl-1 rsc_sap_NW1_ASCS00 (ocf::heartbeat:SAPInstance): Started nw1-cl-1 Resource Group: g-NW1_ERS fs_NW1_ERS (ocf::heartbeat:Filesystem): Started nw1-cl-0 nc_NW1_ERS (ocf::heartbeat:azure-lb): Started nw1-cl-0 vip_NW1_ERS (ocf::heartbeat:IPaddr2): Started nw1-cl-0 rsc_sap_NW1_ERS02 (ocf::heartbeat:SAPInstance): Started nw1-cl-0
다음 단계
- SAP 애플리케이션 다중 SID에 대한 SLES의 Azure VM에서 SAP NW용 HA 가이드
- SAP용 Azure Virtual Machines 계획 및 구현
- SAP용 Azure Virtual Machines 배포
- SAP용 Azure Virtual Machines DBMS 배포
- Azure VM에서 SAP HANA의 재해 복구를 계획하고 고가용성을 설정하는 방법을 알아보려면 Azure VM(Virtual Machines)의 SAP HANA 고가용성을 참조하세요.