This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.5.3. Expanding FlexVolume with a supported driver
When using FlexVolume to connect to your back-end storage system, you can expand persistent storage volumes after they have already been created. This is done by manually updating the persistent volume claim (PVC) in OpenShift Container Platform.
FlexVolume allows expansion if the driver is set with RequiresFSResize to true. The FlexVolume can be expanded on pod restart.
Similar to other volume types, FlexVolume volumes can also be expanded when in use by a pod.
Prerequisites
- The underlying volume driver supports resize.
-
The driver is set with the
RequiresFSResizecapability totrue. - Dynamic provisioning is used.
-
The controlling
StorageClassobject hasallowVolumeExpansionset totrue.
Procedure
To use resizing in the FlexVolume plugin, you must implement the
ExpandableVolumePlugininterface using these methods:RequiresFSResize-
If
true, updates the capacity directly. Iffalse, calls theExpandFSmethod to finish the filesystem resize. ExpandFS-
If
true, callsExpandFSto resize filesystem after physical volume expansion is done. The volume driver can also perform physical volume resize together with filesystem resize.
Because OpenShift Container Platform does not support installation of FlexVolume plugins on master nodes, it does not support control-plane expansion of FlexVolume.