Red Hat Training

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

5.7.2. 노드에 대해 단일 스토리지 기반 차단 장치 설정

노드를 차단하기 위해 비전원 차단 방법 (즉, SAN/storage 펜싱)을 사용할 때 차단 장치에 대해 차단 장치 제거 (unfencing)를 설정해야 합니다. 이는 노드가 다시 시작할 때까지 차단 노드가 다시 활성화되지 않는지를 확인합니다. 노드의 차단 장치 제거 설정 시 on 또는 enable의 명시적 추가 작업과 함께 설정한 해당 차단 장치를 미러하는 장치를 지정합니다.
노드의 차단 장치 제거 (unfencing)에 대한 자세한 내용은 fence_node(8) man 페이지를 참조하십시오.
다음 절차를 사용하여 sanswitch1라는 차단 장치를 사용하는 단일 스토리지 기반 차단 장치로 노드를 설정합니다. 이러한 차단 장치는 fence_sanbox2 차단 에이전트를 사용합니다.
  1. 노드의 차단 방식을 추가하고 차단 방식의 이름을 기입합니다.
    ccs -h host --addmethod method node
    예를 들어, 클러스터 노드 node-01.example.com에 있는 설정 파일에서 노드 node-01.example.com에 대한 SAN이라는 차단 방식을 설정하려면 다음 명령을 실행합니다:
    ccs -h node01.example.com --addmethod SAN  node01.example.com
    
  2. 차단 방식에 대한 차단 인스턴스를 추가합니다. 노드에 사용할 차단 장치, 이러한 인스턴스를 적용할 노드, 방식 이름, 노드 특유의 옵션을 지정해야 합니다:
    ccs -h host --addfenceinst fencedevicename node method [options]
    
    예를 들어, SAN이라는 방식을 사용하여 클러스터 노드 node-01.example.com를 차단하기 위해 sanswitch1라는 차단 장치에 있는 SAN 스위치 전원 포트 11을 사용하는 클러스터 노드 node-01.example.com의 설정 파일에 있는 차단 인스턴스를 설정하려면 다음 명령을 실행합니다:
    ccs -h node01.example.com --addfenceinst sanswitch1 node01.example.com SAN port=11
    
  3. 이 노드에 있는 스토리지 기반 차단 장치에 대해 차단 장치 제거 (unfencing)를 설정하려면 다음 명령을 실행합니다:
    ccs -h host --addunfence fencedevicename node action=on|off
    
클러스터에 있는 각 노드에 대해 차단 방식을 추가할 필요가 있습니다. 다음 명령은 SAN이라는 방식을 사용하는 각 노드에 대해 차단 방식을 설정합니다. 차단 방식의 장치는 장치 이름으로 sanswitch를 지정하지만, 5.5절. “차단 장치 설정 ”에서 설명하고 있듯이 이는 --addfencedev 옵션으로 이전에 설정된 장치입니다. 각 노드는 고유한 SAN 물리적 포트 번호로 설정됩니다. node-01.example.com의 포트 번호는 11이고, node-02.example.com의 포트 번호는 12이며, node-03.example.com의 포트 번호는 13입니다.
ccs -h node01.example.com --addmethod SAN node01.example.com
ccs -h node01.example.com --addmethod SAN node02.example.com
ccs -h node01.example.com --addmethod SAN node03.example.com
ccs -h node01.example.com --addfenceinst sanswitch1 node01.example.com SAN port=11
ccs -h node01.example.com --addfenceinst sanswitch1 node02.example.com SAN port=12
ccs -h node01.example.com --addfenceinst sanswitch1 node03.example.com SAN port=13
ccs -h node01.example.com --addunfence sanswitch1 node01.example.com port=11 action=on
ccs -h node01.example.com --addunfence sanswitch1 node02.example.com port=12 action=on
ccs -h node01.example.com --addunfence sanswitch1 node03.example.com port=13 action=on
예 5.3. “스토리지 기반 차단 방식을 추가한 후 cluster.conf에서는 클러스터에 있는 각 노드에 차단 방식, 차단 인스턴스, 차단 장치 제거를 추가한 후 cluster.conf 설정 파일을 보여주고 있습니다.

예 5.3. 스토리지 기반 차단 방식을 추가한 후 cluster.conf


<cluster name="mycluster" config_version="3">
   <clusternodes>
     <clusternode name="node-01.example.com" nodeid="1">
         <fence>
            <method name="SAN">
	      <device name="sanswitch1" port="11"/>
             </method>
         </fence>
         <unfence>
             <device name="sanswitch1" port="11" action="on"/> 
         </unfence>
     </clusternode>
     <clusternode name="node-02.example.com" nodeid="2">
         <fence>
            <method name="SAN">
	      <device name="sanswitch1" port="12"/>
             </method>
         </fence>
         <unfence>
             <device name="sanswitch1" port="12" action="on"/> 
         </unfence>
     </clusternode>
     <clusternode name="node-03.example.com" nodeid="3">
         <fence>
            <method name="SAN">
	      <device name="sanswitch1" port="13"/>
             </method>
         </fence>
         <unfence>
             <device name="sanswitch1" port="13" action="on"/> 
         </unfence>
     </clusternode>
   </clusternodes>
   <fencedevices>
        <fencedevice agent="fence_sanbox2" ipaddr="san_ip_example"
login="login_example" name="sanswitch1" passwd="password_example"/>
   </fencedevices>
   <rm>
   </rm>
</cluster>

클러스터의 모든 구성요소 설정 완료시 5.15절. “클러스터 노드에 설정 파일 전달 ”에서 설명하고 있듯이 클러스터 설정 파일을 모든 노드에 동기화해야 합니다.