The piraeus operator can automate some basic storage set up for LINSTOR.
The piraeus operator can be used to create LINSTOR storage pools. Creation is under control of the LinstorSatelliteSet resource:
$ kubectl get LinstorSatelliteSet.piraeus.linbit.com piraeus-op-ns -o yaml
kind: LinstorSatelliteSet
metadata:
..
spec:
..
storagePools:
lvmPools:
- name: lvm-thick
volumeGroup: drbdpool
lvmThinPools:
- name: lvm-thin
thinVolume: thinpool
volumeGroup: drbdpool
zfsPools:
- name: my-linstor-zpool
zPool: for-linstor
thin: true
At install time, by setting the value of operator.satelliteSet.storagePools when running helm install.
First create a file with the storage configuration like:
operator:
satelliteSet:
storagePools:
lvmPools:
- name: lvm-thick
volumeGroup: drbdpool
..This file can be passed to the helm installation like this:
helm install -f <file> charts/piraeus-op
On a cluster with the operator already configured (i.e. after helm install),
you can edit the LinstorSatelliteSet configuration like this:
$ kubectl edit LinstorSatelliteSet.piraeus.linbit.com <satellitesetname>
The storage pool configuration can be updated like in the example above.
By default, LINSTOR expects the referenced VolumeGroups, ThinPools and so on to be present. You can use the
devicePaths: [] option to let LINSTOR automatically prepare devices for the pool. Eligible for automatic configuration
are block devices that:
- Are a root device (no partition)
- do not contain partition information
- have more than 1 GiB
To enable automatic configuration of devices, set the devicePaths key on storagePools entries:
storagePools:
lvmPools:
- name: lvm-thick
volumeGroup: drbdpool
devicePaths:
- /dev/vdb
lvmThinPools:
- name: lvm-thin
thinVolume: thinpool
volumeGroup: linstor_thinpool
devicePaths:
- /dev/vdc
- /dev/vddCurrently, this method supports creation of LVM and LVMTHIN storage pools.
namename of the LINSTOR storage pool. RequiredvolumeGroupname of the VG to create. RequireddevicePathsdevices to configure for this pool. Must be empty and >= 1GiB to be recognized. OptionalraidLevelLVM raid level. OptionalvdoEnable VDO (requires VDO tools in the satellite). OptionalvdoLogicalSizeKibSize of the created VG (expected to be bigger than the backing devices by using VDO). OptionalvdoSlabSizeKibSlab size for VDO. Optional
namename of the LINSTOR storage pool. RequiredvolumeGroupVG to use for the thin pool. If you want to usedevicePaths, you must set this to"". This is required because LINSTOR does not allow configuration of the VG name when preparing devices.thinVolumename of the thinpool. RequireddevicePathsdevices to configure for this pool. Must be empty and >= 1GiB to be recognized. OptionalraidLevelLVM raid level. Optional
NOTE: The volume group created by LINSTOR for LVMTHIN pools will always follow the scheme "linstor_$THINPOOL".
namename of the LINSTOR storage pool. RequiredzPoolname of the zpool to use. Must already be present on all machines. Requiredthintrueto use thin provisioning,falseotherwise. Required
ALL eligible devices will be prepared according to the value of operator.satelliteSet.automaticStorageType, unless
they are already prepared using the storagePools section. Devices are added to a storage pool based on the device
name (i.e. all /dev/nvme1 devices will be part of the pool autopool-nvme1)
The possible values for operator.satelliteSet.automaticStorageType:
Noneno automatic set up (default)LVMcreate a LVM (thick) storage poolLVMTHINcreate a LVM thin storage poolZFScreate a ZFS based storage pool (UNTESTED)