How to change the access mode of PVC in open shift

2/18/2019

How I will be able to change the access mode in the persistent volume claim access mode? currently it is showing as RWO, and I need to change it as RWX?

Many thanks in advance.

-- Anuradha Fernando
ceph
kubernetes
openshift

2 Answers

2/18/2019

As an addition to P Ekambaram, you can do it using this commands:

*Note that this is instruction for Kubernetes, but I don't think it should be any different in OpenShift - looking at the OpenShift documentation you might need to replace kubectl with oc.

kubectl get PV

NAME         CAPACITY   ACCESS MODES   RECLAIM POLICY   STATUS      CLAIM   STORAGECLASS    REASON   AGE
my_pv          50Gi       RWX            Delete           Available           local-storage            2d22h

kubectl edit pv my_pv

And change to desired access mode:

accessModes: - ReadWriteMany

You can edit most of the Kubernetes Objects in similar way.

-- aurelius
Source: StackOverflow

2/18/2019

There are three types of access modes supported in kubernetes

  1. RWO - ReadWriteOnce
  2. ROX - ReadOnlyMany
  3. RWX - ReadWriteMany

You should be updating the access mode in PersistentVolume as shown below

    accessModes:
      - ReadWriteMany
-- P Ekambaram
Source: StackOverflow