Re: NFS export files (603 Views)
Reply
Super Advisor
Yaroki
Posts: 203
Registered: ‎06-30-2011
Message 1 of 19 (749 Views)

NFS export files

[ Edited ]

Hello,

I'm using HP-UX b.11.11 an try to mount remote files via NFS.

 

My /etc/exports (host-server) file:

 

/ssc      -anon=65534

/tmp     8.10.4.77/24(rw)

 

I can only access to the /ssc directory.

When I try to access /tmp it gives "permission denied" message.

 

I ran

#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.

Please advice.

 

Yali

 

 

P.S. This thread has been moved from Workstations - Itanium-Based, hp9000, Visualize to HP-UX > networking - HP Forums Moderator

Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 2 of 19 (740 Views)

Re: NFS export files

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:

/tmp -access=@8.10.4.0/24

 

Please read "man 4 exports" for more details.

MK
Super Advisor
Yaroki
Posts: 203
Registered: ‎06-30-2011
Message 3 of 19 (719 Views)

Re: NFS export files

Thank for the reply Matti.

 

I red man 4 exports and create the correct syntax as you recommended.

Still the mount can be performed.

 

Messages received:

 

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

 

BR,

Yali

Honored Contributor
V. Nyga
Posts: 4,874
Registered: ‎09-20-2002
Message 4 of 19 (712 Views)

Re: NFS export files

Hi,

can you show us the new file?

Also:
- nfs service must run at the 'server' (is it linux ox hp-ux? which nfs version?)
- directory must be exported at the server

V.
*** Say 'Thanks' with Kudos ***
Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 5 of 19 (703 Views)

Re: NFS export files

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).

MK
Super Advisor
Yaroki
Posts: 203
Registered: ‎06-30-2011
Message 6 of 19 (699 Views)

Re: NFS export files

Hello,

 

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

gives

/usr/sbin/nfsd (many times)

nfsktcp

nfskd

#ps -ef | grep nfs CLIENT

gives

/usr/sbin/nfsd (many times)

nfskd

 

 

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

 

Yali

Honored Contributor
V. Nyga
Posts: 4,874
Registered: ‎09-20-2002
Message 7 of 19 (695 Views)

Re: NFS export files

>I am export all my entries after editing /etc/exports
>Now I can mount nothing via nfs
It seems like /etc/exports was edited wrong.
Please show us the content of the file.

V.
*** Say 'Thanks' with Kudos ***
Super Advisor
Yaroki
Posts: 203
Registered: ‎06-30-2011
Message 8 of 19 (692 Views)

Re: NFS export files

Please find the exports content file:

 

/scc -anon=65534
/tmp -access=@8.12.4.0/24
/var -anon=@8.12.4.0/24
/

Super Advisor
Yaroki
Posts: 203
Registered: ‎06-30-2011
Message 9 of 19 (691 Views)

Re: NFS export files

And of course many thanks :)

Honored Contributor
V. Nyga
Posts: 4,874
Registered: ‎09-20-2002
Message 10 of 19 (687 Views)

Re: NFS export files

I would suggest to test this content first:

/scc -anon=65534
/tmp -anon=65534
/var -anon=65534
*** Say 'Thanks' with Kudos ***
Super Advisor
Yaroki
Posts: 203
Registered: ‎06-30-2011
Message 11 of 19 (685 Views)

Re: NFS export files

 

Despite showmount -e shows:

/var (everyone)

/scc (everyone)

/tmp (everyone)

 

Its  not working... 

 

 

This is the commend I use to the mount.

#mount 8.12.4.135:/tmp /server1

 

Is it concern to the shell I'm working with?

Should I check any config file?

 

Yali

HP Pro
Dave Olker
Posts: 1,432
Registered: ‎10-10-2002
Message 12 of 19 (677 Views)

Re: NFS export files

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:

 

/var

/tmp

/scc

 

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.

 

Dave

Super Advisor
Yaroki
Posts: 203
Registered: ‎06-30-2011
Message 13 of 19 (672 Views)

Re: NFS export files

Please find the attached files

HP Pro
Dave Olker
Posts: 1,432
Registered: ‎10-10-2002
Message 14 of 19 (658 Views)

Re: NFS export files

Log into the client system and issue the command:

rpcinfo -p 8.12.4.135

Post the results.
Super Advisor
Yaroki
Posts: 203
Registered: ‎06-30-2011
Message 15 of 19 (654 Views)

Re: NFS export files

Please find the attached the output file. 

HP Pro
Dave Olker
Posts: 1,432
Registered: ‎10-10-2002
Message 16 of 19 (647 Views)

Re: NFS export files

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:

 

/sbin/init,d/nfs.server stop

/sbin/init.d/nfs.server start

 

After the NFS server processes are restarted, see if the earlier rpcinfo command shows entries for the nfsds on the server.

Super Advisor
Yaroki
Posts: 203
Registered: ‎06-30-2011
Message 17 of 19 (630 Views)

Re: NFS export files

Unfortunately, restarting the service didn't help.

 

What's next?

Honored Contributor
Matti_Kurkela
Posts: 6,271
Registered: ‎12-02-2001
Message 18 of 19 (621 Views)

Re: NFS export files

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.

 

MK
Super Advisor
Yaroki
Posts: 203
Registered: ‎06-30-2011
Message 19 of 19 (603 Views)

Re: NFS export files

Hello,

 

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)

 

Thanks,

 

Yali

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.