0%

Centos7 切换DELL存储服务器NFS异常

DELL 存储服务器的,CentOS 7版本挂载NFS出现的几个异常。

1、由于DELL 存储服务器,创建的目录是大写文件夹,在系统版本CentOS 7.5挂载正常,无论是挂载大写还是小写都是正常挂载,而在系统版本CentOS 7.9挂载出现以下错误
  • 本地操作错误
1
2
[root@k8s-node7]# mount -t nfs  dfs01.xxx.xxx:/bms /test
mount.nfs: mounting dfs01.xxx.xxx:/bms failed, reason given by server: No such file or directory
  • k8s 容器错误

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    Events:
    Type Reason Age From Message
    ---- ------ ---- ---- -------
    Warning FailedScheduling 7m36s (x7 over 9m58s) default-scheduler persistentvolumeclaim "nfs-pvc" not found
    Normal Scheduled 7m25s default-scheduler Successfully assigned bms-sit/mysql-f645dc69-dmzjb to k8s-node1
    Warning FailedMount 7m24s kubelet MountVolume.SetUp failed for volume "nfs-pv" : mount failed: exit status 32
    Mounting command: systemd-run
    Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/daf12d8e-acb8-4fab-ba33-4e474fcfc250/volumes/kubernetes.io~nfs/nfs-pv --scope -- mount -t nfs 10.0.15.1:/bms /var/lib/kubelet/pods/daf12d8e-acb8-4fab-ba33-4e474fcfc250/volumes/kubernetes.io~nfs/nfs-pv
    Output: Running scope as unit run-45504.scope.
    mount.nfs: mounting 10.0.15.1:/bms failed, reason given by server: No such file or directory
    Warning FailedMount 7m24s kubelet MountVolume.SetUp failed for volume "nfs-pv" : mount failed: exit status 32
    Mounting command: systemd-run
  • 解决方案

    1
    统一采用小写字母
2、未安装nfs-utils导致以下错误
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 9m36s default-scheduler Successfully assigned bms-java-bms-java-6fc766f56-f55cj to vtsz-dce-sitdb01
Normal SuccessfulMountVolume 9m35s kubelet, vtsz-dce-sitdb01 MountVolume.SetUp succeeded for volume "default-token-bjpvj"
Warning FailedMount 9m25s kubelet, vtsz-dce-sitdb01 MountVolume.SetUp failed for volume "dfs-bms-java-uat" : mount failed: exit status 32
Mounting command: systemd-run
Mounting arguments: --description=Kubernetes transient mount for /var/lib/kubelet/pods/cf8b4e39-3463-11eb-9c48-0242ac120004/volumes/kubernetes.io~nfs/dfs-bms-java-uat --scope -- mount -t nfs 10.0.15.1:/bms_uat/bms_java/root/download_a/ /var/lib/kubelet/pods/cf8b4e39-3463-11eb-9c48-0242ac120004/volumes/kubernetes.io~nfs/dfs-bms-java-uat
Output: Running scope as unit run-90393.scope.
Failed to start rpc-statd.service: Unit not found.
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
Warning FailedMount 9m14s kubelet, vtsz-dce-sitdb01 MountVolume.SetUp failed for volume "dfs-bms-java-uat" : mount failed: exit status 32
Mounting command: systemd-run
  • 解决方案
    1
    2
    3
    yum install nfs-utils -y
    systemctl enable rpcbind
    systemctl restart rpcbind
3、权限问题,由于DELL 存储服务器设置文件权限设置不当导致
  • 解决
1
2
3
1、DELL 存储服务器设置允许根目录权限
2、DELL 存储服务器设置k8s pods里面的ip访问权限
3、DELL 存储服务器设置允许中文,否则挂载nfs里面创建文件提示File name too long