24.2. shutdown-lock 클러스터 속성 설정
다음 예제에서는 클러스터 예제에서 shutdown-lock 클러스터 속성을 true 로 설정하고 노드가 종료되고 다시 시작될 때 이 효과를 보여줍니다. 이 예제 클러스터는 z1.example.com,z2.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...이 예에서 resouces
thirdand fiveth는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 ...