Skip to main content
Version: main

Local PV LVM VAC Parameters

Overview

VolumeAttributesClass (VAC) parameters allow you to define Quality of Service (QoS) policies for Local PV LVM volumes.

These parameters control IOPS and bandwidth limits for filesystem and block-mode volumes provisioned through Local PV LVM. QoS policies are enforced at the node level using Linux cgroup v2 controls.

Supported VAC Parameters

The following VAC parameters are supported for Local PV LVM volumes.

ParameterDescriptionAccepted Values
qosIopsLimitMaximum Read/Write IOPS limitNon-zero positive integer or max
qosIopsReadLimitMaximum read IOPS limitNon-zero positive integer or max
qosIopsWriteLimitMaximum write IOPS limitNon-zero positive integer or max
qosBandwithPerSecMaximum Read/Write bandwidth per secondNon-zero positive integer (bytes/sec) or supported size suffixes such as 7000Mi
qosBandwithReadPerSecMaximum read bandwidth per secondNon-zero positive integer (bytes/sec) or supported size suffixes such as 7000Mi
qosBandwithWritePerSecMaximum write bandwidth per secondNon-zero positive integer (bytes/sec) or supported size suffixes such as 7000Mi
note

Setting an IOPS parameter to max disables IOPS limiting for that parameter on the volume. A value of 0 is not supported for IOPS or bandwidth parameters.

Example VAC Configuration

The following example configures total IOPS and bandwidth limits using a VAC.

apiVersion: storage.k8s.io/v1
kind: VolumeAttributesClass
metadata:
name: lvm-qos-high
driverName: local.csi.openebs.io
parameters:
qosIopsLimit: "50000"
qosBandwithPerSec: "5000000"

Example Directional QoS Configuration

The following example configures separate read and write QoS limits.

apiVersion: storage.k8s.io/v1
kind: VolumeAttributesClass
metadata:
name: lvm-qos-directional
driverName: local.csi.openebs.io
parameters:
qosIopsReadLimit: "100"
qosIopsWriteLimit: "200"
qosBandwithReadPerSec: "7000Mi"
qosBandwithWritePerSec: "8000Mi"

Update VAC QoS Parameters

You can modify the QoS policy applied to a PVC by updating the volumeAttributesClassName field to reference a different VAC.

Example Updated VAC

apiVersion: storage.k8s.io/v1
kind: VolumeAttributesClass
metadata:
name: lvm-qos-low
driverName: local.csi.openebs.io
parameters:
qosIopsLimit: "20"
qosBandwithPerSec: "20000"

Example Updated PVC

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: lvm-pvc
spec:
accessModes:
- ReadWriteOnce
storageClassName: openebs-lvm
volumeAttributesClassName: lvm-qos-low
resources:
requests:
storage: 5Gi

Apply the updated PVC configuration:

kubectl apply -f pvc.yaml

After the PVC is updated, OpenEBS Local PV LVM automatically reconciles and applies the new QoS settings associated with the updated VolumeAttributesClass.

Invalid VAC Parameter Example

Conflicting QoS Parameters

The following example uses conflicting QoS parameter values.

apiVersion: storage.k8s.io/v1
kind: VolumeAttributesClass
metadata:
name: lvm-qos-conflict
driverName: local.csi.openebs.io
parameters:
qosIopsLimit: "max"
qosIopsReadLimit: "1000"

Verify VAC QoS Configuration

Use the following command to verify the PVC configuration.

kubectl describe pvc <pvc-name>

Expected Results

  • The PVC references the updated VAC
  • Updated QoS parameters are applied to the Local PV LVM volume
  • QoS reconciliation completes automatically on supported Kubernetes versions

Support

If you encounter issues or have a question, file a Github issue, or talk to us on the #openebs channel on the Kubernetes Slack server.

See Also