Create StorageClass(s)
This document provides step-by-step instructions on creating a custom StorageClass for Local PV LVM, including detailed explanations of supported parameters and their usage. It covers standard and LVM-specific parameters, their development status, E2E test coverage, and how to configure scheduling logic like SpaceWeighted, CapacityWeighted, or VolumeWeighted.
Refer Storage Classes to know all the supported parameters for Local PV LVM.
#
StorageClass Parameters Conformance MatrixThe following matrix shows standard StorageClass parameters for Local PV LVM.
#
Standard StorageClass ParametersParameter | Values | Development Status | E2E Coverage | |
---|---|---|---|---|
allowVolumeExpansion | true | Supported | Yes (Test coverage exist for ext4 & xfs) | |
false | Supported | |||
MountOptions | Options supported by filesystem | Supported | Pending | |
VolumeBindingMode | Immediate | Supported | Yes | |
WaitForFirstConsumer | Supported | |||
Reclaim Policy | Retain | Supported | Yes (Test coverage exist for Delete reclaim policy) | |
Delete | Supported | |||
allowedTopologies | - | Supported | Yes | |
Parameters | Passing Secrets | No Use Case | NA | |
fsType | ext2 | Supported | Yes (Test coverage exist for ext4 & xfs) | |
ext3 | ||||
ext4 | ||||
xfs | ||||
btrfs |
#
LVM Supported StorageClass ParametersParameter | Values | Development Status | E2E Coverage | |
---|---|---|---|---|
Parameters | shared | yes | Supported | Yes |
vgpattern | Regular expression of volume group name | Supported | Yes | |
volgroup | Name of volume group | Supported | Yes | |
thinProvision | yes | Supported | Yes | |
scheduler | SpaceWeighted or CapacityWeighted or VolumeWeighted | Supported | Pending |
#
StorageClass with Scheduler ParametersThe Local PV LVM Driver supports three types of scheduling logic: SpaceWeighted, VolumeWeighted, and CapacityWeighted (Supported from lvm-driver: v0.9.0).
Add the scheduler parameter in storage class and give its value accordingly.
SpaceWeighted is the default scheduler in the Local PV LVM driver, so even if we do not use the scheduler parameter in storageclass, the driver will pick the node where there is a vg with the highest free space adhering to the volgroup/vgpattern parameter.
If CapacityWeighted scheduler is used, then the driver will pick the node containing vg that has the least allocated storage in terms of capacity.
If VolumeWeighted scheduler is used, then the driver will pick the node containing vg (adhering to vgpattern/volgroup parameter) that has the least number of volumes provisioned on it.
#
SupportIf you encounter issues or have a question, file a Github issue, or talk to us on the #openebs channel on the Kubernetes Slack server.