免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 3011 | 回复: 0
打印 上一主题 下一主题

[新手入门] 共享光驱 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-10-25 16:01 |只看该作者 |倒序浏览
1.在SERVER 端的/etc/hosts文件中分别添加SERVER和CLIENT端的IP地址
hostname :P270
#tail /etc/hosts
+48  # Internet Address      Hostname        # Comments
   +49  # 192.9.200.1           net0sample      # ethernet name/address
   +50  # 128.100.0.1           token0sample    # token ring name/address
   +51  # 10.2.0.2              x25sample       # x.25 name/address
   +52  127.0.0.1               loopback localhost      # loopback (lo0) name/address
   +53  192.168.xxx.240   P270
   +54  192.168.xxx.246   F80
   
  hostname :F80
# tail /etc/hosts
# line are not interpreted by routines which search this file.  Blank
# lines are allowed.
# Internet Address      Hostname        # Comments
# 192.9.200.1           net0sample      # ethernet name/address
# 128.100.0.1           token0sample    # token ring name/address
# 10.2.0.2              x25sample       # x.25 name/address
127.0.0.1               loopback localhost      # loopback (lo0) name/address
192.168.xxx.246 F80
192.168.xxx.240 P270
   
2.检查两台机器的NFS进程是否已经启动.如果没有则用#startsrc -g nfs启动进程   
[P270][/]lssrc -g nfs
Subsystem         Group            PID          Status
biod             nfs              13026        active
nfsd             nfs              8104         active
rpc.mountd       nfs              10742        active
rpc.statd        nfs              4456         active
rpc.lockd        nfs              7752         active

# lssrc -g nfs
Subsystem         Group            PID          Status
biod             nfs              28420        active
nfsd             nfs              4422         active
rpc.mountd       nfs              12600        active
rpc.lockd        nfs              17318        active
rpc.statd        nfs              16106        active
nfsrgyd          nfs                           inoperative
gssd             nfs                           inoperative
3:在SERVER端输出CDROM文件系统到Export directory, 各项属性的设置如下
hostname :P270
#smitty mknfsexp
                                             Add Attributes of an Exported Directory
Type or select values in entry fields.
Press Enter AFTER making all desired changes.
  
                                                        [Entry Fields]
* PATHNAME of Directory to Export                     /cdrom
* MODE to export directory                            read-only                                                                  +
  HOSTS & NETGROUPS allowed client access            []
  Anonymous UID                                      [0]
  HOSTS allowed root access                          []
  HOSTNAME list. If exported read-mostly             []
  Use SECURE OPTION?                                  no                                                                         +
  Public filesystem?                                  no                                                                         +
* CHANGE export now, system restart or both           now                                                                        +
  PATHNAME of alternate Exports file                 []
  回车执行OK后输入命令
[P270][/]showmount -e P270
export list for P270:
/cdrom -ro,anon=0
[P270][/]mount /cdrom
mount
  node       mounted        mounted over    vfs       date        options      
-------- ---------------  ---------------  ------ ------------ ---------------
         /dev/hd4         /                jfs    Oct 26 04:13 rw,log=/dev/hd8
         /dev/hd2         /usr             jfs    Oct 26 04:13 rw,log=/dev/hd8
         /dev/hd9var      /var             jfs    Oct 26 04:13 rw,log=/dev/hd8
         /dev/hd3         /tmp             jfs    Oct 26 04:13 rw,log=/dev/hd8
         /dev/hd1         /home            jfs    Oct 26 04:15 rw,log=/dev/hd8
         /proc            /proc            procfs Oct 26 04:15 rw              
         /dev/hd10opt     /opt             jfs    Oct 26 04:15 rw,log=/dev/hd8
         /dev/cd0         /cdrom           cdrfs  Oct 26 04:38 ro              
4.在客户端安装NFS类型的文件系统
hostname :F80
先建立一个/cdrom1文件夹
# mkdir /cdrom1
#smitty mknfsmnt
                                                   Add a File System for Mounting
Type or select values in entry fields.      
Press Enter AFTER making all desired changes.
[TOP]                                                   [Entry Fields]
* Pathname of mount point                            [/cdrom1]                                                                    /
* Pathname of remote directory                       [/cdrom]
* Host where remote directory resides                [P270]
  Mount type name                                    []
* Security method                                    [sys,dh]                                                                    +
* Mount now, add entry to /etc/filesystems or both?   now                                                                        +
* /etc/filesystems entry will mount the directory     no                                                                         +
   on system restart.
* Mode for this NFS file system                       read-only                                                                  +
* Attempt mount in foreground or background           background                                                                 +
  Number of times to attempt mount                   []                                                                           #
  Buffer size for read                               []                                                                           #
  Buffer size for writes                             []                                                                           #
  NFS timeout. In tenths of a second                 []                                                                           #
  NFS version for this NFS filesystem                 any                                                                        +
  Transport protocol to use                           any                                                                        +
  Internet port number for server                    []                                                                           #
* Allow execution of setuid and setgid programs       yes                                                                        +
   in this file system?
* Allow device access via this mount?                 yes                                                                        +
* Server supports long device numbers?                yes                                                                        +
* Mount file system soft or hard                      hard                                                                       +
  Minimum time, in seconds, for holding              [3]                                                                          #
   attribute cache after file modification
  Allow keyboard interrupts on hard mounts?           yes                                                                        +
  Maximum time, in seconds, for holding              [60]                                                                         #
   attribute cache after file modification
  Minimum time, in seconds, for holding              [30]                                                                         #
   attribute cache after directory modification
  Maximum time, in seconds, for holding              [60]                                                                         #
   attribute cache after directory modification
  Minimum & maximum time, in seconds, for            []                                                                           #
   holding attribute cache after any modification
  The maximum number of biod daemons allowed         [6]                                                                          #
   to work on this file system
* Use acls on this mount?                             no                                                                         +
[MORE...3]
回车执行OK后,执行命令
# mount
  node       mounted        mounted over    vfs       date        options      
-------- ---------------  ---------------  ------ ------------ ---------------
         /dev/hd4         /                jfs    Oct 25 09:52 rw,log=/dev/hd8
         /dev/hd2         /usr             jfs    Oct 25 09:52 rw,log=/dev/hd8
         /dev/hd9var      /var             jfs    Oct 25 09:52 rw,log=/dev/hd8
         /dev/hd3         /tmp             jfs    Oct 25 09:52 rw,log=/dev/hd8
         /dev/hd10opt     /opt             jfs    Oct 25 09:54 rw,log=/dev/hd8
         /dev/oracle      /oracle          jfs    Oct 25 10:24 rw,log=/dev/loglv00
         /dev/test        /test            jfs    Oct 25 10:48 rw,log=/dev/loglv00
         /dev/hd1         /home            jfs    Oct 25 13:21 rw,log=/dev/hd8
         /proc            /proc            procfs Oct 25 13:21 rw              
P270     /cdrom           /cdrom1          nfs3   Oct 25 15:43 ro,bg,hard,intr,sec=sys:dh
# cd /cdrom1
# ls
.Version      OSLEVEL       RPMS          image.data    ppc           usr
5200-08       README.aix    bosinst.data  installp      root
至此光驱共享完成.


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/22286/showart_190303.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP