czxingcici1
作者czxingcici1·2012-03-25 21:42
软件开发工程师·石化股份

AIX上如何正确挂载Linux 的nfs共享目录分享篇

字数 2701阅读 1834评论 0赞 0
AIX 5.3 问题描述:
  Linux 服务器上共享了/nfs 这个目录,如何将这个共享目录正确的挂载到AIX 的/data/wuxf 这个挂点。
  解答:
  1.在Linux 服务器上共享/nfs 这个目录, 在/etc/exports文件定义:
  /nfs *(rw,no_root_squash,sync)
  hostname : testcom
  #service portmap start
  #service nfslock start
  #service nfs start
  2.在AIX 端检查Linux的nfs 共享目录有没有存在:
  whoselife@/data>showmount -e testcom
  *:/nfs
  如果AIX上portmap 没有启动,运行showmount -e会出现如下报错:
  whoselife@/data>showmount -e
  whoselife: RPC: 1832-019 Program not registered
  如果出现1832-019的报错需要重新启动portmap 和nfs 的服务:
  whoselife@/data>stopsrc -g nfs
  0513-044 The biod Subsystem was requested to stop.
  0513-044 The nfsd Subsystem was requested to stop.
  0513-044 The rpc.mountd Subsystem was requested to stop.
  0513-044 The rpc.lockd Subsystem was requested to stop.
  0513-044 The rpc.statd Subsystem was requested to stop.
  whoselife@/data>stopsrc -s portmap
  0513-044 The portmap Subsystem was requested to stop.
  whoselife@/data>startsrc -s portmap
  0513-059 The portmap Subsystem has been started. Subsystem PID is 954432.
  whoselife@/data>startsrc -g nfs
  0513-059 The biod Subsystem has been started. Subsystem PID is 344286.
  0513-059 The nfsd Subsystem has been started. Subsystem PID is 618542.
  0513-059 The rpc.mountd Subsystem has been started. Subsystem PID is 975026.
  0513-059 The nfsrgyd Subsystem has been started. Subsystem PID is 380956.
  0513-059 The gssd Subsystem has been started. Subsystem PID is 380958.
  0513-059 The rpc.lockd Subsystem has been started. Subsystem PID is 380960.
  0513-059 The rpc.statd Subsystem has been started. Subsystem PID is 143412.
  whoselife@/data>showmount -e testcom
  *:/nfs
  这样就成功检测到了共享文件。
  3. 检查/etc/hosts ,确定服务器和客户机的主机名地址可以正确解析。
  whoselife@/>traceroute testcom
  trying to get source for testcom
  source should be 9.123.x.y
  traceroute to testcom (9.123.a.b) from 9.123.x.4 (9.123.x.y), 30 hops max
  outgoing MTU = 1500
  1 9.123.x.4 (9.123.x.4) 1 ms 1 ms 1 ms
  2 testcom (9.123.130.34) 1 ms 1 ms 1 ms
  whoselife@/>host 9.123.a.b
  testcom is 9.123.a.b
  whoselife@/>host 9.123.x.y
  whoselife is 9.123.x.y
  如果检查到0827-803的错误,需要在服务器和客户机的/etc/hosts加入两边正确的主机名和ip地址。
  whoselife@/data>host 9.123.131.147
  host: 0827-803 Cannot find address 9.123.131.147.
  4。挂载Linux nfs 文件系统到AIX 的目录/data/wuxf
  whoselife@/>mount testcom:/nfs /data/wuxf
  如果出现下列不能挂载的问题:
  whoselife@/>mount testcom:/nfs/ data/wuxf
  mount: giving up on:
  testcom:/nfs/
  vmount: Not owner
  需要检查nfso -a:
  whoselife@/data>nfso -a | grep nfs_use_reserved_ports
  nfs_use_reserved_ports = 0
  默认情况,AIX系统执行mount命令请求时并不使用预先定义好的端口,设置nfs_use_reserved_ports后可使用1024以下的预定义端口。
  whoselife@/>nfso -o nfs_use_reserved_ports=1
  Setting nfs_use_reserved_ports to 1
  这样AIX 就可以正确挂载Linux 的nfs 共享文件了

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

0

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

相关文章

相关问题

相关资料

X社区推广