I'd like use a single google compute engine disk and mount it to multiple places a Kubernetes Google Container Engine.
I'm wondering if using persistentVolumeClaim
would work, but what I did expect to work is being able to mount two partitions of the same disk:
...
volumes:
- name: database
gcePersistentDisk:
pdName: dist-1
fsType: ext4
partition: 1
readOnly: true
- name: media
gcePersistentDisk:
pdName: disk-1
fsType: ext4
partition: 2
readOnly: true
Mounting either of them separately works, but trying to mount both gives an error:
FailedMount Unable to mount volumes for pod "frontend-ni7uf_foo": Could not attach GCE PD "disk-1". Timeout waiting for mount paths to be created.
Technically I can manually mount both partitions on a single instance.
I'm wondering if it's a bug and if there is another solution for that (outside of having multiple disks)?