此内容没有您所选择的语言版本。

Chapter 10. 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.4/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 the following sections of Deploying Red Hat Enterprise Linux based RHHI to install the physical machine and configure storage on the new node.

    1. Installing host physical machines
    2. Configuring Public Key based SSH Authentication without a password
    3. Configuring RHGS for Hosted Engine using the Cockpit UI
  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 a replacement host”.
    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
      Copy to Clipboard Toggle word wrap
  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.4/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
      Copy to Clipboard Toggle word wrap
    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
      Copy to Clipboard Toggle word wrap
    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>"
      Copy to Clipboard Toggle word wrap
    7. Restart the glusterd service on all nodes

      # systemctl restart glusterd
      Copy to Clipboard Toggle word wrap
    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>
    Copy to Clipboard Toggle word wrap
  7. Move the Hosted Engine into Maintenance mode:

    # hosted-engine --set-maintenance --mode=global
    Copy to Clipboard Toggle word wrap
  8. Stop the ovirt-engine service

    # systemctl stop ovirt-engine
    Copy to Clipboard Toggle word wrap
  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';
    Copy to Clipboard Toggle word wrap
  10. Start the ovirt-engine service

    # systemctl start ovirt-engine
    Copy to Clipboard Toggle word wrap
  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
    Copy to Clipboard Toggle word wrap
  14. Stop high availability services on all nodes

    # systemctl stop ovirt-ha-agent
    # systemctl stop ovirt-ha-broker
    Copy to Clipboard Toggle word wrap
  15. Disconnect Hosted Engine storage from the virtualization host

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

    # hosted-engine --disconnect-storage
    Copy to Clipboard Toggle word wrap
  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
    Copy to Clipboard Toggle word wrap
  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
    Copy to Clipboard Toggle word wrap
  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
      Copy to Clipboard Toggle word wrap
  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
    Copy to Clipboard Toggle word wrap
  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
    Copy to Clipboard Toggle word wrap
  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 subtab.
    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
    Copy to Clipboard Toggle word wrap
返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat