|
Firefly使用NFS
发表于 2015-2-27 18:47:31
浏览:10529
|
回复:0
打印
只看该作者
[复制链接]
楼主
本帖最后由 zhansb 于 2015-2-27 19:03 编辑
1.kernel添加NFS支持
参考附件图片"menuconfig_nfs.png"配置,或者.config添加:
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3_ACL=y
+CONFIG_NFS_V4=y
+CONFIG_NFS_V4_1=y
+CONFIG_NFSD=y
+CONFIG_NFSD_V3_ACL=y
+CONFIG_NFSD_V4=y
编译后烧写内核
2.Firefly安装配置nfs
root@firefly:~# vi /etc/exports
在尾部添加:/home/firefly/ *(rw,sync,no_subtree_check), “/home/firefly/”为挂载测试目录,最终文件为:
- # /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)
- #
- /home/firefly/ *(rw,sync,no_subtree_check)
复制代码
root@firefly:~# sudo /etc/init.d/nfs-kernel-server restart
3.测试:为了方便测试,直接在firefly上挂载:
root@firefly:~# sudo apt-get install nfs-common
root@firefly:~# mkdir /mnt/nfs/
root@firefly:~# sudo mount -t nfs localhost:/home/firefly/ /mnt/nfs/
root@firefly:~# ls /mnt/nfs/
Desktop Downloads Templates
|
|