目录
1 安装nfs.exe
2 mounting 172.31.8.183:/f/nfs on /mnt/nfs failed: No such file or directory
3 mounting 172.31.8.183:/d/nfs on /mnt/nfs failed: Permission denied
1 安装nfs.exe
某项目中需要把程序放到Linux开发板中测试,刚开始使用tftp命令下载,不太方便,因此想弄一下mount挂载,按照如下博客教程设置:如何在Windows上搭建NFS服务器实现开发板与Windows之间的文件共享_windows搭建nfs共享_Jack_小明的博客-CSDN博客
2 mounting 172.31.8.183:/f/nfs on /mnt/nfs failed: No such file or directory
mount -t nfs -o nolock 172.31.8.183:/f/nfs /mnt/nfs
mount: mounting 172.31.8.183:/f/nfs on /mnt/nfs failed: No such file or directory
刚开始不知道什么原因,直到看到这篇博客:Windows和开发板(linux)系统的nfs目录挂载_开发板nfs挂载_一个编程的菜鸡的博客-CSDN博客
![](https://img-blog.csdnimg.cn/cc75952f47ed4770ba49f3010c716da8.png)
原来exports文件里面是有文件夹的路径说明的,打开nfs.exe安装目录下的exports文件可以看到
![](https://img-blog.csdnimg.cn/107f27d7ede04f8c90a46a5b8c2205e9.png)
或者按照这篇博客:Linux挂载Windows端NFS服务(实现板端Linux与PC互传文件)_linux挂载windows nfs_Mr.Idleman的博客-CSDN博客![](https://img-blog.csdnimg.cn/1e37518275f9491b807a229a198db71c.png)
都可以看到,你在哪个路径下创建的nfs文件夹,那么要修改配置文件的,而我这里挂载提示没有这个目录就是因为我是在f盘创建的nfs文件夹。
3 mounting 172.31.8.183:/d/nfs on /mnt/nfs failed: Permission denied
然后我在D盘中创建了nfs文件夹,重新挂载报下面的错误。
mount -t nfs -o nolock 172.31.8.183:/d/nfs /mnt/nfs
mount: mounting 172.31.8.183:/d/nfs on /mnt/nfs failed: Permission denied
有的上面2中的错误的启发,这个错误的原因猜测是因为export文件里面没有加上开发板的IP地址,因此我这样修改
![](https://img-blog.csdnimg.cn/b21dd5f84a7f4dd88e1f474f60e10e0f.png)
然后加上开发板的ip地址
![](https://img-blog.csdnimg.cn/3d8f6ae3f58243a48b889a75c99613d4.png)
这时候点击重启服务器没用,还是不会出现开发板的ip地址,要先
选择电脑,鼠标右键,点击管理
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210419201127150.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1d1X0d1aU1pbmc=,size_16,color_FFFFFF,t_70)
- 点击服务,找到NFS Server
![在这里插入图片描述](https://img-blog.csdnimg.cn/20210419201048629.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1d1X0d1aU1pbmc=,size_16,color_FFFFFF,t_70)
- 选择NFS Server,鼠标右键,点击重新启动
![在这里插入图片描述](https://img-blog.csdnimg.cn/2021041920125079.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L1d1X0d1aU1pbmc=,size_16,color_FFFFFF,t_70)
然后再重新点击
![](https://img-blog.csdnimg.cn/0b900f9634de428ca09110a9e68ab9a7.png)
这时候就可以了。
![](https://img-blog.csdnimg.cn/1527811b2e52463faea9a1c4e9ffb25f.png)
然后在windows电脑中随便创建个test.txt,在开发板中就能看到了。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)