Failed to extend the lvm thinpool when adding devicepaths to optionalPaths

Solution Verified - Updated -

Issue

  • When deploying an LVMCluster with the following configuration in spec.storage.deviceClasses.deviceSelector.optionalPaths, a volume group is created successfully:

    apiVersion: lvm.topolvm.io/v1alpha1
    kind: LVMCluster
    metadata:
      name: lvmcluster
      namespace: openshift-storage
    spec:
      storage:
        deviceClasses:
          - deviceSelector:
              optionalPaths:
                - /dev/sdb
            fstype: xfs
            thinPoolConfig:
              chunkSizeCalculationPolicy: Static
              sizePercent: 90
              name: thin-pool-1
              overprovisionRatio: 10
            default: true
            name: vg1
    
  • However, when attempting to add a new device path to spec.storage.deviceClasses.deviceSelector.optionalPaths afterward,

    spec:
      storage:
        deviceClasses:
          - deviceSelector:
              optionalPaths:
                - /dev/sdb
                - /dev/disk/by-id/scsi-XXXXXXXXXXXXXXXXXXXXXXXXXXXXX   <<<==== add
    
  • the following error occurs, and the device cannot be added:

    error on node openshift-storage/<node-name> in volume group openshift-storage/vg1: failed to create thin pool thin-pool-1 for volume group vg1: failed to extend the lvm thinpool thin-pool-1 in volume group vg1: VgSize (g) and lvSize (0), units do not match and cannot be used for extension
    

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • 4.17
  • LVM Storage Operator (LVMS)
    • 4.17.2

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content