B.3.5. Testing the Resource Configuration

download PDF
In the cluster status display shown in Section B.3.4, “Creating the Resources and Resource Groups with the pcs Command”, all of the resources are running on node You can test whether the resource group fails over to node by using the following procedure to put the first node in standby mode, after which the node will no longer be able to host resources.
  1. The following command puts node in standby mode.
    root@z1 ~]# pcs cluster standby
  2. After putting node z1 in standby mode, check the cluster status. Note that the resources should now all be running on 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
    Stack: corosync
    Current DC: (2) - partition with quorum
    Version: 1.1.10-5.el7-9abe687
    2 Nodes configured
    6 Resources configured
    Node (1): standby
    Online: [ ]
    Full list of resources:
     myapc	(stonith:fence_apc_snmp):	Started 
     Resource Group: apachegroup
         my_lvm	(ocf::heartbeat:LVM):	Started 
         my_fs	(ocf::heartbeat:Filesystem):	Started 
         VirtualIP	(ocf::heartbeat:IPaddr2):	Started 
         Website	(ocf::heartbeat:apache):	Started
    The web site at the defined IP address should still display, without interruption.
  3. To remove z1 from standby mode, enter the following command.
    root@z1 ~]# pcs cluster unstandby


    Removing a node from standby mode does not in itself cause the resources to fail back over to that node. For information on controlling which node resources can run on, see the chapter on configuring cluster resources in the Red Hat High Availability Add-On Reference.
Red Hat logoGithubRedditYoutubeTwitter


Try, buy, & sell


About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.