mknfsexp -d /tmp/test -t ro
exportfs -va
show mount -e
[
root@host1]:/# exportfs -av
exports: 1831-187 re-exported /tmp/test
mknfs -B
Step by step on NFS Client ( AIX 7.1 node)
[root@host2]:/# ping host1
PING host1: (10.4.12.111): 56 data bytes
64 bytes from 10.4.12.111: icmp_seq=0 ttl=255 time=0 ms
64 bytes from 10.4.12.111: icmp_seq=1 ttl=255 time=0 ms
64 bytes from 10.4.12.111: icmp_seq=2 ttl=255 time=0 ms
64 bytes from 10.4.12.111: icmp_seq=3 ttl=255 time=0 ms
--- host1 ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0/0/0 ms[root@host2]:/# showmount -e host1
export list for host1:
/tmp/test (everyone)
[root@host2]:/# mount host1:tmp/test /test
nfsmnthelp: 1831-019 host1: System call error number -1.
mount: 1831-008 giving up on:
host1:/tmp/test
System call error number -1.
i try and with ip address but some error
where wrong ?
sorry for my mistake english
---------- Post updated at 05:44 PM ---------- Previous update was at 04:11 PM ----------
Ops, i fix my problem
add cross ip and hostname between nodes /etc/hosts
a) AIX, to boot (quickly) needs to have two IP addresses in /etc/hosts
127.0.0.1 loopback localhost
A.B.C.D hostname
b) for the AIX NFS server both server and client must agree on the name and IP address used by the client to connect (mount) on the server. There was a time that when the client used a shortname and the server a "longname" the mount would fail (I hope the shortname check is enough these days)
In short, when NFS mounts are taking a long time verify the IP address used to connect (especially from multi-homed clients). Back in telnet days I would just telnet in to the server and then use the who command to see what IP address/hostname the server reported. If it was an IP address I knew I needed to do something because the hostname - short or long - was not resolving. It might also be what I considered the alias - again, if not the name the client was announcing - the AIX server will refuse the mount.
On AIX can you not enable search in /etc/resolv.conf (or equivalent), declaring search files first and then add any short names plus the IP's you need to get something to connect?
The two common ways for modfying search order is to use either the environment NSORDER or an entry in /etc/netsvc.conf.
e.g., I usually set hosts=local4,bind4
in /etc/netsvc.conf
the 4 specifies to only check for IP4 addresses resolution, a 6 would search only IP6, and no number searches IP4 then IP6 space.
If nothing is set, the default is equivalent to hosts=bind,nis,local (or maybe it is nis,bind,local I have not even tried to use nis in 15 to 20 years - so I forget ;-| )
Having bind first - when a default is defined, but network is not working - can slow a reboot a long time. Setting the timeout and retry in either /etc/environment via environment variables, or in /etc/resolv.conf - can shorten this drastically.
While I have never used it myself - I expect that any bind/dns setting you can use on a POSIX system, such as Solaris - should work in the same way on AIX.