Red Hat Training

A Red Hat training course is available for RHEL 8

5.5. 리소스 구성 테스트

다음 절차에 따라 클러스터에서 리소스 구성을 테스트합니다.

리소스 및 리소스 그룹 생성에 표시된 클러스터 상태 표시에서 모든 리소스 는 노드 z1.example.com 에서 실행됩니다. 다음 절차를 사용하여 노드가 더 이상 리소스를 호스팅할 수 없게 되면 해당 노드에서 첫 번째 노드를 대기 모드로 전환하여 리소스 그룹이 z2.example.com 노드에 실패하는지 테스트할 수 있습니다.

절차

  1. 다음 명령은 노드 z1.example.comstandby 모드에 둡니다.

    [root@z1 ~]# pcs node standby z1.example.com
  2. 노드 z1standby 모드로 전환한 후 클러스터 상태를 확인합니다. 이제 리소스가 모두 z2 에서 실행 중이어야 합니다.

    [root@z1 ~]# pcs status
    Cluster name: my_cluster
    Last updated: Wed Jul 31 17:16:17 2013
    Last change: Wed Jul 31 17:18:34 2013 via crm_attribute on z1.example.com
    Stack: corosync
    Current DC: z2.example.com (2) - partition with quorum
    Version: 1.1.10-5.el7-9abe687
    2 Nodes configured
    6 Resources configured
    
    Node z1.example.com (1): standby
    Online: [ z2.example.com ]
    
    Full list of resources:
    
     myapc	(stonith:fence_apc_snmp):	Started z1.example.com
     Resource Group: apachegroup
         my_lvm	(ocf::heartbeat:LVM-activate):	Started z2.example.com
         my_fs	(ocf::heartbeat:Filesystem):	Started z2.example.com
         VirtualIP	(ocf::heartbeat:IPaddr2):	Started z2.example.com
         Website	(ocf::heartbeat:apache):	Started z2.example.com

    정의된 IP 주소의 웹 사이트는 중단 없이 계속 표시되어야 합니다.

  3. 대기 모드에서 z1 을 제거하려면 다음 명령을 입력합니다.

    [root@z1 ~]# pcs node unstandby z1.example.com
    참고

    standby 모드에서 노드를 제거해도 리소스가 해당 노드로 다시 장애 조치됩니다. 이 작업은 리소스의 resource-stickiness 값에 따라 달라집니다. resource-stickiness meta 속성에 대한 자세한 내용은 현재 노드를 선호하도록 리소스 구성을 참조하십시오.