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-lockshutdown-lock: true shutdown-lock-limit: 0클러스터 상태를 확인합니다. 이 예에서
세 번째및5번째리소스는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.comStopping 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.comStarting Cluster...이 예제에서
세번째와5번째는 노드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 ...