# Necessity of MANUALLY restarting (deleting) pods after volume expansion

**URL:** <https://discuss.elastic.co/t/necessity-of-manually-restarting-deleting-pods-after-volume-expansion/273160>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [May 17, 2021, 10:39am UTC](https://discuss.elastic.co/t/necessity-of-manually-restarting-deleting-pods-after-volume-expansion/273160 "2021-05-17T10:39:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pkaramol](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pkaramol/32/22610_2.png) [@pkaramol](https://discuss.elastic.co/u/pkaramol)\
**Post date:** [May 17, 2021, 10:39am UTC](https://discuss.elastic.co/t/necessity-of-manually-restarting-deleting-pods-after-volume-expansion/273160/1 "2021-05-17T10:39:16Z")

</div>

Perhaps its me but the [docs](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-volume-claim-templates.html#k8s_updating_the_volume_claim_settings) seems a bit contradicting in terms of whether a manual restart is required after increasing the PVC size:

On one hand:

> ECK will update the existing PersistentVolumeClaims accordingly, and recreate the StatefulSet automatically

On the other hand:

> If the volume driver does not support `ExpandInUsePersistentVolumes` , Pods must be manually deleted after the resize, to be recreated automatically with the expanded filesystem.

Assuming `ExpandInUsePersistentVolumes` is **not** supported, should we delete the pods manually or the ECK will take care of statefulsets re-creation?

---

<div class="post-metadata">

**Author:** ![sebgl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sebgl/32/48702_2.png) [@sebgl](https://discuss.elastic.co/u/sebgl)\
**Post date:** [May 17, 2021, 11:47am UTC](https://discuss.elastic.co/t/necessity-of-manually-restarting-deleting-pods-after-volume-expansion/273160/2 "2021-05-17T11:47:26Z")

</div>

Both statements are true:

1. ECK always recreates StatefulSets to match the newest volume claim size, regardless of whether `ExpandInUsePersistentVolumes` is supported. Recreating the StatefulSet does not touch any of the running Pods. Those are temporarily orphan, then re-adopted by the recreated StatefulSet.
2. If `ExpandInUsePersistentVolumes` is not supported, the user is then responsible for deleting the Pods.

So in your situation with `ExpandInUsePersistentVolumes` not supported: ECK will recreate the StatefulSets, but you will have to delete the Pods (then recreated automaticallyà. You can look at the events generated for the Elasticsearch resource (`kubectl describe elasticsearch <name>`): they will give you a hint that you need to recreate Pods yourself.

I hope that helps!

---

<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:** [June 14, 2021, 11:47am UTC](https://discuss.elastic.co/t/necessity-of-manually-restarting-deleting-pods-after-volume-expansion/273160/3 "2021-06-14T11:47:44Z")

</div>

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