<p>I am trying to understand different <strong>access modes for Persistent Volume Claims in Openshift</strong>. Found the following information from <a href="https://docs.openshift.com/container-platform/3.6/architecture/additional_concepts/storage.html#pv-access-modes" rel="nofollow noreferrer">here</a></p>

<pre><code>Access Mode         CLI Abbreviation             Description
ReadWriteOnce           RWO               The volume can be mounted as read-write by a single node.

ReadOnlyMany            ROX               The volume can be mounted read-only by many nodes.

ReadWriteMany           RWX               The volume can be mounted as read-write by many nodes.
</code></pre>

<p>I know that PVC are bound to single project/namespace and can be extended to different projects as well.</p>

<p>But <strong>the confusion here is, what does "single node" or "many nodes" mean here</strong>. For example, in <code>RWO</code> mode, <code>"The volume can be mounted as read-write by a single node"</code>. <strong>What node it is referring to</strong>.</p>

<p>Can someone give me the <strong><em>significance of these modes with respect to single project/namespace</em></strong>. <strong>Does the storage with RWO can have write permission for only one application or all the applications within the project</strong>?</p>

<p>The whole RWO vs RWX concept is related to the issue of mounting the same filesystem on multiple hosts, which requires support for things like ie. distributed locking. There are specific implementations that can handle this like ie. NFS, Ceph, GlusterFS etc. generally network/cluster oriented filesystems. Other filesystems are unable to operate correctly if you try to mount them on different servers at the same time (usually they will just not allow this). </p>

<p>So, node, in this case, means particular kubernetes cluster node (be it baremetal server or vm). But, by extension, you should think about it in scope of POD as well, cause in most cases pods can spin up on different nodes, meaning they could not use the same volume or you can not assume that this volume will have coherent shared state, as would happen ie. using HostPath volumes that are unique per every node in cluster.</p>

<p>To clarify for the question below : </p>

<p>RWO volumes have 1:1 relation to pod in general. While in some cases you can define RWO volumes to point to the same physical resource like hostPath, technically they will always be tightly coupled to exclusively one POD. This is specially visible if you use PhysicalVolumes / PhysicalVolumeClaims objects, which will take into account these restrictions for binding PV to PVC. <strong>Only RWX volumes give you a storage shared by multiple pods with all pods being able to write to it</strong>.</p>
