# How to shrink a PVC (without downtime)

**URL:** <https://discuss.kubernetes.io/t/how-to-shrink-a-pvc-without-downtime/6834>\
**Category:** General Discussions\
**Created:** [June 19, 2019, 9:21am UTC](https://discuss.kubernetes.io/t/how-to-shrink-a-pvc-without-downtime/6834 "2019-06-19T09:21:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://discuss.kubernetes.io/u/asp)\
**Post date:** [June 19, 2019, 9:21am UTC](https://discuss.kubernetes.io/t/how-to-shrink-a-pvc-without-downtime/6834/1 "2019-06-19T09:21:30Z")

</div>

Hi,

I am using glusterfs as storage.

Here is my storage class:

```
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  name: standard
provisioner: kubernetes.io/glusterfs
parameters:
  resturl: "http://192.168.198.135:8080"
  restauthenabled: "false"
  restuser: "notusedyet"
  restuserkey: "notusedyet"
  volumetype: replicate:2
allowVolumeExpansion: true

```

I created a pvc of 10Gi, but I am not using much of it. So I wanted to shrink it. If I update the pvc I get following error:

```
The PersistentVolumeClaim "poc-redis" is invalid: spec.resources.requests.storage: Forbidden: field can not be less than previous value

```

So what options do I have to shrink this volume? Are there any ways with or without downtime are available? (better without downtime)

In worst case: is there a way to clone a volume to a new one which is smaller?

Thanks, Andreas

---

<div class="post-metadata">

**Author:** ![mrbobbytables](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/mrbobbytables/32/7_2.png) [@mrbobbytables](https://discuss.kubernetes.io/u/mrbobbytables)\
**Post date:** [June 20, 2019, 11:52am UTC](https://discuss.kubernetes.io/t/how-to-shrink-a-pvc-without-downtime/6834/2 "2019-06-20T11:52:40Z")

</div>

> [@asp](#):
>
> So what options do I have to shrink this volume? Are there any ways with or without downtime are available? (better without downtime)
> 
> In worst case: is there a way to clone a volume to a new one which is smaller?

There is no method of shrinking volumes directly. You could probably remove the volume from Kubernetes and shrink it outside of it (if gluster supports it) and then map it back in as a new volume, or clone/shrink and remount.
