# Easiest way to decrease Persistent Volume size?

**URL:** <https://discuss.elastic.co/t/easiest-way-to-decrease-persistent-volume-size/315415>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [September 29, 2022, 2:02am UTC](https://discuss.elastic.co/t/easiest-way-to-decrease-persistent-volume-size/315415 "2022-09-29T02:02:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elastic\_dude](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@elastic\_dude](https://discuss.elastic.co/u/elastic_dude)\
**Post date:** [September 29, 2022, 2:02am UTC](https://discuss.elastic.co/t/easiest-way-to-decrease-persistent-volume-size/315415/1 "2022-09-29T02:02:01Z")

</div>

Hello,

I am trying to decrease the storage size of our Persistent Volumes in a particular cluster while still retaining all the data that is currently on the existing Persistent Volumes. The storage is currently over-provisioned.

Is there an easy way to do this? We have dynamic storage working to go up in storage but if I am not mistaken this does not work for going down in size.

I thought of two potential approaches:

1. Add underlying VMs then update the data node count in our helm config and update the storage request in the helm config. The thought here would be the existing PVCs would be untouched and the new ones would be created with the new smaller value? I could continue this process by phasing out the existing nodes/PVCs. Is this valid?

2. Add underlying VMs then add a second data node `nodeSets` in the config with the smaller storage request. Can you even have two data node `nodeSets` in one cluster? This approach seems much more cumbersome

Any advice is appreciated

---

<div class="post-metadata">

**Author:** ![michael.morello](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael.morello/32/47448_2.png) [@michael.morello](https://discuss.elastic.co/u/michael.morello)\
**Post date:** [September 29, 2022, 6:01am UTC](https://discuss.elastic.co/t/easiest-way-to-decrease-persistent-volume-size/315415/2 "2022-09-29T06:01:06Z")

</div>

As [stated in the documentation](https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-volume-claim-templates.html#k8s_updating_the_volume_claim_settings) the storage size of existing `volumeClaimTemplates` can only be increased.  
I think the easiest way is to create new `nodeSets` (you can rename the existing ones) with an adjusted volume size. The operator will create new nodes and migrate the data from the existing ones automatically.

---

<div class="post-metadata">

**Author:** ![elastic\_dude](https://avatars.discourse-cdn.com/v4/letter/e/f14d63/32.png) [@elastic\_dude](https://discuss.elastic.co/u/elastic_dude)\
**Post date:** [September 29, 2022, 1:38pm UTC](https://discuss.elastic.co/t/easiest-way-to-decrease-persistent-volume-size/315415/3 "2022-09-29T13:38:09Z")

</div>

Thanks @michael.morello for the response. If I had say 20 VMs with taints for data nodes and add another new 20 VMs (different size), do you know if I renamed the existing node sets if the new pods would be created on the new VMs?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [October 27, 2022, 1:38pm UTC](https://discuss.elastic.co/t/easiest-way-to-decrease-persistent-volume-size/315415/4 "2022-10-27T13:38:36Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
