一,NFS搭建步骤:

1.安装Ubuntu NFS服务:
           ---> apt-get install nfs-kernel-server
                • 安装过程弹出对话,选择Y,回车继续安装

2.配置/etc/exports
       – 最后一行添加/home/source/ *(rw,sync,no_root_squash)
         /home/source/表示要共享的目录,根据实际情况修改
        – *:代表允许所有的网络段访问
      – rw:是可读写权限
     – ync:是资料同步写入内存和硬盘
      – no_root_squash:是Ubuntu nfs 客户端分享目录使用者的权限,如果客户端使用的是root 用户,那么对于该共享目录而言,该客户端就具有root 权限

3 .重启portmap 服务
        – /etc/init.d/portmap restart

root@ubuntu:/home/source# /etc/init.d/portmap restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service portmap restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop portmap ; start portmap. The restart(8) utility is also available.
portmap stop/waiting
portmap start/running, process 15124

4.重启nfs 服务
       – /etc/init.d/nfs-kernel-server restart

root@ubuntu:/home/source# /etc/init.d/nfs-kernel-server  restart
 * Stopping NFS kernel daemon                                             [ OK ] 
 * Unexporting directories for NFS kernel daemon...                       [ OK ] 
 * Exporting directories for NFS kernel daemon...                              
