kylin10 mount.nfs: No such device

先和正常机器对比:命令 strace mount -a跟踪对比过程,发现/run/mount/utab文件不存在,手动创建配置也不起作用。

然后通过如下命令发现问题

[root@kylin10 build]# lsmod | grep -i nfs

lsmod: symbol lookup error: lsmod: undefined symbol: kysec_check_kmod

尝试以下步骤来解决此问题:

  1. 重新加载内核模块列表:首先,尝试重新加载内核模块列表。运行以下命令:

    sudo depmod -a sudo modprobe nfs

    这会重新加载内核模块列表并尝试加载 NFS 相关的模块。

  2. 检查系统库:确保您的系统库没有受损。运行以下命令来检查:

    sudo ldconfig

    这将更新共享库缓存并修复可能的共享库问题。

  3. 查找冲突的库:有时会发生库冲突。运行以下命令来查看哪些库与 "lsmod" 命令相关:

    ldd $(which lsmod)

    这将列出 "lsmod" 命令依赖的共享库,您可以查看是否有问题。

  4. 重新安装核心组件:如果上述步骤没有解决问题,您可能需要重新安装系统中与核心组件相关的软件包,例如 modutils 或其他与内核模块管理有关的软件包。

  5. 系统更新:确保您的系统是最新的,可以运行系统更新以获取任何可能的修复:

    sudo yum update

  6. 检查 SELinux 或 AppArmor:某些安全模块可能会干扰模块加载。确保 SELinux 或 AppArmor 不会阻止模块加载。

最终是通过第五步解决,特此记录。注意内核可能会被升级了,我的做法是直接将新内核相关的卸载掉。

rpm -e kernel-4.19.90-23.38.v2101.ky10.aarch64 kernel-core-4.19.90-23.38.v2101.ky10.aarch64 kernel-modules-4.19.90-23.38.v2101.ky10.aarch64 kernel-modules-internal-4.19.90-23.38.v2101.ky10.aarch64 kernel-modules-extra-4.19.90-23.38.v2101.ky10.aarch64

以下是一些尝试解决时查询命令:

-rw-r--r--   1 root root      41  8月 15 14:58 vmlinux.id
[root@kylin10 ~]# ls -al /usr/lib/modules/`uname -r`
总用量 15584
drwxr-xr-x  7 root root    4096  9月 29 10:13 .
drwxr-xr-x  4 root root      85  9月 29 12:36 ..
-rw-r--r--  1 root root     363  5月 17  2021 bls.conf
lrwxrwxrwx  1 root root      48  5月 17  2021 build -> /usr/src/kernels/4.19.90-23.8.v2101.ky10.aarch64
-rw-r--r--  1 root root  154529  5月 17  2021 config
drwxr-xr-x  9 root root      97  9月 29 10:11 dtb
drwxr-xr-x 13 root root     145  9月 29 10:11 kernel
-rw-r--r--  1 root root  524600  9月 29 10:13 modules.alias
-rw-r--r--  1 root root  508480  9月 29 10:13 modules.alias.bin
-rw-r--r--  1 root root     513  5月 17  2021 modules.block
-rw-r--r--  1 root root    9179  5月 17  2021 modules.builtin
-rw-r--r--  1 root root   12223  9月 29 10:13 modules.builtin.bin
-rw-r--r--  1 root root  122374  9月 29 10:13 modules.dep
-rw-r--r--  1 root root  184755  9月 29 10:13 modules.dep.bin
-rw-r--r--  1 root root     340  9月 29 10:13 modules.devname
-rw-r--r--  1 root root     108  5月 17  2021 modules.drm
-rw-r--r--  1 root root      68  5月 17  2021 modules.modesetting
-rw-r--r--  1 root root    1236  5月 17  2021 modules.networking
-rw-r--r--  1 root root   57854  5月 17  2021 modules.order
-rw-r--r--  1 root root     535  9月 29 10:13 modules.softdep
-rw-r--r--  1 root root  249542  9月 29 10:13 modules.symbols
-rw-r--r--  1 root root  298534  9月 29 10:13 modules.symbols.bin
lrwxrwxrwx  1 root root       5  5月 17  2021 source -> build
-rw-r--r--  1 root root  279419  5月 17  2021 symvers.gz
-rw-------  1 root root 4153471  5月 17  2021 System.map
drwxr-xr-x  2 root root       6  5月 17  2021 updates
drwxr-xr-x  2 root root      21  9月 29 10:11 vdso
-rwxr-xr-x  1 root root 9335011  5月 17  2021 vmlinuz
-rw-r--r--  1 root root     176  5月 17  2021 .vmlinuz.hmac
drwxr-xr-x  2 root root       6  5月 17  2021 weak-updates

 systemctl list-unit-files | grep -i nfs
proc-fs-nfsd.mount                         static         
var-lib-nfs-rpc_pipefs.mount               static         
nfs-blkmap.service                         disabled       
nfs-idmap.service                          static         
nfs-idmapd.service                         static         
nfs-lock.service                           enabled-runtime
nfs-mountd.service                         static         
nfs-secure.service                         static         
nfs-server.service                         disabled       
nfs-utils.service                          static         
nfs.service                                disabled       
nfs-client.target                          enabled        

其它类型错误:

[root@kylin10 ~]# df -h
df: /mnt/myshare: 不支持的协议   unsupport protocol

原因:挂载了不支持的协议 ,需要先umount /mnt/myshare 再重新挂载

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值