1.15. 对 VolSync 的 cinder Container Storage Interface (CSI)驱动程序进行故障排除
如果您在 cinder Container Storage Interface (CSI)驱动程序中使用 VolSync 或使用默认设置,您可能会遇到正在使用的 PVC 的错误。
1.15.1. 症状 :volumesnapshot
错误状态
您可以将 VolSync ReplicationSource
或 ReplicationDestination
配置为使用快照。另外,您可以在 ReplicationSource
和 ReplicationDestination
中配置 storageclass
和 volumesnapshotclass
。cinder volumesnapshotclass
上有一个参数,名为 force-create
,默认值为 false
。volumesnapshotclass
上的 force-create
参数意味着 cinder 不允许将 volumesnapshot
视为使用中的 PVC。因此,volumesnapshot
处于错误状态。
1.15.2. 解决问题: 将参数设置为 true
-
为 cinder CSI 驱动程序创建一个新的
volumesnapshotclass
。 将参数
force-create
更改为true
。请参见以下 YAML 示例:apiVersion: snapshot.storage.k8s.io/v1 deletionPolicy: Delete driver: cinder.csi.openstack.org kind: VolumeSnapshotClass metadata: annotations: snapshot.storage.kubernetes.io/is-default-class: 'true' name: standard-csi parameters: force-create: 'true'