Volume claim on GKE / Multi-Attach error for volume Volume is already exclusively attached

后端 未结 2 1410
面向向阳花
面向向阳花 2021-02-19 03:12

The problem seems to have been solved a long time ago, as the answer and the comments does not provide real solutions, I would like to get some help from experienced users

2条回答
  •  悲&欢浪女
    2021-02-19 03:49

    Based on your description what you are experiencing is exactly what is supposed to happen.

    You are using gcePersistentDisk in your PV/PVC definition. The accessMode is ReadWriteOnce - this means that this PV can only be attached to a single Node (stressing Node here, there can be multiple Pods running on the same Node using the same PV). There is not much you can do about this; gcePersistentDisk is like a remote block device, it's not possible to mount it on multiple Nodes simultaneously (unless read only).

    There is a nice table that shows which PVs support ReadWriteMany (that is, write access on multiple Nodes at the same time):

    Important! A volume can only be mounted using one access mode at a time, even if it supports many. For example, a GCEPersistentDisk can be mounted as ReadWriteOnce by a single node or ReadOnlyMany by many nodes, but not at the same time.

提交回复
热议问题