11-18-2012 05:11 AM - last edited on 11-18-2012 07:08 PM by Maiko-I
I'm using HP-UX b.11.11 an try to mount remote files via NFS.
My /etc/exports (host-server) file:
I can only access to the /ssc directory.
When I try to access /tmp it gives "permission denied" message.
#nsquery hosts CLIENT_NAME
and the results are fine. Also the /etc/hosts includes the ip and the correct name.
the mount point directory has 777 permission.
P.S. This thread has been moved from Workstations - Itanium-Based, hp9000, Visualize to HP-UX > networking - HP Forums Moderator
11-18-2012 02:31 PM
The second line in your /etc/exports is not properly formatted to HP-UX 11.11 requirements. It looks more like Linux /etc/exports syntax. This is probably why the line is ignored by HP-UX.
If you want to give read/write access to /tmp to only the hosts in the 8.10.4.xx segment, the proper HP-UX 11.11 syntax would be:
Please read "man 4 exports" for more details.
11-20-2012 03:49 AM
Thank for the reply Matti.
I red man 4 exports and create the correct syntax as you recommended.
Still the mount can be performed.
nfs mount: getaddr_nfs: server1: NFS service not responding(retry delay=5s)
nfs mount: retry: retrying(1) for: /server1 after 5 seconds
nfs mount: retry: giving uo on: /server1
11-20-2012 07:11 AM
can you show us the new file?
- nfs service must run at the 'server' (is it linux ox hp-ux? which nfs version?)
- directory must be exported at the server
11-21-2012 12:29 AM
Any changes to /etc/exports will only take effect after you run "exportfs -a" on the NFS server host or restart the NFS server processes. Did you do this?
The first step of basic NFS connectivity troubleshooting would be running "rpcinfo -p" on the NFS server host, then going to the NFS client host and running "rpcinfo -p <NFS server host name>". Both outputs should be about the same and contain no error messages. This confirms that the rpcbind/portmapper service is working on the NFS server host and accessible from the NFS client host.
As far as I understand, the NFS file locking and reboot recovery protocols rely on hostnames, so it is not enough that the client host can resolve the server's IP address when given its hostname: both the client and the server must also be able to resolve each other's hostnames quickly and reliably when given the IP address only (= reverse lookup).
11-21-2012 01:45 AM
As I mentioned I'm running HP-UX B.11.11
I am export all my entries after editing /etc/exports with # exportfs -a. I even see that on the client side by #showmount -e <nfs server HOST_NAME>
# rcp -p on both sides give no error message. Should I attach the outputs?
Both client and server resolve the IP address quickly when giving the hostname (I used #ping <hostname> for both the client and the server) .
#ps -ef | grep nfs SERVER
/usr/sbin/nfsd (many times)
#ps -ef | grep nfs CLIENT
/usr/sbin/nfsd (many times)
Two more things:
1. Now I can mount nothing via nfs
2. # netstat | grep nfs gives
tcp 0 0 server1.1021 ednop.nfsd ESTABLISHED
status only on both sides.
I can mount to this machine (ednop) as well from my client
11-21-2012 02:28 AM
>Now I can mount nothing via nfs
It seems like /etc/exports was edited wrong.
Please show us the content of the file.
11-21-2012 03:57 AM
Despite showmount -e shows:
Its not working...
This is the commend I use to the mount.
#mount 18.104.22.168:/tmp /server1
Is it concern to the shell I'm working with?
Should I check any config file?
11-21-2012 07:41 AM
Let's establish that you can get basic NFS working before we start playing with syntax. On the 11.11 NFS server use the following lines in /etc/exports:
Then issue the commands:
# exportfs -uav
# exportfs -av
# cat /etc/xtab
The xtab file shows what the kernel thinks is exported/shared for NFS clients to access. Once you verify that all three filesystems are exported with no options, try mounting the /tmp filesystem from one of the clients. If that doesn't work then show a cut/paste of the NFS server from the above commands and a cut/paste of the NFS client showing the failing mount command.
11-22-2012 06:51 AM
The output shows the nfsds are either not running on the NFS server or they are not registered with rpcbind. Try the following commands and post the output:
After the NFS server processes are restarted, see if the earlier rpcinfo command shows entries for the nfsds on the server.
11-27-2012 01:46 PM
If /etc/rc.config.d/nfsconf specifies that the NFS server daemons are supposed to be disabled, running the "/sbin/init.d/nfs.server" script won't do anything at all.
Please attach your nfsconf file.
Also note that the HP-UX startup scripts read /etc/rc.config.d by executing /etc/rc.config, which reads *all* the files in /etc/rc.config.d directory (excluding only a few well-known backup file suffixes). If any of the files contain variables that have the same names as the variables in the nfsconf file, *and* the filename sorts after "nfsconf" in basic US-ASCII alphanumeric sort order, then those variables will override the settings made in the nfsconf file.
Never leave any files like "nfsconf.old" or similar in /etc/rc.config.d. If you must keep the old version as a backup, move it to some other directory.
12-11-2012 11:25 PM
Sorry for the delay.
Please find the attached nfsconf file.
I do not have any backup file that was saved with .old or similar in /etc/rc.config.d.
(In order to attach the file I've changed the its suffix to .txt)