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

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

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 mswhoselife@/>host 9.123.a.b
  testcom is 9.123.a.bwhoselife@/>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/wuxfwhoselife@/>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 共享文件了

AIX5.3 Linux

问题描述

mount linux nfs 服务器时,报错如下:

nfsmnthelp: invalid option insecure ignored
mount: 1831-011 access denied for 10.1.1.74:/tpdata/test
mount: 1831-008 giving up on:
10.1.1.74:/tpdata/test
The file access permissions do not allow the specified action.

解答

1.检查域名解析,一切正常

2.在linux服务器上执行:showmount -e,结果如下:

[root@rigelrh ~]# more /etc/exports
/natsys_net/ *(sync,no_root_squash,rw)
/natsys_net/products_rigelrh *(sync,no_root_squash,rw)
/natsys_net/archives_rigelrh *(sync,no_root_squash,rw)
/natsys_net/archives_rigelrh/cvs *(sync,no_root_squash,rw)
#/natsys_net/backup *(sync,no_root_squash,rw)
/natsys_net/backup/WCS_rigelrh *(sync,no_root_squash,rw)
/natsys_net/archives_rigelrh/admin *(sync,no_root_squash,rw)
/natsys_net/archives_rigelrh/integ *(sync,no_root_squash,rw
3.nfso -a|grep port 返回结果
portcheck = 0
nfs_use_reserved_ports = 0

4.执行命令:nfso -o nfs_use_reserved_ports=1

问题解决,mount成功.

默认情况,AIX系统执行mount命令请求时并不通过预先定义好的端口.即用nfso -a查询出的

nfs_use_reserved_ports = 0.

要解决此类问题,可以在Linux exports文件中做如下修改:

/natsys_net/archives_rigelrh *(sync,insecure,no_root_squash,rw)

或者可以在每个AIX 客户端做如下修改:

nfso -o nfs_use_reserved_ports=1

相关补丁:IY81908: TRAILING COLON CAN ALLOW HOSTS UNRESTRICTED ACCESS TO NFS

相关文章
|
2月前
|
Linux
Linux安装NFS挂载NFS卸载客户端服务端都有
Linux安装NFS挂载NFS卸载客户端服务端都有
83 0
|
2月前
|
存储 Kubernetes 应用服务中间件
k8s-配置与存储-持久化存储-NFS 挂载、StorageClass 存储类 动态创建NFS-PV案例
k8s-配置与存储-持久化存储-NFS 挂载、StorageClass 存储类 动态创建NFS-PV案例
339 0
|
2月前
|
Ubuntu 网络协议
开发板挂载 Ubuntu 的 NFS 目录
开发板挂载 Ubuntu 的 NFS 目录
|
2月前
|
Unix Linux Shell
linux 配置NFS
NFS(Network File System)是跨平台的网络文件系统,允许不同操作系统和硬件通过RPC协议共享文件系统。服务端启动RPC服务和NFS,注册端口信息。客户端请求服务器的NFS端口,建立连接进行数据传输。优点包括配置简单、数据可靠、支持多系统间文件共享。缺点包括端口不固定、数据明文传输、安全性较低(基于IP认证)。在Redhat 9环境下,通过安装nfs-utils和rpcbind,配置共享目录和exports文件,设置权限,客户端安装相同软件包,使用showmount命令查看共享,挂载NFS目录,实现透明访问。
72 1
|
2月前
|
Ubuntu 网络协议 Unix
【Linux】新唐NUC977挂载NFS实现网络文件传输
【Linux】新唐NUC977挂载NFS实现网络文件传输
|
2月前
|
Linux Shell Windows
通过Linux挂载Windows端NFS服务实现板端Linux传输文件到PC
通过Linux挂载Windows端NFS服务实现板端Linux传输文件到PC
226 0
|
2月前
|
存储 监控 网络协议
【Linux】文件服务NFS(Network File System)
【Linux】文件服务NFS(Network File System)
140 0
|
2月前
|
存储 Linux 网络安全
Linux系统安装NFS服务器
NFS是一种网络文件系统,英文全称Network File System,通过NFS可以让不同的主机系统之间共享文件或目录。通过NFS,用户可以直接在本地NFS客户端读写NFS服务端上的文件,是非常好的共享存储工具。本篇文章将介绍如何在CentOS7上安装NFS服务器,包括服务端和客户端安装两部分。
95 0
|
2月前
|
Linux 网络安全
Linux NFS协议详解
Linux NFS协议详解
156 5
|
11月前
|
存储 网络协议 Linux
Linux/centos上如何配置管理NFS服务器?
Linux/centos上如何配置管理NFS服务器?
219 0