Is it possible to Shrink an OpenShift Persistent Volume (PV) or its associated Gluster Volume ?

Solution Verified - Updated -


We have a PV of 10GB that was expanded to 20GB:

[root@node-10 ~]# oc describe pv pvc-12345-xxxxx-6789
Name:            pvc-12345-xxxxx-6789
Labels:          <none>
Annotations:     Description=Gluster-Internal: Dynamically provisioned PV
         <<--- gluster volume
Finalizers:      []
StorageClass:    glusterfs-storage   <<------------!!!!

This was possible as the Storage Class "glusterfs-storage" had the value allowVolumeExpansion configured by customer to true:

[root@node-10 ~]# oc describe sc glusterfs-storage
allowVolumeExpansion: true                    <------------- !!!

The underlying gluster volume for this PV was initially a replica-3 and after the expansion
three more bricks were added , becoming a Distributed-Replicate 2 x 3 = 6 , with size of 20GB

sh-4.2# gluster volume info vol_111222333444

Volume Name: vol_111222333444
Type: Distributed-Replicate
Volume ID: xxxxxxx-aaaaaaa-xxxxx
Status: Started
Snapshot Count: 0
Number of Bricks: 2 x 3 = 6
Transport-type: tcp
Options Reconfigured:
features.barrier: disable
performance.client-io-threads: off
nfs.disable: on
transport.address-family: inet
server.tcp-user-timeout: 42
cluster.brick-multiplex: on
  • Q. Is it possible to remove the last three added bricks to go back to the previous size and replica-3 type?


  • OCS 3.11

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content