OpenShift - List Shared Volumes using the oc get sharedvolumes command

If you are not familiar with the oc command, refer to OpenShift - Getting Started with the oc command.

A persistent volume (PV) is the "physical" volume (such as a hard disk drive or solid state drive) on the host machine (node) that stores your persistent data, whereas a persistent volume claim (PVC) is a reference to a persistent volume, used by a pod. A Shared Volume contains both a Persistent Volume and a Persistent Volume Claim and is typically used for an Amazon Web Services (AWS) Elastic File System (EFS).

 

The oc get sharedvolumes (or oc get sv) command will return the list of Shared Volumes. Access Modes can be one or more of the following

~]$ oc get sharedvolumes
AME                 FILE SYSTEM   ACCESS POINT            PHASE   CLAIM                      MESSAGE
my-shared-volume    fs-0123cdef   fsap-0123456789abcdef   Ready   my-persistent-volume-claim 

 

The oc describe sharedvolume command can be used to show more details about a Shared Volume.

~]# oc describe sharedvolume my-shared-volume
Name:         my-shared-volume
Namespace:    default
Labels:       <none>
Annotations:  <none>
API Version:  aws-efs.managed.openshift.io/v1alpha1
Kind:         SharedVolume
Metadata:
  Creation Timestamp:  2022-08-19T12:08:51Z
  Finalizers:
    finalizer.awsefs.managed.openshift.io
  Generation:  1
  Managed Fields:
    API Version:  aws-efs.managed.openshift.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:spec:
        .:
        f:accessPointID:
        f:fileSystemID:
    Manager:      Mozilla
    Operation:    Update
    Time:         2022-08-19T12:08:51Z
    API Version:  aws-efs.managed.openshift.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:finalizers:
          .:
          v:"finalizer.awsefs.managed.openshift.io":
    Manager:      aws-efs-operator
    Operation:    Update
    Time:         2022-08-19T12:08:51Z
    API Version:  aws-efs.managed.openshift.io/v1alpha1
    Fields Type:  FieldsV1
    fieldsV1:
      f:status:
        .:
        f:claimRef:
          .:
          f:apiGroup:
          f:kind:
          f:name:
        f:phase:
    Manager:         aws-efs-operator
    Operation:       Update
    Subresource:     status
    Time:            2022-08-19T12:08:51Z
  Resource Version:  207328030
  UID:               e355a520-9dc3-4bca-af2e-ddfddb3777b2
Spec:
  Access Point ID:  fsap-0123456789abcdef
  File System ID:   fs-0123cdef
Status:
  Claim Ref:
    API Group:  
    Kind:       PersistentVolumeClaim
    Name:       my-persistent-volume-claim
  Phase:        Ready
Events:         <none>

 

Or, the oc get sharedvolume command with the --output json‚Äč or --output yaml option can be used.

~]# oc get sharedvolume my-shared-volume --output yaml
apiVersion: aws-efs.managed.openshift.io/v1alpha1
kind: SharedVolume
metadata:
  creationTimestamp: "2022-08-19T12:08:51Z"
  finalizers:
  - finalizer.awsefs.managed.openshift.io
  generation: 1
  name: my-shared-volume
  namespace: default
  resourceVersion: "207328030"
  uid: e355a520-9dc3-4bca-af2e-ddfddb3777b2
spec:
  accessPointID: fsap-0123456789abcdef
  fileSystemID: fs-0123cdef
status:
  claimRef:
    apiGroup: ""
    kind: PersistentVolumeClaim
    name: my-persistent-volume-claim
  phase: Ready

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee

Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.





Please enter 85426 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |