<p>I've tried running 2 Kubernetes pods on a single-node GKE cluster, sharing a read-only GCE persistent disk, but while one pod successfully runs, the other is stuck in the <code>ContainerCreating</code> state.</p>

<p>The container is very simple:</p>

<pre><code>FROM debian:jessie
CMD ["/bin/sh", "-c", "while true; do ls /mount; sleep 5; done"]
</code></pre>

<p>The deployment looks like this:</p>

<p><code>
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: dumpy
spec:
  replicas: 2
  template:
    metadata:
      labels:
        app: dump
    spec:
      containers:
      - name: dump
        image: gcr.io/myproject/dump
        volumeMounts:
        - mountPath: /mount
          name: dump
          readOnly: true
      volumes:
      - name: dump
        gcePersistentDisk:
          pdName: my-disk
          fsType: ext4
          readOnly: true
</code></p>

<p>The failed pod reports:</p>

<pre><code>Warning     FailedMount Unable to mount volumes for pod "xxx". Could not attach GCE PD "my-disk". Timeout waiting for mount paths to be created.
FailedSync  Error syncing pod, skipping: Could not attach GCE PD "my-disk". Timeout waiting for mount paths to be created.
</code></pre>

<p><code>/var/log/kubelet.log</code> reports:</p>

<pre><code>gce.go:422] GCE operation failed: googleapi: Error 400: The disk resource 'my-disk' is already being used by 'xxx-123'
gce_util.go:187] Error attaching PD "my-disk": googleapi: Error 400: The disk resource 'my-disk' is already being used by 'xxx-123'
</code></pre>

<p>I believe the <a href="http://kubernetes.io/docs/user-guide/volumes/#gcepersistentdisk" rel="nofollow">Kubernetes documentation</a> explicitly allows this scenario.</p>

<blockquote>
  <p>A feature of PD is that they can be mounted as read-only by multiple consumers simultaneously. This means that you can pre-populate a PD with your dataset and then serve it in parallel from as many pods as you need.</p>
</blockquote>

<p>What's going on and what's the fix?</p>

<p>Glen, you're hitting <a href="https://github.com/kubernetes/kubernetes/issues/19953" rel="nofollow">https://github.com/kubernetes/kubernetes/issues/19953</a></p>

<p>There's no good workaround for this.</p>

<p>It's fixed by <a href="https://github.com/kubernetes/kubernetes/pull/26351" rel="nofollow">https://github.com/kubernetes/kubernetes/pull/26351</a> which will be part of the next Kubernetes release (v1.3) scheduled to be released by the end of the June (<a href="https://github.com/kubernetes/kubernetes/wiki/Release-1.3" rel="nofollow">https://github.com/kubernetes/kubernetes/wiki/Release-1.3</a>).</p>
