Previous  |  Next  >  
Product: Cluster Server Guides   
Manual: Cluster Server 4.1 Installation Guide   

Removing a Node from a Cluster

Removing a node from a cluster involves the following activities:

  • Switching or removing any VCS service groups on that node. The node cannot be removed as long as it runs service groups on which other service groups depend.
  • Deleting the system from the VCS configuration.
  • Modifying the llthosts and gabtab files to reflect the change.
  • Modifying startup scripts for LLT, GAB, and VCS to allow reboot of the node without affecting the cluster.

Example of Removing a Node

In the following example, the cluster consists of nodes A, B, and C; node C is to leave the cluster. Start by issuing the following commands from one of the nodes to remain, A or B:

  1. Make a backup copy of the current configuration file, main.cf:
      # cp -p /etc/VRTSvcs/conf/config/main.cf
         /etc/VRTSvcs/conf/config/main.cf.goodcopy
  2. Check the status of the systems and the service groups:
      # hastatus -summary
      
      -- SYSTEM STATE
      -- System      State          Frozen
      A  A           RUNNING        0
      A  B           RUNNING        0
      A  C           RUNNING        0

      -- GROUP STATE
      -- Group    System      Probed   AutoDisabled   State
      B  grp1     A           Y        N              ONLINE
      B  grp1     B           Y        N              OFFLINE
      B  grp2     A           Y        N              ONLINE
      B  grp3     B           Y        N              OFFLINE
      B  grp3     C           Y        N              ONLINE
      B  grp4     C           Y        N              ONLINE

    The example output from the hastatus command shows that systems A, B, and C are the nodes in the cluster. Also, service group grp3 is configured to run on system B and system C, the leaving node. Service group grp4 runs only on system C. Service groups grp1 and grp2 do not run on system C.

  3. Switch failover service groups from the leaving node. You can switch grp3 from system C to system B:
      # hagrp -switch grp3 -to B
  4. Check for any dependencies involving any service groups that run on the leaving node; for example, grp4 runs only on the leaving node:
      # hagr p -dep

    If the service group on the leaving node requires other service groups, that is, if it is a parent to service groups on other nodes, unlink the service groups:


      # haconf -makerw
      # hagrp -unlink grp4 grp1

    These commands enable you to edit the configuration and to remove the requirement grp4 has for grp1.

  5. Stop VCS on the leaving node:
      # hastop -sys C
  6. Check the status again. The leaving node should show a state of EXITED. Also, any service groups set up for failover should be ONLINE on other nodes:
       # hastatus -summary
      
      -- SYSTEM STATE
      -- System      State          Frozen
      A  A           RUNNING        0
      A  B           RUNNING        0
      A  C           EXITED         0

      -- GROUP STATE
      -- Group    System      Probed   AutoDisabled   State
      B  grp1     A           Y        N              ONLINE
      B  grp1     B           Y        N              OFFLINE
      B  grp2     A           Y        N              ONLINE
      B  grp3     B           Y        N              ONLINE
      B  grp3     C           Y        Y              OFFLINE
      B  grp4     C           Y        N              OFFLINE
  7. Delete the leaving node from the SystemList of service groups grp3 and grp4.
      # hagrp -modify grp3 SystemList -delete C
      # hagrp -modify grp4 SystemList -delete C
  8. For service groups that run only on the leaving node, delete the resources from the group before deleting the group:
      # hagrp -resources grp4
      processx_grp4
      processy_grp4
      # hares -delete processx_grp4
      # hares -delete processy_grp4
  9. Delete the service group:
      # hagrp -delete grp4
  10. Check the status:
      # hastatus -summary
      -- SYSTEM STATE
      -- System      State          Frozen
      A  A           RUNNING        0
      A  B           RUNNING        0
      A  C           EXITED         0

      -- GROUP STATE
      -- Group    System      Probed   AutoDisabled   State
      B  grp1     A           Y        N              ONLINE
      B  grp1     B           Y        N              OFFLINE
      B  grp2     A           Y        N              ONLINE
      B  grp3     B           Y        N              ONLINE
  11. Delete the node from the cluster:
      hasys -delete C
  12. Save the configuration, making it read only:
      haconf -dump -makero

Modifying Configuration Files On Each Remaining Node

  1. If necessary, modify the /etc/gabtab file. No change is required to this file if the /sbin/gabconfig command has only the argument -c, although it is recommended to use the -nN option, where N is the number of cluster systems. If the command has the form /sbin/gabconfig -c -nN, where N is the number of cluster systems, then make sure that N is not greater than the actual number of nodes in the cluster, or GAB does not automatically seed.
    Note   Note    The use of the -c -x option for /sbin/gabconfig is not recommended. The Gigabit Ethernet controller does not support the use of -c -x.
  2. Modify /etc/llthosts file on each remaining system to remove the entry of the leaving node. For example, change:
      0 A
      1 B
      2 C

    to:


      0 A
      1 B

Unloading LLT and GAB and Removing VCS On the Leaving Node

On the node leaving the cluster, unconfigure and unload the LLT and GAB utilities, and remove the VCS packages. Refer to Removing VCS Packages Using swremove.

 ^ Return to Top Previous  |  Next  >  
Product: Cluster Server Guides  
Manual: Cluster Server 4.1 Installation Guide  
VERITAS Software Corporation
www.veritas.com