Chapter 6. Replacing the Primary Gluster Storage Node

Important

When self-signed encryption is enabled, replacing a node is a disruptive process that requires virtual machines and the Hosted Engine to be shut down.

  1. (Optional) If encryption using a Certificate Authority is enabled, follow the steps at the following link before continuing: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.2/html/administration_guide/ch22s04.
  2. Move the node to be replaced into Maintenance mode

    1. In Red Hat Virtualization Manager, click the Hosts tab and select the Red Hat Gluster Storage node in the results list.
    2. Click Maintenance to open the Maintenance Host(s) confirmation window.
    3. Click OK to move the host to Maintenance mode.
  3. Install the replacement node

    Follow the instructions in Deploying Red Hat Hyperconverged Infrastructure to install the physical machine and configure storage on the new node.

  4. Prepare the replacement node

    1. Create a file called replace_node_prep.conf based on the template provided in Section B.2, “Example gdeploy configuration file for preparing to replace a node”.
    2. From a node with gdeploy installed (usually the node that hosts the Hosted Engine), run gdeploy using the new configuration file:

      # gdeploy -c replace_node_prep.conf
  5. (Optional) If encryption with self-signed certificates is enabled

    1. Generate the private key and self-signed certificate on the replacement node. See the Red Hat Gluster Storage Administration Guide for details: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.2/html/administration_guide/chap-network_encryption#chap-Network_Encryption-Prereqs.
    2. On a healthy node, make a backup copy of the /etc/ssl/glusterfs.ca file:

      # cp /etc/ssl/glusterfs.ca /etc/ssl/glusterfs.ca.bk
    3. Append the new node’s certificate to the content of the /etc/ssl/glusterfs.ca file.
    4. Distribute the /etc/ssl/glusterfs.ca file to all nodes in the cluster, including the new node.
    5. Run the following command on the replacement node to enable management encryption:

      # touch /var/lib/glusterd/secure-access
    6. Include the new server in the value of the auth.ssl-allow volume option by running the following command for each volume.

      # gluster volume set <volname> auth.ssl-allow "<old_node1>,<old_node2>,<new_node>"
    7. Restart the glusterd service on all nodes

      # systemctl restart glusterd
    8. Follow the steps in Section 4.1, “Configuring TLS/SSL using self-signed certificates” to remount all gluster processes.
  6. Add the replacement node to the cluster

    Run the following command from any node already in the cluster.

    # peer probe <new_node>
  7. Move the Hosted Engine into Maintenance mode:

    # hosted-engine --set-maintenance --mode=global
  8. Stop the ovirt-engine service

    # systemctl stop ovirt-engine
  9. Update the database

    # sudo -u postgres psql
    \c engine;
    UPDATE storage_server_connections SET connection ='<replacement_node_IP>:/engine' WHERE connection = ‘<old_server_IP>:/engine';
    UPDATE storage_server_connections SET connection ='<replacement_node_IP>:/vmstore' WHERE connection = ‘<old_server_IP>:/vmstore';
    UPDATE storage_server_connections SET connection ='<replacement_node_IP>:/data' WHERE connection = '<old_server_IP>:/data';
  10. Start the ovirt-engine service

    # systemctl start ovirt-engine
  11. Stop all virtual machines except the Hosted Engine.
  12. Move all storage domains except the Hosted Engine domain into Maintenance mode
  13. Stop the Hosted Engine virtual machine

    Run the following command on the existing node that hosts the Hosted Engine.

    # hosted-engine --vm-shutdown
  14. Stop high availability services on all nodes

    # systemctl stop ovirt-ha-agent
    # systemctl stop ovirt-ha-broker
  15. Disconnect Hosted Engine storage from the hypervisor

    Run the following command on the existing node that hosts the Hosted Engine.

    # hosted-engine --disconnect-storage
  16. Update the Hosted Engine configuration file

    Edit the storage parameter in the /etc/ovirt-hosted-engine/hosted-engine.conf file to use the replacement server.

    storage=<replacement_server_IP>:/engine
  17. Reboot the existing and replacement nodes

    Wait until both nodes are available before continuing.

  18. Take the Hosted Engine out of Maintenance mode

    # hosted-engine --set-maintenance --mode=none
  19. Verify replacement node is used

    On all virtualization hosts, verify that the engine volume is mounted from the replacement node by checking the IP address in the output of the mount command.

  20. Activate storage domains

    Verify that storage domains mount using the IP address of the replacement node.

  21. Remove the old node

    1. Using the RHV Management UI, remove the old node.
    2. Detach the old host from the cluster.

      # gluster peer detach <old_node_IP> force
  22. Using the RHV Management UI, add the replacement node

    Specify that the replacement node be used to host the Hosted Engine.

  23. Move the replacement node into Maintenance mode.

    # hosted-engine --set-maintenance --mode=global
  24. Update the Hosted Engine configuration file

    Edit the storage parameter in the /etc/ovirt-hosted-engine/hosted-engine.conf file to use the replacement node.

    storage=<replacement_node_IP>:/engine
  25. Reboot the replacement node.

    Wait until the node is back online before continuing.

  26. Activate the replacement node from the RHV Management UI.

    Ensure that all volumes are mounted using the IP address of the replacement node.

  27. Replace engine volume brick

    Replace the brick on the old node that belongs to the engine volume with a new brick on the replacement node.

    1. Click the Volumes tab.
    2. Click the Bricks sub-tab.
    3. Select the brick to replace, and then click Replace brick.
    4. Select the node that hosts the brick being replaced.
    5. In the Replace brick window, provide the new brick’s path.
  28. On the replacement node, run the following command to remove metadata from the previous host.

    # hosted-engine --clean-metadata --host-id=<old_host_id> --force-clean