如题。在解这个问题时,执行了以下操作:
1、 关闭防火墙
sudo systemctl stop firewalld.service
2、安装nfs-server、nfs-utils,已确认nfs server服务已开启
● nfs-server.service - NFS server and services
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; enabled; preset: e[0;1;38:5:185mdisabled)
Drop-In: /run/systemd/generator/nfs-server.service.d
└─order-with-mounts.conf
Active: active (exited) since Thu 2024-11-14 14:47:37 CST; 53min ago
Invocation: 761ca469991343f183290d9bdb87aee3
Process: 1109 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS)
Process: 1118 ExecStart=/usr/sbin/rpc.nfsd (code=exited, status=0/SUCCESS)
Main PID: 1118 (code=exited, status=0/SUCCESS)
Mem peak: 820K
CPU: 11ms
Nov 14 14:47:37 aosc-240916 systemd[1]: Starting nfs-server.service - NFS server and services…
Nov 14 14:47:37 aosc-240916 exportfs[1109]: exportfs: /etc/exports [2]: Neither ‘subtree_check’ or ‘no_subtree_check’ specified for export “*:/home/steven/temp”.
Nov 14 14:47:37 aosc-240916 exportfs[1109]: Assuming default behaviour (‘no_subtree_check’).
Nov 14 14:47:37 aosc-240916 exportfs[1109]: NOTE: this default has changed since nfs-utils version 1.0.x
Nov 14 14:47:37 aosc-240916 systemd[1]: Finished nfs-server.service - NFS server and services.
3、 nfs挂载目录已具备777权限
4、检查rpcbind的状态,出现了cannot get local address for udp: Servname not supported for ai_socktype等错误:
● rpcbind.service - RPC bind service
Loaded: loaded (/usr/lib/systemd/system/rpcbind.service; indirect; preset: e[0;1;38:5:185mdisabled)
Active: active (running) since Thu 2024-11-14 14:47:36 CST; 1h 4min ago
Invocation: baaa38250aff4bd08be7a33e4a8bcfd9
TriggeredBy: ● rpcbind.socket
Process: 1072 ExecStart=/usr/bin/rpcbind -w ${RPCBIND_ARGS} (code=exited, status=0/SUCCESS)
Main PID: 1080 (rpcbind)
Tasks: 1 (limit: 1856)
Memory: 660K (peak: 920K)
CPU: 47ms
CGroup: /system.slice/rpcbind.service
└─1080 /usr/bin/rpcbind -w
Nov 14 14:47:36 aosc-240916 systemd[1]: Starting rpcbind.service - RPC bind service…
Nov 14 14:47:36 aosc-240916 rpcbind[1072]: cannot get local address for udp: Servname not supported for ai_socktype
Nov 14 14:47:36 aosc-240916 rpcbind[1072]: cannot get local address for tcp: Servname not supported for ai_socktype
Nov 14 14:47:36 aosc-240916 rpcbind[1072]: cannot get local address for udp6: Servname not supported for ai_socktype
Nov 14 14:47:36 aosc-240916 rpcbind[1072]: cannot get local address for tcp6: Servname not supported for ai_socktype
Nov 14 14:47:36 aosc-240916 systemd[1]: Started rpcbind.service - RPC bind service.
5、 运行“rpcinfo -p localhost”也有错误:
localhost: RPC: Remote system error - Connection refused
有挂载aosc nfs成功的案例吗?