Red Hat Training

A Red Hat training course is available for Red Hat Gluster Storage

6.2. Hosts Operations

6.2.1. Adding Hosts

You must install hosts and configure them with a name and IP address before you can add them to the Red Hat Gluster Storage Console.

Important

If you re-install the Red Hat Gluster Storage Console, you must remove all hosts and reconnect them with the correct SSH keys for the new installation of Red Hat Gluster Storage Console.
Prerequisites

Before you can add a host to Red Hat Gluster Storage, ensure your environment meets the following criteria:

  • The host hardware is Red Hat Enterprise Linux certified. See https://access.redhat.com/ecosystem/#certifiedHardware to confirm that the host has Red Hat certification.
  • The host should have a resolvable hostname or static IP address.
  • On Red Hat Enterprise Linux 7 nodes, register to the Red Hat Gluster Storage Server Channels if firewall needs to be configured automatically as iptables-service package is required.

Procedure 6.1. To Add a Host

Before adding a host, ensure you have the correct IP and password for the host. The process of adding a new host can take some time; you can follow its progress in the Events pane.
  1. Click the Hosts tab to list available hosts.
  2. Click New to open the New Host window.
    New Host Window

    Figure 6.2. New Host Window

  3. Select the Host Cluster for the new host from the drop-down menu.

    Table 6.2. Add Hosts Properties

    Field
    Description
    Host Cluster
    The cluster to which the host belongs.
    Name
    The name of the host. This text field has a 40-character limit and must be a unique name with any combination of uppercase and lowercase letters, numbers, hyphens, and underscores.
    If Nagios is enabled, the host name given in Name field of Add Host window should match the host name given while configuring Nagios.
    Address
    The IP address or resolvable hostname of the host.
    Root Password
    The password of the host's root user. This can only be given when you add the host, it cannot be edited afterwards.
    SSH Public Key
    Copy the contents in the text box to the /root/.ssh/authorized_keys file on the host if you'd like to use the Manager's ssh key instead of using a password to authenticate with the host.
    Automatically configure host firewall
    When adding a new host, the Manager can open the required ports on the host's firewall. This is enabled by default. This is an Advanced Parameter.
    The required ports are opened if this option is selected.
    SSH Fingerprint
    You can fetch the host's ssh fingerprint, and compare it with the fingerprint you expect the host to return, ensuring that they match. This is an Advanced Parameter.

    Note

    For Red Hat Enterprise Linux 7 hosts, iptables-service is used to manage firewall and existing firewalld configurations will not be enforced if "Automatically configure host firewall is chosen."
  4. Enter the Name, and Address of the new host.
  5. Select an authentication method to use with the host:
    1. Enter the root user's password to use password authentication.
    2. Copy the key displayed in the SSH PublicKey field to /root/.ssh/authorized_keys on the host to use public key authentication.
  6. The mandatory steps for adding a Red Hat Gluster Storage host are complete. Click Advanced Parameters to show the advanced host settings:
    1. Optionally disable automatic firewall configuration.
    2. Optionally disable use of JSON protocol.

      Note

      With Red Hat Gluster Storage Console, the communication model between the engine and VDSM now uses JSON protocol, which reduces parsing time. As a result, the communication message format has changed from XML format to JSON format. Web requests have changed from synchronous HTTP requests to asynchronous TCP requests.
    3. Optionally add a host SSH fingerprint to increase security. You can add it manually, or fetch it automatically.
  7. Click OK to add the host and close the window.
    The new host displays in the list of hosts with a status of "Installing" and then it goes to "Initialization" state and the host comes up.

    Note

    The host will be in Up status after the status of "Installing" and "Initialization" state. The host will have Non-Operational status when the host is not compatible with the cluster compatibility version. The Non-Responsive status will be displayed if the host is down or is unreachable.
    You can view the progress of the host installation in the Details pane.

6.2.2. Activating Hosts

After taking down a host for maintenance, you must reactivate it before using it. When you activate a host, the host's networks are checked and glusterd service is restarted.

Procedure 6.2. To Activate a Host

  1. In the Hosts tab, select the host you want to activate.
  2. Click Activate. The host status changes to Up.

6.2.3. Managing Host Network Interfaces

The Network Interfaces tab in Details pane of Hosts enables you to attach a logical network to a host's physical network interface cards. The management network is defined, by default in the cluster. The administration portal automatically assigns the management network to the network interface which has the host address that was provided while adding a host.

Note

Interface with gluster network role should have an IP address configured. Ensure this by clicking Refresh Host Capabilities once host networks are setup.

6.2.3.1. Editing Host Network Interfaces

The Network Interfaces tab displays the name, network name, address, MAC address, speed, and link status for each interface. It also provides several options for managing host network interface cards.

Procedure 6.3. To Edit a Host Network Interface

  1. Click the Hosts tab to display a list of hosts. Select the desired host to display the Details pane.
  2. Click Setup Host Networks to open the Setup Host Networks window.
    Setup Host Networks Window

    Figure 6.3. Setup Host Networks Window

  3. Attach a logical network to a physical host network interface by selecting and dragging the logical network into the Assigned Logical Networks area next to the physical host network interface.
  4. If your logical network definition is not synchronized with the network configuration on the host, select the Sync network check box. A logical network cannot be edited or moved to another interface until it is synchronized.
    Alternatively, right-click the logical network and select a network interface from the drop-down menu.
  5. Configure the logical network:
    1. Hover your cursor over an assigned logical network and click the pencil icon to open the Edit Network window.
    2. Select a Boot Protocol:
      • None
      • DHCP
      • Static - provide the IP and Subnet Mask.
  6. Click OK.
  7. Select Verify connectivity between Host and Engine to run a network check.
  8. Select Save network configuration if you want the network changes to be persistent when you reboot the environment.
  9. Click OK to implement the changes and close the window.

