Shoot CSI features
The following details the possibilities the OSC Container Storage Interface (CSI) offers to customize the creation of Persistent Volumes.
Volume extension
It is possible to extend an existing Persistent Volume. Shrinking a volume is not supported.
To extend a volume, follow the following steps:
-
Edit the volume's PersistentVolumeClaim (PVC) object, and change the storage resource request:
-
The PVC's status reflects the resize request (the
speccontains the extended size, thestatusstill shows the original size): -
The Pod using the PVC needs to re-initialize its storage. A simple Pod restart is not sufficient. One of the following methods can be used:
-
Preferred Method: Cordon the Pod's Node and delete the Pod. This will force the Pod to be started on a different Node, during which the storage will be re-initialized. After the new Pod is started, uncordon the cordoned Node.
-
Alternative Method: Delete the VolumeAttachment object of the extended volume and delete the Pod.
WarningUsing this method may cause inconsistency or disruption in the application using the volume.
Get the PersistentVolume used by the change PVC:
Get the VolumeAttachment for the identified Volume:
Delete the identified VolumeAttachment and the Pod.
After the Pod is restarted, the sizes both in
specandstatuswill reflect the extended size. -
Custom storage class with more inodes
Apply following manifest to create a storage class which allows higher number of inodes per volume.
Custom storage class with XFS filesystem
Apply following manifest to create a storage class which will use the XFS filesystem for the volumes:
Provisioning a Persistent Volume without a filesystem
It is possible to provision a Persistent Volume with a bare block device, created without any filesystem. This feature can be used for example with certain databases, which create their own on-disk structures.
To create such volume, set the PVC's volumeMode to Block: