// Module included in the following assemblies
//
// * storage/expanding-persistent-volumes.adoc
//* microshift_storage/expanding-persistent-volumes-microshift.adoc

:_mod-docs-content-type: PROCEDURE
[id="expanding-flexvolume_{context}"]
= Expanding FlexVolume with a supported driver

[role="_abstract"]
To expand your FlexVolume storage capacity and meet growing data needs, update the storage request in your persistent volume claim (PVC). This increases capacity for existing volumes without recreating them.

Similar to other volume types, FlexVolume volumes can also be expanded when in use by a pod.

[IMPORTANT]
====
Because {product-title} does not support installation of FlexVolume plugins on control plane nodes, it does not support control plane expansion of FlexVolume.
====

.Prerequisites

* The underlying volume driver supports resize. 
+
For information about which CSI drivers support resizing, see under the _Additional resources_ section "CSI drivers supported by {product-title}".

* The driver is set with the `RequiresFSResize` capability to `true`. The FlexVolume can then be expanded after restarting the pod.

* Dynamic provisioning is used.

* The controlling `StorageClass` object has `allowVolumeExpansion` set to `true`.
+
For more information, see section _Enabling volume expansion support_.

.Procedure

* To use resizing in the FlexVolume plugin, you must implement the `ExpandableVolumePlugin` interface using these methods:

** `RequiresFSResize`
+
If `true`, updates the capacity directly. If `false`, calls the `ExpandFS` method to finish the filesystem resize.

** `ExpandFS`
+
If `true`, calls `ExpandFS` to resize filesystem after physical volume expansion is done. The volume driver can also perform physical volume resize together with filesystem resize.