6.2.3.2. Editing Management/Gluster Network Interfaces

The Network Interfaces tab displays the name, network name, address, MAC address, speed, and link status for each interface. In the course of editing the host network interface cards, you may need to check or edit the management network interface. Similar procedure is applicable to Gluster network interface as well.

Note

Interface with gluster network role cannot be changed if gluster bricks are using it.

Important

Clusters and hosts communicate through the management interface. Changing the properties of the management interface can cause the host to become unreachable.

Procedure 6.4. To Edit a Management Network Interface

  1. Click the Hosts tab to display a list of hosts. Select the desired host to display the Details pane.
  2. Edit the logical networks by hovering over an assigned logical network and clicking the pencil icon to open the Edit Management Network window.
    Edit Management Network Dialog Box

    Figure 6.4. Edit Management Network Dialog Box

  3. If your logical network definition is not synchronized with the network configuration on the host, select the Sync network check box.
  4. Select a Boot Protocol:
    • None
    • DHCP
    • Static - provide the IP and Subnet Mask.
  5. Make the required changes to the management network interface:
    1. To attach the ovirtmgmt management network to a different network interface card, select a different interface from the Interface drop-down list.
    2. Select the network setting from None, DHCP or Static. For the Static setting, provide the IP, Subnet and Default Gateway information for the host.
    3. Click OK to confirm the changes.
    4. Select Verify connectivity between host and engine if required.
    5. Select Save network configuration to make the changes persistent when you reboot the environment.
  6. Click OK.
  7. Activate the host. See Section 6.2.2, “Activating Hosts”.

6.2.4. Managing Gluster Sync

Gluster Sync periodically fetches the latest cluster configuration from glusterFS and synchronizes it with the engine database. The Red Hat Gluster Storage Console continuously monitors storage clusters for the addition and removal of hosts. If a change is detected, an action item displays in the Cluster tab with the option to Import or Detach the host.

Procedure 6.5. To Import a Host to a Cluster

  1. Click the Cluster tab and select a cluster to display the General tab with details of the cluster.
  2. In Action Items, click Import to display the Add Hosts window.
    Add Hosts Window

    Figure 6.5. Add Hosts Window

  3. Enter the Name and Root Password. Select Use a common password if you want to use the same password for all hosts.
  4. Click Apply.
  5. Click OK to add the host to the cluster.

Procedure 6.6. To Detach a Host from a Cluster

  1. Click the Cluster tab and select a cluster to display the General tab with details of the cluster.
  2. In Action Items, click Detach to display the Detach Hosts window.
  3. Select the host you want to detach and click OK. Select Force Detach if you want to perform force removal of the host from the cluster.

6.2.5. Deleting Hosts

You can permanently remove hosts that are not in use. Deleting unused hosts saves system resources, as existing hosts are contacted at regular intervals.

Note

You can not remove hosts if it has volumes in it. Removing a host will detach the host from the cluster.

Procedure 6.7. To Delete a Host

  1. Click the Hosts tab to display a list of hosts. Select the host you want to remove. If the required host is not visible, perform a search.
  2. Click Maintenance to place the host into maintenance. Click OK to confirm the action. The Status field of the host changes to Preparing for Maintenance, followed by Maintenance. The icon changes to indicate that the host is in maintenance mode.

    Important

    If you move the Hosts under Maintenance mode, it stops all gluster process such as brick, self-heal, and geo-replication. If you wish to reuse this host, ensure to remove the gluster related information stored in /var/lib/glusterd manually.
  3. Click Remove.
  4. Click OK to confirm.

6.2.6. Managing Storage Devices

You can view the list of storage devices and create bricks through Red Hat Gluster Storage Console.

Note

Click Sync to synchronize the storage devices from the selected host. By default, the synchronization will happen after every 2 hour.

Important

RAID volumes must be provisioned externally before creating bricks. RAID configuration(RAID Type, No if disks, strip size) entered in the create brick dialog should match exactly with values used while creating RAID volume for better performance.

Procedure 6.8. Creating Bricks

  1. Click the Hosts tab to display a list of hosts.
  2. Select a host and select the Storage Devices sub-tab. The list of storage devices is displayed.
  3. Select a storage device from the list and click Create Brick. The Create Brick page is displayed..
  4. Enter the Brick Name, Mount Point name, and the No. of Physical Disks in RAID Volume.
    The Mount Point is auto-suggested and can be edited.
  5. Confirm the Raid Type.
  6. Click OK. A new thinly provisioned logical volume is created with recommended Red Hat Gluster Storage configurations using the selected storage devices. This Logical Volume will be mounted at the specified mount point and this mount point can be used as brick in gluster volume.

Important

Once the bricks are created from the UI and before using them to create a volume perform the following on all the nodes in the cluster:
  • semanage fcontext -a -t glusterd_brick_t '/rhgs/brick1(/.*)?'
  • restorecon -Rv /rhgs/brick1
Replace /rhgs/brick1 with your actual brick path.