W0714 03:29:51.128705 1 controller.go:933] Retrying syncing claim "fd341a80-08e3-4dcc-a55d-805f06035a0f", failure 19 E0714 03:29:51.128728 1 controller.go:956] error syncing claim "fd341a80-08e3-4dcc-a55d-805f06035a0f": failed to provision volume with StorageClass "evs-sc": error getting handle for DataSource Type VolumeSnapshot by Name new-snapshot-demo: snapshot new-snapshot-demo not bound I0714 03:29:51.128743 1 event.go:282] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"snapshot-demo-restore", UID:"fd341a80-08e3-4dcc-a55d-805f06035a0f", APIVersion:"v1", ResourceVersion:"2814762", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' failed to provision volume with StorageClass "evs-sc": error getting handle for DataSource Type VolumeSnapshot by Name new-snapshot-demo: snapshot new-snapshot-demo not bound [root@master ~]# kubectl get volumesnapshot
时间: 2023-07-22 15:11:44 浏览: 130
根据您提供的日志信息,出现了一个错误消息:无法通过名称为`new-snapshot-demo`的VolumeSnapshot获取数据源类型的处理程序。这表明`new-snapshot-demo`快照未绑定。
另外,您还提到了一个警告事件:使用StorageClass "evs-sc"无法为PersistentVolumeClaim "snapshot-demo-restore"提供卷。这也是由于无法获取数据源类型为VolumeSnapshot且名称为`new-snapshot-demo`的处理程序。
最后,您提到了一个`kubectl get volumesnapshot`命令,但您没有提供完整的命令输出。如果您需要查询VolumeSnapshot,请确保输入正确的命令,并在需要时提供完整的命令输出和上下文信息。
相关问题
ource Type VolumeSnapshot by Name new-snapshot-demo: snapshot new-snapshot-demo not bound I0714 08:37:27.829848 1 event.go:282] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"snapshot-demo-restore", UID:"8dd75b4b-9a16-4940-b078-7088a672a649", APIVersion:"v1", ResourceVersion:"2855605", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' failed to provision volume with StorageClass "evs-sc": error getting handle for DataSource Type VolumeSnapshot by Name new-snapshot-demo: snapshot new-snapshot-demo not bound I0714 08:38:13.719937 1 controller.go:1279] provision "default/snapshot-demo-restore" class "evs-sc": started I0714 08:38:13.720202 1 event.go:282] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"snapshot-demo-restore", UID:"8dd75b4b-9a16-4940-b078-7088a672a649", APIVersion:"v1", ResourceVersion:"2868531", FieldPath:""}): type: 'Normal' reason: 'Provisioning' External provisioner is provisioning volume for claim "default/snapshot-demo-restore" W0714 08:38:13.723506 1 controller.go:933] Retrying syncing claim "8dd75b4b-9a16-4940-b078-7088a672a649", failure 31 E0714 08:38:13.723534 1 controller.go:956] error syncing claim "8dd75b4b-9a16-4940-b078-7088a672a649": failed to provision volume with StorageClass "evs-sc": error getting handle for DataSource Type VolumeSnapshot by Name new-snapshot-demo: snapshot new-snapshot-demo not bound I0714 08:38:13.723562 1 event.go:282] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"snapshot-demo-restore", UID:"8dd75b4b-9a16-4940-b078-7088a672a649", APIVersion:"v1", ResourceVersion:"2868531", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' failed to provision volume with StorageClass "evs-sc": error getting handle for DataSource Type VolumeSnapshot by Name new-snapshot-demo: snapshot new-snapshot-demo not bound
根据提供的日志,出现了以下问题:“error getting handle for DataSource Type VolumeSnapshot by Name new-snapshot-demo: snapshot new-snapshot-demo not bound”。这表明在创建持久卷声明时,无法找到名为 "new-snapshot-demo" 的 VolumeSnapshot。
为了解决这个问题,您可以尝试以下几种方法:
1. 确保名为 "new-snapshot-demo" 的 VolumeSnapshot 存在,并且已正确绑定到相应的快照。您可以使用以下命令检查:
```
kubectl get volumesnapshot new-snapshot-demo
```
确保快照状态为 "Bound"。
2. 检查持久卷声明的配置文件中是否指定了正确的 VolumeSnapshot 名称。请确保在配置文件中的 `spec` 部分中使用了正确的名称。
3. 检查您是否具有足够的权限来访问 VolumeSnapshot。如果您没有足够的权限,可能无法找到或绑定 VolumeSnapshot。请联系集群管理员以获取更多权限。
4. 如果您刚刚创建了名为 "new-snapshot-demo" 的 VolumeSnapshot,请确保它已经完成绑定过程。绑定可能需要一些时间来完成。您可以使用以下命令检查绑定状态:
```
kubectl describe volumesnapshot new-snapshot-demo
```
检查事件或错误消息,以了解绑定过程是否成功完成。
如果问题仍然存在,请提供更多详细信息,例如 VolumeSnapshot 和持久卷声明的配置文件,以便我们能够更好地帮助您解决问题。
W0716 17:21:10.274940 1 controller.go:946] Retrying syncing claim "9741fa13-f40c-4680-a1aa-f0c3106937d8" because failures 2 < threshold 15 E0716 17:21:10.275002 1 controller.go:966] error syncing claim "9741fa13-f40c-4680-a1aa-f0c3106937d8": failed to provision volume with StorageClass "nfs": unable to create directory to provision new pv: mkdir /persistentvolumes/default-test-claim1-pvc-9741fa13-f40c-4680-a1aa-f0c3106937d8: read-only file system I0716 17:21:10.275042 1 event.go:278] Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"test-claim1", UID:"9741fa13-f40c-4680-a1aa-f0c3106937d8", APIVersion:"v1", ResourceVersion:"1955978", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' failed to provision volume with StorageClass "nfs": unable to create directory to provision new pv: mkdir /persistentvolumes/default-test-claim1-pvc-9741fa13-f40c-4680-a1aa-f0c3106937d8: read-only file system
根据提供的事件日志,可以看到以下信息:
1. 警告日志:`Retrying syncing claim "9741fa13-f40c-4680-a1aa-f0c3106937d8" because failures 2 < threshold 15`,这表示持久卷控制器正在尝试重新同步声明,因为失败次数未达到阈值。
2. 错误日志:`error syncing claim "9741fa13-f40c-4680-a1aa-f0c3106937d8": failed to provision volume with StorageClass "nfs": unable to create directory to new pv: mkdir /persistentvolumes/default-test-claim1-pvc-9741fa1340c-4680-a1aa-f0c3106937d8: read-only file system`,这表示在使用 StorageClass "nfs" 提供卷时出现错误,无法创建目录 `/persistentvolumes/default-test-claim1-pvc-9741fa13-f40c-4680-a1aa-f0c3106937d8`,因为文件系统是只读的。
3. 事件日志:`Event(v1.ObjectReference{Kind:"PersistentVolumeClaim", Namespace:"default", Name:"test-claim1", UID:"9741fa13-f40c-4680-a1aa-f0c3106937d8", APIVersion:"v1", ResourceVersion:"1955978", FieldPath:""}): type: 'Warning' reason: 'ProvisioningFailed' failed to provision volume with StorageClass "nfs": unable to create directory to provision new pv: mkdir /persistentvolumes/default-test-claim1-pvc-9741fa13-f40c-4680-a1aa-f0c3106937d8: read-only file system`,这是一个事件记录,指示卷的创建失败,原因是无法在 `/persistentvolumes/default-test-claim1-pvc-9741fa13-f40c-4680-a1aa-f0c3106937d8` 目录下创建目录,因为文件系统是只读的。
根据日志信息,问题可能是由于文件系统只读导致无法创建目录。请按照之前提到的文件系统只读问题的排查步骤进行检查,并确保文件系统的权限设置正确,并且没有其他组件或策略阻止了写操作。
如果问题仍然存在,请提供更多上下文或详细信息,以便更好地理解问题所在。
阅读全文