Firefly开源社区

标题: Firefly使用NFS [打印本页]

作者: zhansb    时间: 2015-2-27 18:47
标题: Firefly使用NFS
本帖最后由 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/”为挂载测试目录,最终文件为:
  1. # /etc/exports: the access control list for filesystems which may be exported
  2. #                to NFS clients.  See exports(5).
  3. #
  4. # Example for NFSv2 and NFSv3:
  5. # /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
  6. #
  7. # Example for NFSv4:
  8. # /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
  9. # /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
  10. #

  11. /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




menuconfig_nfs.png (140.2 KB, 下载次数: 620)

menuconfig_nfs.png





欢迎光临 Firefly开源社区 (https://dev.t-firefly.com/) Powered by Discuz! X3.1