在嵌入式系统中加载nfs(包含nfs server 端的安装)

How to Install and Configure an NFS Server on Ubuntu 22.04
https://linuxhint.com/install-and-configure-nfs-server-ubuntu-22-04/

使用的是buildroot生成的linux操作系统 使用如下命令正常加载nfs路径
在nfs server端配置被分享出来的

vim /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
#               to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/mnt 192.168.1.232/24(rw,sync,no_subtree_check)
/mnt 192.168.1.75/24(rw,sync,no_subtree_check)

应用修改的配置文件

exportfs -a
systemctl restart nfs-kernel-server.service 



mount -t nfs -o nolock 192.168.1.70:/mnt /root/mnt

posted @ 2022-09-08 14:06  simp00  阅读(74)  评论(0编辑  收藏  举报