linux服务器端启动NFS报“Job for nfs-server.service canceled.”的解决办法
linux-dash
A beautiful web dashboard for Linux
项目地址:https://gitcode.com/gh_mirrors/li/linux-dash
·
linux服务器端启动NFS报“Job for nfs-server.service canceled.”的解决办法
网上百度了好久都没找到这个报错的原因(白嫖失败)
- 打开linux的系统日志:
tail -f /var/log/messages
- 再次重启NFS服务:
systemcrl restart nfs
果不其然再次报错:
Job for nfs-server.service canceled.
- 去日志里看看有啥有用的消息:
Nov 3 16:48:31 localhost exportfs[9503]: exportfs: No host name given with /share (rw), suggest *(rw) to avoid warning
Nov 3 16:48:31 localhost exportfs[9503]: exportfs: /etc/exports [2]: Neither 'subtree_check' or 'no_subtree_check' specified for export "*:/share".
好家伙,原来是export配置文件出了问题
- 去修改相关的配置文件,正确格式之一如下:
/ 10.3.0.0/16(rw,sync,insecure,no_subtree_check,no_root_squash)
#服务器端共项目录 -权限 -network 客户端ip
/share -rw -network 10.3.45.37
~
~
~
~
大功告成,重启成功!
[root@localhost etc]# systemctl status nfs
?? nfs-server.service - NFS server and services
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled; vendor preset: disabled)
Drop-In: /run/systemd/generator/nfs-server.service.d
????order-with-mounts.conf
Active: active (exited) since Tue 2020-11-03 16:57:01 CST; 22s ago
Process: 10480 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Process: 10483 ExecStart=/usr/sbin/rpc.nfsd (code=exited, status=0/SUCCESS)
Main PID: 10483 (code=exited, status=0/SUCCESS)
11?? 03 16:57:01 localhost systemd[1]: Starting NFS server and services...
11?? 03 16:57:01 localhost exportfs[10480]: exportfs: /etc/exports [2]: Neither 'subtree_check' or >
11?? 03 16:57:01 localhost exportfs[10480]: Assuming default behaviour ('no_subtree_check').
11?? 03 16:57:01 localhost exportfs[10480]: NOTE: this default has changed since nfs-utils versio>
11?? 03 16:57:01 localhost exportfs[10480]: exportfs: Failed to resolve -network
11?? 03 16:57:01 localhost exportfs[10480]: exportfs: Failed to resolve -network
11?? 03 16:57:01 localhost exportfs[10480]: exportfs: /etc/exports [2]: Neither 'subtree_check' or >
11?? 03 16:57:01 localhost exportfs[10480]: Assuming default behaviour ('no_subtree_check').
11?? 03 16:57:01 localhost exportfs[10480]: NOTE: this default has changed since nfs-utils versio>
11?? 03 16:57:01 localhost systemd[1]: Started NFS server and services.
A beautiful web dashboard for Linux
最近提交(Master分支:3 个月前 )
186a802e
added ecosystem file for PM2 5 年前
5def40a3
Add host customization support for the NodeJS version 5 年前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐



所有评论(0)