zoukankan      html  css  js  c++  java
  • Linux NFS挂载报错wrong fs type, bad option, bad superblock

    1.故障现象

    我的测试环境有一个NAS,之前配置都是按照测试需求在/etc/fstab里添加配置挂载选项: vi /etc/fstab
    192.168.1.2:/mnt/HD/HD_a2/Public     /public nfs rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600
    

    创建/public目录后,直接mount挂载即可:

    mkdir /public
    mount -a
    

    但今天在一套最小化安装的RHEL6.8上,挂载时遇到报错如下:

    [root@test04 ~]# mount -a
    mount: wrong fs type, bad option, bad superblock on 192.168.1.2:/mnt/HD/HD_a2/Public,
           missing codepage or helper program, or other error
           (for several filesystems (e.g. nfs, cifs) you might
           need a /sbin/mount.<type> helper program)
           In some cases useful info is found in syslog - try
           dmesg | tail  or so
    

    2.解决方案

    解决方法是安装nfs-utils:
    [root@test04 ~]# yum install nfs-utils
    

    再次尝试挂载报错:

    [root@test04 ~]# mount -a
    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
    

    这个报错比较明显了,需检查下rpc.statd对应的rpcbind服务状态,启动这个服务并确保其之后开机自启动:

    [root@test04 ~]# service rpcbind status
    rpcbind is stopped
    [root@test04 ~]# service rpcbind start
    Starting rpcbind:                                          [  OK  ]
    [root@test04 ~]# chkconfig --list rpcbind
    rpcbind         0:off   1:off   2:on    3:on    4:on    5:on    6:off
    

    再次尝试挂载成功:

    [root@test04 ~]# mount -a
    [root@test04 ~]# df -h
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/mapper/vg_test04-lv_root
                           18G  829M   16G   5% /
    tmpfs                 939M     0  939M   0% /dev/shm
    /dev/sda1             477M   39M  414M   9% /boot
    192.168.1.2:/mnt/HD/HD_a2/Public
                          2.7T  1.6T  1.2T  57% /public
    
  • 相关阅读:
    JVM调优(一)——参数查询和问题排查
    spring-cloud feign (web服务客户端)(四)
    spring-cloud hystrix(三)
    springCloud ribbon均衡负载的配置及原理 (二)
    maven
    springCloud Eureka 注册中心原理及配置理解(一)
    threadLocal 的使用及意义
    数据库引擎类型
    sql 优化
    sql 的执行计划理解
  • 原文地址:https://www.cnblogs.com/jyzhao/p/13294213.html
Copyright © 2011-2022 走看看