背景:使用helm部署apisix时会把etcd也一起部署了,etcd数据需要持久化的,这边因为测试环境使用nfs,挂载nfs时发现只有一个etcd节点启动正常其他两个均报错如下:

failed to save Raft hard state and entries","error":"input/output error

截图:

k8s1.26部署etcd集群挂载nfs failed to save Raft hard state and entries","error":"input/output error问题解决_排错

排错过程:

1 查看节点是否都可以挂载nfs   --->可以

2 创建测试pod看是否可以挂载  ---> 可以

通过上述流程发现网络和nfs服务端均没有问题,那么问题可能出在nfs客户端本身了,当时客户端使用版本为4.1,如下图:

k8s1.26部署etcd集群挂载nfs failed to save Raft hard state and entries","error":"input/output error问题解决_k8s_02

后来尝试修改版本为3.1,重新创建etcd完美解决

k8s1.26部署etcd集群挂载nfs failed to save Raft hard state and entries","error":"input/output error问题解决_客户端_03