<p>I'm having trouble to create a persistent volume that I can use from different pods (1 write, another read).</p>

<p>Tried to use <code>gcePersistentDisk</code> directly in the pod spec like in the example on the k8s page (plus <code>readOnly</code>):</p>

<pre><code>apiVersion: v1
kind: Pod
metadata:
  name: test-pd
spec:
  containers:
  - image: gcr.io/google_containers/test-webserver
    name: test-container
    volumeMounts:
    - mountPath: /test-pd
      name: test-volume
      readOnly: true
  volumes:
  - name: test-volume
    gcePersistentDisk:
      pdName: my-data-disk
      fsType: ext4
      readOnly: true
</code></pre>

<p>Then in the second pod spec exactly the same except the <code>readOnly</code> ... but got an <code>NoDiskConflict</code> error.</p>

<p>Second approach is to use <code>PersistentVolume</code> and <code>PersistentVolumeClaim</code> like this:</p>

<pre><code>apiVersion: v1
kind: PersistentVolume
metadata:
  name: data-standard
spec:
  capacity:
    storage: 1Gi
  accessModes:
    - ReadWriteMany
  gcePersistentDisk:
    fsType: ext4
    pdName: data

---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: data-standard-claim
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 1Gi
</code></pre>

<p>But now I get an error telling me:</p>

<pre><code>MountVolume.MountDevice failed for volume "kubernetes.io/gce-pd/xxx" (spec.Name: "yyy") pod "6ae34476-6197-11e7-9da5-42010a840186" (UID: "6ae34476-6197-11e7-9da5-42010a840186") with: mount failed: exit status 32 Mounting command: mount Mounting arguments: /dev/disk/by-id/google-gke-cluster-xxx /var/lib/kubelet/plugins/kubernetes.io/gce-pd/mounts/gke-cluster-xxx [ro] Output: mount: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so.
Error syncing pod, skipping: timeout expired waiting for volumes to attach/mount for pod "default"/"my-deployment". list of unattached/unmounted volumes=[data]
</code></pre>

<p>So what is the correct way of using a GCE disk with multiple pods.</p>

<p>PS: Kubernetes 1.6.6</p>

<p>According to <a href="https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes" rel="noreferrer">https://kubernetes.io/docs/concepts/storage/persistent-volumes/#access-modes</a>, GCE Disks do not support ReadWriteMany. I am not sure if this explains the issue but I would advise you to try another compatible Volume type.</p>
