Configuring Storage
The piraeus operator can automate some basic storage set up for LINSTOR.
Configuring storage pool creation
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
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
After install
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.
Preparing physical devices
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
Note: You need to use the actual device name, symlinks are not supported, i.e. use /dev/nvme0n1
instead of /dev/disk/by-id/nvme-eui.001b448b465c62be
.
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/vdd
Currently, this method supports creation of LVM and LVMTHIN storage pools.
lvmPools
configuration
name
name of the LINSTOR storage pool. RequiredvolumeGroup
name of the VG to create. RequireddevicePaths
devices to configure for this pool. Must be empty and >= 1GiB to be recognized. OptionalraidLevel
LVM raid level. Optionalvdo
Enable VDO (requires VDO tools in the satellite). OptionalvdoLogicalSizeKib
Size of the created VG (expected to be bigger than the backing devices by using VDO). OptionalvdoSlabSizeKib
Slab size for VDO. Optional
Note that a LVM configuration for Piraeus will result in volume snapshot creation being disabled. If you need volume snapshots, use LVM thin or ZFS.
lvmThinPools
configuration
name
name of the LINSTOR storage pool. RequiredvolumeGroup
VG 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.thinVolume
name of the thinpool. RequireddevicePaths
devices to configure for this pool. Must be empty and >= 1GiB to be recognized. OptionalraidLevel
LVM raid level. Optional
NOTE: The volume group created by LINSTOR for LVMTHIN pools will always follow the scheme "linstor_$THINPOOL".
zfsPools
configuration
name
name of the LINSTOR storage pool. RequiredzPool
name of the zpool to use. Must already be present on all machines. Requiredthin
true
to use thin provisioning,false
otherwise. Required
Using automaticStorageType
(DEPRECATED)
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
:
None
no automatic set up (default)LVM
create a LVM (thick) storage poolLVMTHIN
create a LVM thin storage poolZFS
create a ZFS based storage pool (UNTESTED)