Device classes
To define custom storage groups, create custom device classes by adding a device-classes array to your logical volume manager storage (LVMS) configuration. With this configuration, you can enable MicroShift to categorize devices based on your specific storage requirements.
Add the array to the /etc/microshift/lvmd.yaml configuration file. A single device class must be set as the default. You must restart MicroShift for configuration changes to take effect.
|
|
Removing a device class while there are still persistent volumes or |
You can define multiple device classes in the device-classes array. These classes can be a mix of thick and thin volume configurations.
device-class arraysocket-name: /run/topolvm/lvmd.sock
device-classes:
- name: ssd
volume-group: ssd-vg
spare-gb: 0
default: true
- name: hdd
volume-group: hdd-vg
spare-gb: 0
- name: thin
spare-gb: 0
thin-pool:
name: thin
overprovision-ratio: 10
type: thin
volume-group: ssd
- name: striped
volume-group: multi-pv-vg
spare-gb: 0
stripe: 2
stripe-size: "64"
lvcreate-options:
-
device-classes.spare-gb`: Specifies the spare capacity. When you set this value to anything other than
0, more space can be allocated than expected. -
device-classes.lvcreate-options: Specifies extra arguments to pass to thelvcreatecommand, such as--type=<type>. Neither MicroShift nor the LVMS verifieslvcreate-optionsvalues. These optional values are passed as is to thelvcreatecommand. Ensure that the options specified here are correct.