Welcome 微信登录

首页 / 操作系统 / Linux / Linux下简单配置NFS文件系统

文中使用的是rhel4 版本的linux,其他版本会有不同。服务器端:1、配置/etc/exports格式说明:
共享目录指定ip地址的主机(192.168.1.123)/网段中所有主机(192.168.10.0/24)(共享参数)
/u01/workspace  192.168.10.0/24(rw,sync)/u01/archives   192.168.10.0/24(rw,sync)Nfs 访问权限说明
               ro                      只读访问
        rw                      读写访问
        sync                    所有数据在请求时写入共享
        async                   NFS在写入数据前可以相应请求
        secure                  NFS通过1024以下的安全TCP/IP端口发送
        insecure                NFS通过1024以上的端口发送
        wdelay                  如果多个用户要写入NFS目录,则归组写入(默认)
        no_wdelay               如果多个用户要写入NFS目录,则立即写入,当使用async时,无需此设置。
        hide                    在NFS共享目录中不共享其子目录
        no_hide                 共享NFS目录的子目录
        subtree_check           如果共享/usr/bin之类的子目录时,强制NFS检查父目录的权限(默认)
        no_subtree_check        和上面相对,不检查父目录权限
        all_squash              共享文件的UID和GID映射匿名用户anonymous,适合公用目录。
        no_all_squash           保留共享文件的UID和GID(默认)
        root_squash             root用户的所有请求映射成如anonymous用户一样的权限(默认)
        no_root_squas           root用户具有根目录的完全管理访问权限
        anonuid=xxx             指定NFS服务器/etc/passwd文件中匿名用户的UID
2、重启服务器端的nfs服务: service portmap restart  service nfs restart使修改生效 3、配置客户端mount -t nfs -o rw,bg,hard,nointr,rsize=32768,wsize=32768,timeo=600,actimeo=0 192.168.10.121:/u01/archives /u01/archivesmount -t nfs -o rw,bg,hard,nointr,rsize=32768,wsize=32768,timeo=600,actimeo=0 192.168.10.121:/u01/workspace /u01/workspace/etc/Fstab192.168.1.101:/Oracle/archive /oracle/archive    nfs    defaults       0 0 或者/etc/rc.d/rc.local 使之开机启动mount -t nfs -o rw,bg,hard,nointr,rsize=32768,wsize=32768,timeo=600,actimeo=0 192.168.10.121:/u01/archives /u01/archivesmount -t nfs -o rw,bg,hard,nointr,rsize=32768,wsize=32768,timeo=600,actimeo=0 192.168.10.121:/u01/workspace /u01/workspaceLinux磁盘管理--cfdisk与fdisk使用在CentOS 6中安装vbox的增强功能 配置软件源RPMforge相关资讯      RHEL 
  • Red Hat Enterprise Linux 7.2 发  (11/20/2015 13:39:31)
  • 使用Windows 2003 Server R2给RHEL  (01/03/2015 09:14:16)
  • Red Hat Enterprise Linux 5.11 发  (09/17/2014 09:40:49)
  • 在VMware中安装RHEL6.2(下)——   (01/07/2015 12:24:47)
  • 红帽企业 Linux (RHEL) 7.1 Beta   (12/12/2014 09:44:13)
  • Red Hat Enterprise Linux 6.6   (08/13/2014 13:43:14)
本文评论 查看全部评论 (0)
表情: 姓名: 字数