23.2. shutdown-lock 클러스터 속성 설정
다음 예제에서는 shutdown-lock
클러스터 속성을 예제 클러스터에서 true
로 설정하고 노드가 종료되고 다시 시작될 때 미치는 영향을 보여줍니다. 이 예제 클러스터는 z1.example.com, z
2.example.com
및 z3.example.com
의 세 개의 노드로 구성됩니다.
절차
shutdown-lock
속성을true
로 설정하고 값을 확인합니다. 이 예에서shutdown-lock-limit
속성은 기본값인 0을 유지 관리합니다.[root@z3 ~]# pcs property set shutdown-lock=true [root@z3 ~]# pcs property list --all | grep shutdown-lock shutdown-lock: true shutdown-lock-limit: 0
클러스터 상태를 확인합니다. 이 예에서
세 번째 및
리소스는다섯
번째z1.example.com
에서 실행됩니다.[root@z3 ~]# pcs status ... Full List of Resources: ... * first (ocf::pacemaker:Dummy): Started z3.example.com * second (ocf::pacemaker:Dummy): Started z2.example.com * third (ocf::pacemaker:Dummy): Started z1.example.com * fourth (ocf::pacemaker:Dummy): Started z2.example.com * fifth (ocf::pacemaker:Dummy): Started z1.example.com ...
해당 노드에서 실행 중인 리소스를 중지하는
z1.example.com
을 종료합니다.[root@z3 ~] # pcs cluster stop z1.example.com Stopping Cluster (pacemaker)... Stopping Cluster (corosync)...
pcs status
명령을 실행하면z1.example.com
노드가 오프라인 상태이고 노드가 다운된 상태에서z1.example.com
에서 실행 중인 리소스가LOCKED
로 표시됩니다.[root@z3 ~]# pcs status ... Node List: * Online: [ z2.example.com z3.example.com ] * OFFLINE: [ z1.example.com ] Full List of Resources: ... * first (ocf::pacemaker:Dummy): Started z3.example.com * second (ocf::pacemaker:Dummy): Started z2.example.com * third (ocf::pacemaker:Dummy): Stopped z1.example.com (LOCKED) * fourth (ocf::pacemaker:Dummy): Started z3.example.com * fifth (ocf::pacemaker:Dummy): Stopped z1.example.com (LOCKED) ...
클러스터에 다시 참여하도록
z1.example.com
에서 클러스터 서비스를 다시 시작합니다. 잠긴 리소스는 해당 노드에서 시작해야 하지만, 시작하면 반드시 동일한 노드에 남아 있지는 않습니다.[root@z3 ~]# pcs cluster start z1.example.com Starting Cluster...
이 예에서는
3차 및
노드가다섯
번째z1.example.com
에서 복구됩니다.[root@z3 ~]# pcs status ... Node List: * Online: [ z1.example.com z2.example.com z3.example.com ] Full List of Resources: .. * first (ocf::pacemaker:Dummy): Started z3.example.com * second (ocf::pacemaker:Dummy): Started z2.example.com * third (ocf::pacemaker:Dummy): Started z1.example.com * fourth (ocf::pacemaker:Dummy): Started z3.example.com * fifth (ocf::pacemaker:Dummy): Started z1.example.com ...