# 创建共享目录
[root@MiWiFi-RA69-srv ~]# mkdir /mnt/nfs
# 创建nfs共享
[root@MiWiFi-RA69-srv ~]# cat /etc/exports /mnt/nfs *(rw,no_all_squash,no_root_squash,insecure,sync,no_wdelay)
# 启动服务
[root@MiWiFi-RA69-srv ~]# systemctl restart rpcbind.service [root@MiWiFi-RA69-srv ~]# systemctl restart nfs.service
# 查看共享
[root@MiWiFi-RA69-srv ~]# showmount -e localhost Export list for localhost: /mnt/nfs *
# 客户端挂载
[root@MiWiFi-RA69-srv cifs]# showmount -e 192.168.31.183 Export list for 192.168.31.183: /mnt/nfs * [root@MiWiFi-RA69-srv cifs]# mkdir /mnt/nfs [root@MiWiFi-RA69-srv cifs]# mount -t nfs 192.168.31.183:/mnt/nfs /mnt/nfs [root@MiWiFi-RA69-srv cifs]# df -T Filesystem Type 1K-blocks Used Available Use% Mounted on devtmpfs devtmpfs 1926528 0 1926528 0% /dev tmpfs tmpfs 1809260 12 1809248 1% /dev/shm tmpfs tmpfs 1809260 190492 1618768 11% /run tmpfs tmpfs 1809260 0 1809260 0% /sys/fs/cgroup /dev/xvda3 xfs 17814528 11200964 6613564 63% / /dev/xvda1 xfs 1038336 133500 904836 13% /boot tmpfs tmpfs 361852 0 361852 0% /run/user/0 //192.168.31.244/iso cifs 209713148 133600280 76112868 64% /mnt/cifs 192.168.31.183:/mnt/nfs nfs4 17814528 15722496 2092032 89% /mnt/nfs
客户端性能问题参考:
https://help.aliyun.com/document_detail/184789.htm
如何修改同时发起的NFS请求数量 部分内容
echo "options sunrpc tcp_slot_table_entries=128" >> /etc/modprobe.d/sunrpc.conf echo "options sunrpc tcp_max_slot_table_entries=128" >> /etc/modprobe.d/sunrpc.conf sysctl -w sunrpc.tcp_slot_table_entries=128
原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/5037.html