AIX,v5.3搭建NFS(AIX作为服务端,linux作为客户端)

回复 收藏
NFS服务端:
1:查看NFS进程
# lssrc -g nfs
Subsystem         Group            PID          Status
biod             nfs              184502       active
nfsd             nfs              120418       active
rpc.mountd       nfs              108260       active
rpc.lockd        nfs              153268       active
rpc.statd        nfs              87628        active
nfsrgyd          nfs                           inoperative
gssd             nfs                           inoperative
注:AIX5.3支持NFS v2,v3,v4三个版本,默认使用NFS v3。nfsrgyd和gssd这两个守护进程是v4新增加的程。
实例:
将134.160.46.138的/usr2/crnop/data/cdl,只读权限,共享134.160.46.162/usr2/crnop/data/cdl138
2:配置共享目录
编辑/etc/exports
#vi /etc/exports
/usr2/crnop/data/cdl -ro,access=XXX(客户端主机名)
注释:
access:只允许134.160.46.162访问/usr2/crnop/data/cdl目录,其他机器不允许访问 ro:/usr2/crnop/data/cdl目录被设置为只读,若无任何参数,则默认为rw
3:使用命令
# exportfs -a
读取/etc/exports文件,才能把内容共享出去,使其他机器的用户可以使用本机的文件。
4:添加hosts文件
#vi /etc/hosts
134.160.46.162  xxx
4:查看NFS服务端是否共享该目录
#showmount -e  
export list for HUNCRNOPAPP:
/usr2/crnop/data/cdl vnode1
5:启动NFS
# mknfs -N
0513-029 The portmap Subsystem is already active.
Multiple instances are not supported.
Starting NFS services:
0513-029 The biod Subsystem is already active.
Multiple instances are not supported.
0513-029 The nfsd Subsystem is already active.
Multiple instances are not supported.
0513-029 The rpc.mountd Subsystem is already active.
Multiple instances are not supported.
0513-029 The rpc.statd Subsystem is already active.
Multiple instances are not supported.
0513-029 The rpc.lockd Subsystem is already active.
Multiple instances are not supported.
Completed NFS services.
启动成功!!!
二:客户端挂载NFS服务器中的共享目录
1:添加hosts内容
#vi /etc/hosts
134.160.46.138 yyy
2:挂载共享目录
错误挂载格式:
[root@vnode1 ~]# mount -t nfs 134.160.46.138:/usr2/crnop/data/cdl /usr2/crnop/data/cdl138
报错信息:
"mount.nfs: Remote I/O error
解决方法:
aix nfs share to linux
mount报错
解决办法:mount加选项-o nfsvers=3或者-o nfsvers=2
正确挂载:
[root@vnode1 ~]# mount -t nfs -o nfsvers=3 134.160.46.138:/usr2/crnop/data/cdl /usr2/crnop/data/cdl138
3:查看是否挂载:
[root@vnode1 ~]# mount |grep nfs
2015-01-16 11:37 举报
已邀请:

回复帖子,请先登录注册

退出全屏模式 全屏模式 回复
评分
可选评分理由: