Ce contenu n'est pas disponible dans la langue sélectionnée.

Chapter 7. Gluster Block Storage as Backend for Logging and Metrics


Following section guides to configure Gluster Block Storage as the backend storage for logging and metrics

Note

Block volume expansion is now supported in OpenShift Container Storage 3.11. Refer to Section 3.2.3, “Block volume expansion”.

7.1. Prerequisites

Before setting gluster block storage as the backend for logging or metrics, check if the following prerequisites are met:

  • In the storageclass file, check if the default storage class is set to the storage class of gluster block. For example:

    # oc get storageclass
    NAME                TYPE
    gluster-block        gluster.org/glusterblock
    Copy to Clipboard Toggle word wrap
  • If the default is not set to gluster-block (or any other name that you have provided) then execute the following command. For example:

    # oc patch storageclass gluster-block -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
    Copy to Clipboard Toggle word wrap
    • Execute the following command to verify:

      oc get storageclass
      NAME                     TYPE
      gluster-block (default)   gluster.org/glusterblock
      Copy to Clipboard Toggle word wrap

7.2. Enabling Gluster Block Storage as Backend for Logging

Follow the tasks mentioned below to enable Gluster Block Storage as backend for logging:

  1. To enable logging in Openshift Container platform, see https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#install-config-aggregate-logging
  2. The openshift_logging_es_pvc_dynamic ansible variable has to be set to true.

    [OSEv3:vars] openshift_logging_es_pvc_dynamic=true
    Copy to Clipboard Toggle word wrap

    For example, a sample set of variables for openshift_logging_ are listed below.

    openshift_logging_install_logging=true
    openshift_logging_es_pvc_dynamic=true
    openshift_logging_kibana_nodeselector={"node-role.kubernetes.io/infra": "true"}
    openshift_logging_curator_nodeselector={"node-role.kubernetes.io/infra": "true"}
    openshift_logging_es_nodeselector={"node-role.kubernetes.io/infra": "true"}
    openshift_logging_es_pvc_size=10Gi
    openshift_logging_es_pvc_storage_class_name="glusterfs-registry-block"
    Copy to Clipboard Toggle word wrap
  3. Run the Ansible playbook. For more information, see .https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#install-config-aggregate-logging
  4. To verify, execute the following command:

    # oc get pods -n openshift-logging
    Copy to Clipboard Toggle word wrap
Note

7.3. Enabling Gluster Block Storage as Backend for Metrics

Follow the tasks mentioned below to enable Gluster Block Storage as backend for metrics

Note

By default, since Container Native Storage performs three-way replication, data will be available to the restarted node from anywhere in the cluster. As a result, it is recommended that Cassandra-level replication is turned off to avoid capacity overhead

  1. To enable metrics in Openshift Container platform, see https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#install-config-cluster-metrics
  2. The openshift_metrics_cassandra_storage_type ansible variable should be set to dynamic:

    [OSEv3:vars]openshift_metrics_cassandra_storage_type=dynamic
    Copy to Clipboard Toggle word wrap

    For example, a sample set of variables for openshift_metrics_ are listed below.

    openshift_metrics_install_metrics=true
    openshift_metrics_storage_kind=dynamic
    openshift_metrics_hawkular_nodeselector={"node-role.kubernetes.io/infra": "true"}
    openshift_metrics_cassandra_nodeselector={"node-role.kubernetes.io/infra": "true"}
    openshift_metrics_heapster_nodeselector={"node-role.kubernetes.io/infra": "true"}
    openshift_metrics_storage_volume_size=10Gi
    openshift_metrics_cassandra_pvc_storage_class_name="glusterfs-registry-block"
    Copy to Clipboard Toggle word wrap
  3. Run the Ansible playbook. For more information, see https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#install-config-cluster-metrics.
  4. To verify, execute the following command:

    # oc get pods --namespace openshift-infra
    Copy to Clipboard Toggle word wrap

    It should list the following pods running:

    heapster-cassandra
    heapster-metrics
    hawkular-&*9
    Copy to Clipboard Toggle word wrap
Note

7.4. Verifying if Gluster Block is Setup as Backend

Execute the following commands to verify if gluster block is setup as the backend for logging and metrics:

  1. To get an overview of the infrastructure, execute the following command:

    # oc get pods -n logging -o jsonpath='{range .items[].status.containerStatuses[]}{"Name: "}{.name}{"\n  "}{"Image: "}{.image}{"\n"}{"  State: "}{.state}{"\n"}{end}'
    Copy to Clipboard Toggle word wrap
  2. To get the details of all the persistent volume claims, execute the following command:

    # oc get pvc
    Copy to Clipboard Toggle word wrap
  3. To get the details of the pvc, execute the following command:

    # oc describe pvc <claim_name>
    Copy to Clipboard Toggle word wrap

    Verify the volume is mountable and that permissions allow read/write. Also, PVC claim name should match the dynamically provisioned gluster block storage class.

    For more information, see https://access.redhat.com/documentation/en-us/openshift_container_platform/3.11/html-single/configuring_clusters/#install-config-aggregate-logging-sizing.

Retour au début
Red Hat logoGithubredditYoutubeTwitter

Apprendre

Essayez, achetez et vendez

Communautés

À propos de la documentation Red Hat

Nous aidons les utilisateurs de Red Hat à innover et à atteindre leurs objectifs grâce à nos produits et services avec un contenu auquel ils peuvent faire confiance. Découvrez nos récentes mises à jour.

Rendre l’open source plus inclusif

Red Hat s'engage à remplacer le langage problématique dans notre code, notre documentation et nos propriétés Web. Pour plus de détails, consultez le Blog Red Hat.

À propos de Red Hat

Nous proposons des solutions renforcées qui facilitent le travail des entreprises sur plusieurs plates-formes et environnements, du centre de données central à la périphérie du réseau.

Theme

© 2025 Red Hat