1.16. 对 VolSync 的 cinder Container Storage Interface (CSI)驱动程序进行故障排除
如果您在 cinder Container Storage Interface (CSI)驱动程序中使用 VolSync 或使用默认设置,您可能会遇到正在使用的 PVC 的错误。
1.16.1. 症状: Volumesnapshot
错误状态
您可以配置 VolSync ReplicationSource
或 ReplicationDestination
以使用快照。另外,您可以在 ReplicationSource
和 ReplicationDestination
中配置 storageclass
和 volumesnapshotclass
。cinder volumesnapshotclass
上有一个名为 force-create
的参数,默认值为 false
。volumesnapshotclass
上的这个 force-create
参数意味着 cinder 不允许使用 volumesnapshot
。因此,volume
snapshot 处于错误状态。
1.16.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'