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

Chapter 2. Installing the OpenShift Data Foundation Logical Volume Manager Operator using RHACM


The OpenShift Data Foundation Logical Volume Manager Operator is deployed on single node OpenShift (SNO) clusters using Red Hat Advanced Cluster Management for Kubernetes (RHACM). You create a Policy on RHACM that deploys and configures the operator when it is applied to managed clusters which match the selector specified in the PlacementRule. The policy is also be applied to clusters that are imported later and satisfy the PlacementRule.

Prerequisites

  • Access to the RHACM cluster using an account with cluster-admin and operator installation permissions.
  • Dedicated disks on each SNO cluster to be used by OpenShift Data Foundation Logical Volume Manager Operator.
Note

Ensure that no other storage provisioner is installed on the SNO cluster. OpenShift Data Foundation Logical Volume Manager Operator should be the only storage provisioner as it uses all available disks on the node.

Procedure

  1. Log in to the RHACM CLI using your OpenShift credentials.

    For more information, see Install Red Hat Advanced Cluster Management for Kubernetes.

  2. Create a namespace.

    # oc create ns lvm-policy-ns
  3. Create the policy YAML in the namespace.

    # This policy verifies the installation of the official version of the OpenShift Data Foundation
    # Logical Volume Manager Operator on the managed clusters.
    # If set to "enforce" it installs the operator.
    # Used APIs: OLM, ODF-LVMO #https://github.com/operator-framework/operator-lifecycle-manager
    # https://github.com/red-hat-storage/lvm-operator
    
    apiVersion: policy.open-cluster-management.io/v1
    kind: Policy
    metadata:
     annotations:
       policy.open-cluster-management.io/categories: CM Configuration Management
       policy.open-cluster-management.io/controls: CM-2 Baseline Configuration
       policy.open-cluster-management.io/standards: NIST SP 800-53
     name: policy-lvm-operator
    spec:
     disabled: false
     remediationAction: enforce
     policy-templates:
       - objectDefinition:
           apiVersion: policy.open-cluster-management.io/v1
           kind: ConfigurationPolicy
           metadata:
             name: policy-lvm-namespace
           spec:
             object-templates:
               - complianceType: musthave
                 objectDefinition:
                   apiVersion: v1
                   kind: Namespace
                   metadata:
                     name: openshift-storage
                     labels:
                       openshift.io/cluster-monitoring: "true"
             remediationAction: enforce
             severity: high
       - objectDefinition:
           apiVersion: policy.open-cluster-management.io/v1
           kind: ConfigurationPolicy
           metadata:
             name: policy-lvm-operator-operatorgroup
           spec:
             object-templates:
               - complianceType: musthave
                 objectDefinition:
                   apiVersion: operators.coreos.com/v1alpha2
                   kind: OperatorGroup
                   metadata:
                     name: openshift-storage-operatorgroup
                     namespace: openshift-storage
                   spec:
                     targetNamespaces:
                       - openshift-storage
             remediationAction: enforce
             severity: high
       - objectDefinition:
           apiVersion: policy.open-cluster-management.io/v1
           kind: ConfigurationPolicy
           metadata:
             name: policy-lvm-operator-subscription
           spec:
             object-templates:
               - complianceType: musthave
                 objectDefinition:
                   apiVersion: operators.coreos.com/v1alpha1
                   kind: Subscription
                   metadata:
                     name: odf-lvm-operator
                     namespace: openshift-storage
                   spec:
                     channel: stable-4.10
                     installPlanApproval: Automatic
                     name: odf-lvm-operator
                     source: redhat-operators
                     sourceNamespace: openshift-marketplace
                     startingCSV: odf-lvm-operator.v4.10.0
             remediationAction: enforce
             severity: high
       - objectDefinition:
           apiVersion: policy.open-cluster-management.io/v1
           kind: ConfigurationPolicy
           metadata:
             name: policy-lvmcluster
           spec:
             object-templates:
               - complianceType: musthave
                 objectDefinition:
                   apiVersion: lvm.topolvm.io/v1alpha1
                   kind: LVMCluster
                   metadata:
                     name: odf-lvmcluster
                     namespace: openshift-storage
                   spec:
                     storage:
                       deviceClasses:
                       - name: vg1
             remediationAction: enforce
             severity: high
  4. Run the following command:

    # oc create -f policy-lvm-operator.yaml -n lvm-policy-ns

    This creates a Policy, a PlacementRule, and a PlacementBinding. The Policy creates a Namespace, OperatorGroup, Subscription, and LVMCluster resource. This deploys the operator on the SNO clusters which match the selection criteria and configures it to set up the required resources in order to provision storage. The operator uses all the unused disks after installation.

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

© 2026 Red Hat
Retour au début