Linux中国 Linux中国门户站!
设为主页 设为主页
收藏本站 收藏本站
 
当前位置 :首页 ->操作系统 ->Solaris ->正文

NFS简介

来源:Linuxdby.com 作者:Webmaster 时间:2007-05-26 点击: [收藏] [投稿]

               /etc/ethers
         4. 为你自己的network 设置security

    exportfs的语法
      /usr/etc/exportfs   [ -avu ]   [ -o option ]  [ directory ]
          -a     : 把 /etc/exports 中所有路径export出去
          -u     : 把 export出去的路径卸下 , 如 exportfs -u /usr
          -o option :  如 exportfs -o ro /usr ,所有人对/usr 都为read only
                       option 还有 root = hostname , access = client
                                   access = netgroup

    For example :
              exportfs -a  把exports中的路径全部export出去
              exportfs -o access=engineering:other  /usr
                /usr 这路径export後只有engineering and other 这两个
                group 能够 read & write
              exportfs -o access=oak,ro=dancer  /usr
                设定dancer 这台client 对 /usr 为read only ,且只有
                oak这一个 group 能做read


           /etc/exports  档的□例

    ●  syntax : directory          -option[,option]
                                     (设定两个group能rw)
      /usr                     -access=engineering:accounting
      /home                    -access=engineering:accounting
      /var/spool/mail                -access=engineering:accounting
      /export/exec/sun3              -access=engineering:accounting
      /export/exec/sun3.sunos.4.1    -access=engineering:accounting
      /export/exec/kvm/sun3.sunos.4.1  -access=engineering:accounting
      /export/root/birch          -access=birch,root=birch
      /export/swap/birch          -access=birch,root=birch
      /export/root/oak          -access=oak,root=oak
      /export/swap/oak          -access=oak,root=oak
      /export/root/willow         -access=willow,root=willow
      /export/swap/willow         -access=willow,root=willow
      /export/root/pine           -accsee=pine,root=pine
      /export/swap/pine           -accsee=pine,root=pine
   (access=client , root=hostname 如此只有这一台client的superuser有权力rw)

   □ Setting Up a NFS Client

        1. 宣告机器为没有磁碟机或没有资料的Client,在使用SunInstall之前
        2. 编辑好 /etc/fstab 这一个档,确定要mount的路径都在fstab中
        3. 依照fstab所设的内容,在Client上设定好Mount points
           (mount_points 就是用mkdir 设exports所输出的路径)
        4. 确定我们所要mount的路径,都有出现在 /etc/exports 中
        5. 可以启动mount去连结server上的directories   ( mount -a )


        /etc/fstab   档的□例
    ● syntax  filesystem  directory  type  options  freq  pass
        oak:/export/root/boomer  /  nfs  rw  0  0
                                            ^^^
                                      因为档案在server上,not on client
                                      所以client的设定为0
        oak:/export/exec/sun3           /usr  nfs  ro  0  0
        oak:/export/exec/kvm/sun3       /usr/kvm nfs ro  0  0
        oak:/usr/share                  /usr/share  nfs  ro  0  0
        oak:/home/oak           /home/oak  nfs  rw,bg  0  0



    § mount 的语法

   ● syntax : mount -t type [-rv] -o [option] server:pathname /mount_point
   MOUNT :
           mount -a     把/etc/fstab 中所列的路径全部挂上
           mount -o ro,soft,bg dancer:/usr/local /usr/local/dancer
                  把dancer server 的/usr/local mount 到 client的
                  /usr/local/dancer 并且是read only

          -t type : 你所要mount的型别, 如 nfs or 4.2
              -r  : 所mount的路径定为read only
              -v  : mount过程的每一个动作,都有messages 传回到萤幕上
             hard : 重复要求,直到server回应为止,但如server一直不回应
                   the server may be down !
             soft : 当client的请求得不到回应,retry one time 後 传回

 如果您对本文有任何疑问或者建议,请到讨论区发表您的意见: >> 论坛入口 <<



上一篇:Solaris7 交流 --- swap管理(SWAP的用处)   下一篇:Solaris 常见问题及解决方法

文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【我要投稿】 【论坛讨论
更多相关文章
Power by linux-cn.com 粤ICP备05006655号