exportfs: No options for /home/source/*(rw,sync,no_root_squash) : suggest (sync) to avoid warning
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export ":/home/source/*(rw,sync,no_root_squash)".
  Assuming default behaviour ('no_subtree_check').
  NOTE: this default has changed since nfs-utils version 1.0.x

exportfs: Failed to stat /home/source/*(rw,sync,no_root_squash): No such file or directory
                                                                          [ OK ]
 * Starting NFS kernel daemon                                             [ OK ]

5.测试NFS功能:

root@ubuntu:/home/source# mount -t nfs localhost:/home/source/system /mnt
mount.nfs: access denied by server while mounting localhost:/home/source/system

二.错误分析:

这里可以看出NFS挂载失败。问题在于重启的时候失败,报错:exportfs: No options for /home/source/*(rw,sync,no_root_squash) : suggest (sync) to avoid warning
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export ":/home/source/*(rw,sync,no_root_squash)".

这里是把配置/etc/exports
       – 最后一行添加/home/source/ *(rw,sync,no_root_squash)------>改成/home/source *(rw,sync,no_root_squash,no_subtree_check)就OK了。

执行结果:

root@ubuntu:/home/source# /etc/init.d/portmap restart
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service portmap restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) and then start(8) utilities,
e.g. stop portmap ; start portmap. The restart(8) utility is also available.
portmap stop/waiting
portmap start/running, process 15511
root@ubuntu:/home/source# /etc/init.d/nfs-kernel-server  restart
 * Stopping NFS kernel daemon                                             [ OK ] 
 * Unexporting directories for NFS kernel daemon...                       [ OK ] 
 * Exporting directories for NFS kernel daemon...                         [ OK ] 
 * Starting NFS kernel daemon                                             [ OK ] 
root@ubuntu:/home/source# mount -t nfs localhost:/home/source/system /mnt
root@ubuntu:/home/source#

NFS搭建错误处理:exportfs:No options for /home/source/*(rw,sync,no_root_squash):suggest(sync) to avoid warn相关推荐

  1. nfs搭建和可能的问题

    http://www.cnblogs.com/hackerer/p/5221556.html 挺不错的参考文档 NFS服务器搭建: 服务器IP: 10.135.152.241 yum install ...

  2. 开发板和电脑网线连接,电脑网线连接 ubuntu18.04 nfs搭建

    [事先声明,每个人情况不同,不一定适用] 首先设置windows下用网线开发板连接的IP,默认网关个人没设,有需要也可以设置为192.168.137.1(跟IP一样). 然后打开虚拟网络编辑器选择开发 ...

  3. NFS搭建与自动挂载

    NFS搭建与自动挂载 1.NFS文件共享服务器: 同步外网源,搭建共享服务,通过自动挂载实现挂载外网源,建立本地仓库 NFS是network file sytem的缩写,他最大的特点就是可以通过网络, ...

  4. linux nfs搭建

    怎样更高效的快速分享多台linux系统的资源?说到windows资源共享大家可以很容易想到在网络邻居里面找.linux系统间也有类似windows网络邻居的服务功能,就是nfs:linux系统和win ...

  5. AIX 访问Linux NFS共享错误案例

    AIX 访问Linux NFS共享错误案例 系统环境: 操作系统: RedHat EL4.AIX 5.3 错误现象: Linux 作为NFS Server ,AIX host 作为NFS Client ...

  6. linux 离线安装nfs,ubuntu 上离线安装包制作与安装之NFS搭建

    在Ubuntu上离线搭建NFS服务器 一.制作离线软件包 在联网且环境与你相同的电脑上 制作离线软件包 注:先查看有没有安装nfs-utils的安装包 命令:# rpm -q nfs-utils 1. ...

  7. Linux下的NFS搭建配置

    Linux下的NFS搭建配置 一.NFS介绍 1.NFS简介 2.NFS特点 二.环境介绍 三.服务端配置 1.创建共享目录 2.检查NFS包是否安装 3.安装nfs相关包 4.编辑配置文件 5.重启 ...

  8. raspberry树莓派NFS搭建

    Server Ubuntu10.4 Client Raspberry 一.搭建NFS 服务端server(虚拟机ubuntu)的 NFS功能 在终端上以此输入以下命令: sudo apt-get in ...

  9. ubuntu搭建NFS服务 磁盘共享 nfs 搭建

    服务端(1.1.1.1这台服务器): 1.安装nfs服务模块(直接装nfs-kernel-server就好了,其中apt会自动解决依赖,主要是nfs-common和rpcbind 这两个包) 默认装好 ...

最新文章

  1. 美国北卡教堂山分校Jeff Dangl组植物微生物组博士后招聘(植物微生物互作领域第一高引学者)...
  2. 《应用时间序列分析:R软件陪同》——1.5 习题
  3. 浅谈内存开辟问题和Block内存问题
  4. 记一次node+react项目发布过程(一)--webpack生产环境打包优化
  5. opencv使用trackbar调控美颜程度
  6. 树莓派镜像备份 linux系统,使用dump和restore来制作树莓派的img镜像
  7. 常见的几种网络抓包及协议分析工具
  8. MP4视频损坏修复工具下载
  9. linux玩安卓游戏下载,在Deepin 20.2系统下可用Xdroid on Linux来玩王者荣耀游戏
  10. 解析ICMAX国产存储芯片eMMC和UFS的区别
  11. 求学之路五、六月的Review
  12. Hadoop大数据平台搭建课程笔记
  13. 安装IE,出现“无法安装ie,因为其他程序或更新正在等待重新启动计算机。”解决方法。
  14. Android 300行代码实现经典小游戏贪吃蛇
  15. html 右键菜单 插件,Script Menu:自定义右键菜单
  16. LoadImage用法
  17. PDF怎么编辑,如何去除PDF水印
  18. odoo里面 Domain
  19. TCP TSO/GSO初步探索
  20. 快速将Win7默认字体还原的方法

热门文章

  1. 用EXCEL分析《亚马逊智能产品评论》
  2. Promise面试题汇总
  3. 大唐长安人杜环在两河流域, 耶路撒冷和北非的行程
  4. 如何在基于vue-cli的项目中,使用精灵图 css sprite
  5. turtle库基本介绍
  6. 移动App专项性能测试(Android and iOS)
  7. 计算机和网络连接不上,电脑宽带连不上怎么办_台式电脑连不上宽带怎么回事-win7之家...
  8. python+selenium+pycharm自动化测试环境搭建
  9. 蓝蓝算法10-数字颠倒
  10. php://filter伪协议(总结)