Chapter 5. Deploy Containerized Storage in Independent Mode

Before following the deployment workflow for your preferred solution, make sure to complete Section 5.1, “Setting up a RHGS Cluster” and review Section 5.2, “Specify Advanced Installer Variables ” to understand ansible variable and playbook recommendations and requirements. To set up storage to containers as a stand-alone Red Hat Gluster Storage cluster, select the workflow that meets your objectives.

Note

5.1. Setting up a RHGS Cluster

In an independent mode set-up a dedicated Red Hat Gluster Storage cluster is available external to the OpenShift Container Platform. The storage is provisioned from the Red Hat Gluster Storage cluster.

5.1.1. Installing Red Hat Gluster Storage Server on Red Hat Enterprise Linux (Layered Install)

Layered install involves installing Red Hat Gluster Storage over Red Hat Enterprise Linux.

Important

It is recommended to create a separate /var partition that is large enough (50GB - 100GB) for log files, geo-replication related miscellaneous files, and other files.
  1. Perform a base install of Red Hat Enterprise Linux 7 Server

    Independent mode is supported only on Red Hat Enterprise Linux 7.
  2. Register the System with Subscription Manager

    Run the following command and enter your Red Hat Network username and password to register the system with the Red Hat Network:
    # subscription-manager register
  3. Identify Available Entitlement Pools

    Run the following commands to find entitlement pools containing the repositories required to install Red Hat Gluster Storage:
    # subscription-manager list --available
  4. Attach Entitlement Pools to the System

    Use the pool identifiers located in the previous step to attach the Red Hat Enterprise Linux Server and Red Hat Gluster Storage entitlements to the system. Run the following command to attach the entitlements:
    # subscription-manager attach --pool=[POOLID]
    For example:
    # subscription-manager attach --pool=8a85f9814999f69101499c05aa706e47
  5. Enable the Required Channels

    For Red Hat Gluster Storage 3.4 on Red Hat Enterprise Linux 7.x

    1. Run the following commands to enable the repositories required to install Red Hat Gluster Storage
      # subscription-manager repos --enable=rhel-7-server-rpms
      # subscription-manager repos --enable=rh-gluster-3-for-rhel-7-server-rpms
      # subscription-manager repos --enable=rhel-7-server-extras-rpms
  6. Verify if the Channels are Enabled

    Run the following command to verify if the channels are enabled:
    # yum repolist
  7. Update all packages

    Ensure that all packages are up to date by running the following command.
    # yum update

    Important

    If any kernel packages are updated, reboot the system with the following command.
    # shutdown -r now
  8. Kernel Version Requirement

    Independent mode requires the kernel-3.10.0-690.el7 version or higher to be used on the system. Verify the installed and running kernel versions by running the following command:
    # rpm -q kernel
    kernel-3.10.0-862.11.6.el7.x86_64
    # uname -r
    3.10.0-862.11.6.el7.x86_64
  9. Install Red Hat Gluster Storage

    Run the following command to install Red Hat Gluster Storage:
    # yum install redhat-storage-server
    1. To enable gluster-block execute the following command:
      # yum install gluster-block
  10. Reboot

    Reboot the system.

5.1.2. Configuring Port Access

This section provides information about the ports that must be open for the independent mode.
Red Hat Gluster Storage Server uses the listed ports. You must ensure that the firewall settings do not prevent access to these ports.
Execute the following commands to open the required ports for both runtime and permanent configurations on all Red Hat Gluster Storage nodes:
# firewall-cmd --zone=zone_name --add-port=24010/tcp --add-port=3260/tcp --add-port=111/tcp --add-port=22/tcp --add-port=24007/tcp --add-port=24008/tcp --add-port=49152-49664/tcp
# firewall-cmd --zone=zone_name --add-port=24010/tcp --add-port=3260/tcp --add-port=111/tcp --add-port=22/tcp --add-port=24007/tcp --add-port=24008/tcp --add-port=49152-49664/tcp --permanent

Note

  • Port 24010 and 3260 are for gluster-blockd and iSCSI targets respectively.
  • The port range starting at 49664 defines the range of ports that can be used by GlusterFS for communication to its volume bricks. In the above example the total number of bricks allowed is 512. Configure the port range based on the maximum number of bricks that could be hosted on each node.

5.1.3. Enabling Kernel Modules

Execute the following commands to enable kernel modules:
  1. You must ensure that the dm_thin_pool and target_core_user modules are loaded in the Red Hat Gluster Storage nodes.
    # modprobe target_core_user
    # modprobe dm_thin_pool
    Execute the following command to verify if the modules are loaded:
    # lsmod | grep dm_thin_pool
    # lsmod | grep target_core_user

    Note

    To ensure these operations are persisted across reboots, create the following files and update each file with the content as mentioned:
    # cat /etc/modules-load.d/dm_thin_pool.conf
    dm_thin_pool
    # cat /etc/modules-load.d/target_core_user.conf
    target_core_user
  2. You must ensure that the dm_multipath module is loaded on all OpenShift Container Platform nodes.
    # modprobe dm_multipath
    Execute the following command to verify if the modules are loaded:
    # lsmod | grep dm_multipath

    Note

    To ensure these operations are persisted across reboots, create the following file and update it with the content as mentioned:
    # cat /etc/modules-load.d/dm_multipath.conf
    dm_multipath

5.1.4. Starting and Enabling Services

Execute the following commands to start glusterd and gluster-blockd:
# systemctl start sshd
# systemctl enable sshd
# systemctl start glusterd
# systemctl enable glusterd
# systemctl start gluster-blockd
# systemctl enable gluster-blockd