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.

    Copy to Clipboard Toggle word wrap
    # oc create ns lvm-policy-ns
  3. Create the policy YAML in the namespace.

    Copy to Clipboard Toggle word wrap
    # 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:

    Copy to Clipboard Toggle word wrap
    # 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.

Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat, Inc.