DX NetOps

 View Only

How to remove a node from a Cluster Vertica DB composed by four nodes.

  • 1.  How to remove a node from a Cluster Vertica DB composed by four nodes.

    Posted Sep 08, 2024 03:39 PM

    Hello community.

    First, regards from Mexico.

    Well, today I'll share with you the procedure to remove a node from a Cluster Vertica DB composed by four nodes.

    As first step; we must sure that the KSAFE parameter and the quantity of nodes in state UP are meeting the underliyings of Vertica DB for the columns-values designed_fault_tolerance=1, node_count=4, node_down_count=0, current_fault_tolerance=1

    Where,

    designed_fault_tolerance column indicates the set value of KSAFE.
    node_count column indicates the set value for the quantity of nodes that compose the Cluster.
    node_down_count indicates the set value for the quantity of nodes that are in DOWN state -for this procedure, the quantity must be zero-.
    current_fault_tolerance indicates the set value for the quantity that the Cluster is able to support whith nodes in state DOWN in the current state for the whole Cluster.

    To get the past information, execute the next query from vsql:

    SELECT * FROM system;

    If you find a 0 in the column designed_fault_tolerance, execute the next sentences from vsql:

    SELECT DBD_ADD_NODES_REBALANCE_DATA(1);
    SELECT MARK_DESIGN_KSAFE(1);

    Remember that the minimum quantity of nodes to set KSAFE=1 is three nodes, being able to support only one node DOWN.

    For set KSAFE=2, the minimum quantity of nodes to set KSAFE=2 is five nodes, being able to support until two nodes DOWN.

    Remember the scenario: we have a Cluster Vertica DB composed by four nodes, so need remove one of them because we only need three nodes operating. A fourth node is representing a wasting of resources.

    The second step; either from the Vertica Management Console or from adminTools Console of Vertica, we'll remove the fourth node from the DB (this action will remove the whole data in catalog and data folders in this node), not from the Cluster yet -it will be done ahead-.

    Check the changes in the Cluster executing again the next query from vsql:

    SELECT * FROM system;

    Now, you'will see the change for the column node_count=3.

    You can check the changes of the general status of the Cluster too; using either the Vertica Management Console or the adminTools Console of Vertica.

    The final step; using a terminal from a node that will prevalece in the Cluster, you'll execute the next command:
    root#/opt/vertica/sbin/update_vertica --remove-hosts <host that we desire remove from cluster> --rpm /tmp/vertica-version.RHEL<depending the version of OS and Vertica DB>.x86_64.rpm --dba-user mydba

    And it's done, you'll have removed the undesired node in the four nodes-composed Cluster becoming the three nodes-composed Cluster!

    I hope that this information be useful for you.

    Regards, see you later!