1822497 Members
2574 Online
109642 Solutions
New Discussion

NFS export files

 
Yaroki
Super Advisor

NFS export files

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

18 REPLIES 18
Matti_Kurkela
Honored Contributor

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
Yaroki
Super Advisor

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

V. Nyga
Honored Contributor

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 ***
Matti_Kurkela
Honored Contributor

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
Yaroki
Super Advisor

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

V. Nyga
Honored Contributor

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 ***
Yaroki
Super Advisor

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
/

Yaroki
Super Advisor

Re: NFS export files

And of course many thanks :)

V. Nyga
Honored Contributor

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 ***
Yaroki
Super Advisor

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

Dave Olker
Neighborhood Moderator

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



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Yaroki
Super Advisor

Re: NFS export files

Please find the attached files

Dave Olker
Neighborhood Moderator

Re: NFS export files

Log into the client system and issue the command:

rpcinfo -p 8.12.4.135

Post the results.


I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Yaroki
Super Advisor

Re: NFS export files

Please find the attached the output file. 

Dave Olker
Neighborhood Moderator

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.



I work at HPE
HPE Support Center offers support for your HPE services and products when and how you need it. Get started with HPE Support Center today.
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
Accept or Kudo
Yaroki
Super Advisor

Re: NFS export files

Unfortunately, restarting the service didn't help.

 

What's next?

Matti_Kurkela
Honored Contributor

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
Yaroki
Super Advisor

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