Basic query: Plz respond

Portworx supports block storage which has a kubernetes accessMode of ReadWriteOnce. The storage class definition of portworx has a parameter of shared:true if set accordingly would result in a provisioning of a shared volume , which can be referred to a in PVC with accessMode:ReadWriteMany. It works fine and am able to access the volume from different nodes ( even accessible from a non-storage node ) . How does it work internally, am curious, how can block storage with kubernetes accessMode of ReadWriteOnce be accessed from other nodes? .am a storage newbie, please bear.

Hello @userku,

Portworx supports the following AccessModes

  • ReadWriteMany (RWX)
  • ReadWriteOnce (RWO)

Portworx volumes are essentially block devices that can be attached on any node within a Portworx cluster. When a Portworx volume is accessed as RWX volume from multiple nodes, Portworx will make the underlying block device available as an NFS export on these nodes. Essentially, Portworx uses linux kernel’s NFS on top of Portworx block volumes to support the RWX use cases.

FYI, even if in the storage class you do not provide “shared: true” but your PVC accessMode is RWX, Portworx will create a shared volume.

From a kubernetes perspective, these accessModes are used at two places:

  1. To bind existing PersistentVolumes to PersistentVolumeClaims. Kubernetes will bind the PV to PVC only if the requested PVC’s accessModes are satisfied by the existing PV.
  2. For certain providers like AWS,GCE which do not support RWX out of the box, Kubernetes scheduler adds extra check during pod schedule time where it will block any new pods accessing the same PVC on a different node. This check is not enforced for storage providers like Portworx.

Let me know if you have more questions and I will be happy to answer.