When you write data to an LVM logical volume, the file system lays the data out across the underlying physical volumes. You can control the way the data is written to the physical volumes by creating a striped logical volume. For large sequential reads and writes, this can improve the efficiency of the data I/O.
Striping enhances performance by writing data to a predetermined number of physical volumes in round-round fashion. With striping, I/O can be done in parallel. In some situations, this can result in near-linear performance gain for each additional physical volume in the stripe.
TopoLVM achieves this by specifying the lvcreate-option-class in the StorageClass.
lvcreate-option-classNavigate to Administrator.
In the left sidebar, go to Storage Management > Storage Classes.
Click Create Storage Class.
Select Block Storage.
Choose TopoLVM, then click Next.
Configure the required storage class parameters.
Switch to YAML view and add the topolvm.io/lvcreate-option-class parameter:
striped-default is a built-in lvcreate-option-class in Alauda Container Platform. It automatically appends --stripes=2 --stripesize=64 to the lvcreate command when the TopoLVM CSI driver provisions logical volumes.
If the built-in striped-default class does not meet your needs, you can define a custom LVCreateOptionClass:
This manifest creates a custom LVCreateOptionClass named striped-custom with 3 stripes and a stripe size of 64 KiB. Once applied, you can reference it in your StorageClass using topolvm.io/lvcreate-option-class: striped-custom.