IBM Cloud Docs
为什么我的应用程序无法访问或写入 PVC?

为什么我的应用程序无法访问或写入 PVC?

虚拟私有云 经典基础架构

将 PVC 安装到 pod 后,在访问或写入 PVC 时可能会遇到错误。

  1. 列出集群中的 pod 并查看 pod 的状态。
    kubectl get pods
    
  2. 查找应用程序无法访问 PVC 或无法写入 PVC 的根本原因。
    kubectl describe pod <pod_name>
    
    kubectl logs <pod_name>
    
  3. 查看将 PVC 安装到 pod 时可能发生的常见错误。
Block Storage 错误消息
症状或错误消息 描述 解决步骤
Pod 处于 ContainerCreatingCrashLoopBackOff 状态。 MountVolume.SetUp failed for volume ... read-only. IBM Cloud 基础架构后端遇到网络问题。 为了保护数据和避免数据损坏,IBM Cloud 自动断开了块存储器服务器的连接,以阻止对块存储器实例执行写操作。 请参阅块存储器:块存储器更改为只读
failed to mount the volume as "ext4", it already contains xfs. Mount error: mount failed: exit status 32. 您想要安装使用 XFS 文件系统设置的现有块存储器实例。 创建 PV 和匹配的 PVC 时,指定了 ext4 或未指定文件系统。 在 PV 中指定的文件系统必须与块存储器实例中设置的文件系统相同。 请参阅块存储器:由于文件系统不正确,将现有块存储器安装到 pod 失败