LVMLogicalVolume
Scope: Cluster
Version: v1alpha1
The LVMLogicalVolume resource defines the storage where a PV will be created.
- spec
Required value
- spec.actualLVNameOnTheNode
Required value
LV name on the node.
Pattern:
^[a-z0-9]([a-z0-9-.]{0,251}[a-z0-9])?$
- spec.lvmVolumeGroupName
Required value
The name of a LVMVolumeGroup resource whose VG will be used for LV creation.
Pattern:
^[a-z0-9]([a-z0-9-.]{0,251}[a-z0-9])?$
- spec.size
Required value
The desired LV size. It can be specified as a numerical value or percentage of the total VG or thin pool space. For thin pools, the total space is calculated as the actual thin pool size multiplied by the
allocationLimit
value.Note that if you specify a percentage, the LV will be automatically extended when VG, thin pool, or thin pool’s
allocationLimit
value is increased.Pattern:
^[0-9]+(\.[0-9]+)?(E|P|T|G|M|k|Ei|Pi|Ti|Gi|Mi|Ki)?$|^[1-9][0-9]?%$|100%
Minimal length:
1
- spec.source
Source of the volume, if present.
- spec.source.kind
Required value
Kind of the source. The LVMLogicalVolume kind means that the current resource is a clone. The LVMLogicalVolumeSnapshot kind means that the current resource is a restored volume.
Allowed values:
LVMLogicalVolume
,LVMLogicalVolumeSnapshot
- spec.source.name
Required value
Name of the resource from which the current resource is created.
- spec.thick
- spec.thick.contiguous
If set to
true
, the logical volume will be created with thecontiguous
attribute.Use this attribute carefully, as it may prevent from LV creation even if there is enough space for it.
- spec.thin
Defines the used thin pool. Required only for Thin LV.
- spec.thin.poolName
Required value
Name of the used thin pool.
Pattern:
^.*$
- spec.type
Required value
LV type: Thick or Thin.
Allowed values:
Thick
,Thin
- spec.volumeCleanup
The volume cleanup method after the PV is deleted. If this parameter is not set, there’s no guarantee that the data will be completely deleted.
Allowed values:
RandomFillSinglePass
: The volume will be overwritten with random data once before deletion. This option is not recommended for solid-state drives (SSDs), as overwriting reduces the drive’s lifespan. For thin volumes, only the space in use at the moment of volume deletion will be overwritten.RandomFillThreePass
: The volume will be overwritten with random data three times before deletion. This option is also not recommended for SSDs, as overwriting reduces the drive’s lifespan. For thin volumes, only the space in use at the moment of volume deletion will be overwritten.Discard
: Before deletion, all blocks of the volume will be marked as free using thediscard
system call. This option is applicable only to SSDs and thick volumes.
Allowed values:
RandomFillThreePass
,RandomFillSinglePass
,Discard