Windows10搭建NFS服务

发布时间 2023-06-19 11:22:33作者: fuzidage

1. 下载haneWIN NFS Server for Windows

链接如下:
https://www.hanewin.net/nfs-e.htm
image

2. 安装并且执行 haneWIN NFS Server

安装完后,打开hanWin如下:进入Edit->Preferences
image

进入Exports->Edit exports file
image

2.1 修改配置文件

image
添加一行配置如下:
D:\ldc_res -name:nfs *(rw,sync,no_root_squash)
表示把D盘ldc_res目录当成nfs共享目录,-name:nfs表示客户端挂载时使用nfs表示D:\ldc_res路径
mount -t nfs -o nolock 192.168.0.100:/nfs /mnt/sd

2.2 保存配置

勾选如下2个选项:仅对授权用户可见,通过nfs将导出添加到文件夹的上下文菜单
image

3. 开发板客服端挂载测试

image

设置板端IP地址:
image
先确保windows和板端能ping通
image

3.1 挂载共享目录到开发板

image

mount -t nfs -o nolock 192.168.0.100:/nfs /mnt/sd
可以看到已经挂载上了,并且能访问挂载目录的文件