<p>I've got a persistent disk (GCP), that I'm hoping to be able to allow read write access to multiple pods.</p>

<p>Is this possible? Here are my two configs:</p>

<p><strong>pVolume.yaml</strong></p>

<pre><code>apiVersion: "v1"
kind: "PersistentVolume"
metadata:
  name: "pv0001" 
spec:
  storageClassName: manual
  capacity:
    storage: "10Gi" 
  accessModes:
    - "ReadWriteMany"
  gcePersistentDisk: 
    fsType: "ext4" 
    pdName: "wordpress-disk" 
</code></pre>

<p><strong>pVolumeClaim.yaml</strong></p>

<pre><code>kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: task-pv-claim
spec:
  storageClassName: manual
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 3Gi
</code></pre>

<p>With the above config, I see the following error on my pods:</p>

<pre><code>FailedMount Failed to attach volume "pv0001" on node "xyz" with: googleapi: Error 400: The disk resource 'abc' is already being used by 'xyz'
</code></pre>

<p>This occurs with the replica count set to 2. </p>

<p>For a GCP persistent disk in ReadWrite mode on different nodes this is not possible :(</p>

<p>It is possible however:</p>

<ul>
<li>Have both replicas scheduled on the <strong>same node</strong>. In that case both of them can mount the same persistent disk ReadWrite</li>
<li>Use it in <strong>ReadOnly mode</strong>, on any number of nodes</li>
<li>Use a <strong>different kind of PV</strong>, like <a href="https://github.com/gluster/gluster-kubernetes" rel="nofollow noreferrer">gluster</a> or nfs that supports this kind of use</li>
</ul>
