Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

1.3. 차단 장치 설정

사용자는 클러스터에 있는 각 노드에 대해 차단 장치를 설정해야 합니다. 차단 장치 설정에 관한 일반적인 정보는 Red Hat Enterprise Linux 7 High Availability Add-On Reference를 참조하십시오.

참고

차단 장치를 설정할 때 사용자의 차단 장치가 제어하는 노드와 그 장치가 전원을 공유하고 있지 않은지 확인합니다.
다음의 예시에서는 노드를 차단하기 위해 zapc.example.com 호스트명을 갖고 있는 APC 전원 스위치와 fence_apc_snmp 차단 에이전트를 사용합니다. 두 노드가 모두 동일한 차단 에이전트에 의해 차단될 것이므로 사용자는 pcmk_host_mappcmk_host_list 옵션을 사용해서 두 차단 장치를 단일 리소스로 설정할 수 있습니다.
pcs stonith create 명령을 사용해서 차단 장치를 stonith 리소스로 설정해서 생성합니다. 다음의 명령을 사용해서 z1.example.comz2.example.com 노드에 대해 fence_apc_snmp 차단 에이전트를 사용하는 myapc라는 이름의 stonith 리소스를 설정합니다. pcmk_host_map 옵션을 사용해서 z1.example.com을 포트 1에 매핑하고 z2.example.com을 포트 2에 매핑합니다. APC 장치의 로그인 값과 암호는 모두 apc입니다. 기본값으로 이 장치는 각 노드에 대해 60초의 모니터 간격을 둡니다.
노드를 위한 호스트명을 지정할 때 IP 주소를 사용할 수 있습니다.
[root@z1 ~]# pcs stonith create myapc fence_apc_snmp params \
ipaddr="zapc.example.com" pcmk_host_map="z1.example.com:1;z2.example.com:2" \
pcmk_host_check="static-list" pcmk_host_list="z1.example.com,z2.example.com" \
login="apc" passwd="apc"

참고

사용자가 fence_apc_snmp stonith 장치를 생성할 때 다음과 같은 경고 메시지가 표시될 수도 있지만 무시해도 됩니다:
Warning: missing required option(s): 'port, action' for resource type: stonith:fence_apc_snmp
다음의 명령을 사용해서 기존 STONITH 장치의 매개 변수를 표시합니다.
[root@rh7-1 ~]# pcs stonith show myapc
 Resource: myapc (class=stonith type=fence_apc_snmp)
  Attributes: ipaddr=zapc.example.com pcmk_host_map=z1.example.com:1;z2.example.com:2 pcmk_host_check=static-list pcmk_host_list=z1.example.com,z2.example.com login=apc passwd=apc
  Operations: monitor interval=60s (myapc-monitor-interval-60s)