1748180 Members
4074 Online
108759 Solutions
New Discussion юеВ

Re: NFS and NIS issue

 
prav
Occasional Advisor

NFS and NIS issue

Hi All,

I am running nfs and nis server, i have used nis maps and automounter.

Recently one of the client name got changed and I have edited the netgroup file and changed old hostname to newhostname. After making changes i have run "make" command and also in nfs server "exportfs -av"

Issue is from client side the one hostname changed , all nfs mounts are mounting as a read-only even though they are shared as a rw mode to all nis clients.

Other clients are running properly except the client which changed the hostname.

Plz help me in this regard


Details:
NIS Server : HPUX 11.31
NFS server : HPUX 11.31
NIS client : HPUX 11.31

When I run the ypwhich netgroup from client side its reflecting the changes.


Thanking you in advance

Praveen



9 REPLIES 9
Stephan.
Honored Contributor

Re: NFS and NIS issue

Hi Praveen,
did you change the hostname to more then 8 characters?

How does the netgroups/dfstab look like?

Are you using full qualified names in the maps?

Which nfs options do you use for the exports?

How is autofs configured?

What does a 'share' on the NFS server show?

Which version of nfs do you use?

Anything helpful in the logs of the nfs client / server?

Best,
Stephan
prav
Occasional Advisor

Re: NFS and NIS issue


Hey thanks for your response, plz find my answers in line


Hi Praveen,

did you change the hostname to more then 8 characters?

No Its exactly 8 Character

How does the netgroups/dfstab look like?

They are fine, bcoz other clients are working fine.

Are you using full qualified names in the maps?

yes, its FQDN defined

Which nfs options do you use for the exports?

Read Write mode for all shares using sharefs

How is autofs configured?

There are auto maps are configured

What does a 'share' on the NFS server show?
I
ts showing as correct as rw to netgroup clients

Which version of nfs do you use?

NFS Version 4 Protocol (NFSv4)

Anything helpful in the logs of the nfs client / server?

Sorry I din find any clue of logs

Best,
Stephan
Stephan.
Honored Contributor

Re: NFS and NIS issue

Hi again,
let's get out the crystal ball ...

Without any information it is pretty hard to help, i can only wild guess.

Why v4? I had big trouble at a customer which ended up with rolling back to v3 in a similar config (NIS,autofs ) - we had the same behavior (read only clients even if the export was done with read write).

Please post at least the line as example for one export from the dfstab, a share output for the same line.

And last one a 'setoncenv -l' for client and server.

Best,
Stephan
Steven Schweda
Honored Contributor

Re: NFS and NIS issue

> I am running nfs and nis server, [...]

Ok.

> [...] After making changes i have run
> "make" command [...]

Do you mean:
cd /var/yp
make
or something else?

> [...] also in nfs server "exportfs -av"

Was there any output when you did that? My
HP-UX system is down at the moment. Does
"exportfs" actually do anything now?

> They are fine, [...]

It's nice that you think that things are
fine, but some people might like to see the
evidence, rather than your opinion of what it
all means.
prav
Occasional Advisor

Re: NFS and NIS issue

I apologize for not providing complete details that asked. Please find below answers for that asked.


Will explain about the setup in breif

1) NIS server is configured in HP 11.31 IA and it uses nis maps such as auto.user,auto.master,netgroup etc (plz note : this is the only server and there is no slave)
2) NFS server is configured on different server and shared the mount points using netgroup (Which contains list of client names and nis user) map
3) Client side automounter is defined as "+auto.master" in /etc/auto_master

Plz find detail answer



did you change the hostname to more then 8 characters?

No,Its a 8 character length


How does the netgroups/dfstab look like?

netgroups : dev_team (cg1.ex.com,,) (cg2.ex.com,,) [ Plz note cg2 was the hostname cahnged]


dfstab : /usr/sbin/share -F nfs -o rw=dev_team -d "user --> /home" /home1
/usr/sbin/share -F nfs -o rw=dev_team -d "user2 --> /user" /user1


Are you using full qualified names in the maps?

Yes, its FQDN

Which nfs options do you use for the exports?

Read write options to dev_team servers

How is autofs configured?

auto_master nis map file is created and it has entry like below

/user auto.user -intr

and auto.user file has entry like below

pg nfsserver:/home1/&


What does a 'share' on the NFS server show?

/home1 rw=dev_team,ro= "user --> /home"


Which version of nfs do you use?

nfs 4

Anything helpful in the logs of the nfs client / server?

I am not able to find any log message, plz suggest me where i can get the log, I have looked in /var/adm/ log but din get any related message.

Stephen : after editing netgroup file i have done cd /var/yp then run the make command
Stephan.
Honored Contributor

Re: NFS and NIS issue

Hi again,
I'm still waiting for the output of 'setoncenv -l' on nfs client and server.

First Point:
You use the new share command with it's options but doing the export with exportfs - this should work usually due to the fact exportfs is on 11.31 a wrapper script for the share binary, but from my experience the better way is to stick with one of both or you run in trouble.

Second Point:
Please change your dfstab by adding the sec clause - f.e.
/usr/sbin/share -F nfs -o sec=sys,rw=dev_team -d "user --> /home" /home1
and run a '/usr/sbin/shareall'

Please provide the output of 'share' after that and test again.

Best,
Stephan
prav
Occasional Advisor

Re: NFS and NIS issue

Please find below client side o/p

AUTO_MASTER="/etc/auto_master"
AUTOFS=1
AUTOMOUNT_OPTIONS=""
AUTOMOUNTD_OPTIONS="-D ARCH=ia64"
AUTOMOUNT_TIMEOUT not defined
AUTOMOUNT_VERBOSE not defined
AUTOMOUNTD_ENV not defined
AUTOMOUNTD_NOBROWSE not defined
AUTOMOUNTD_TRACE not defined
AUTOMOUNTD_VERBOSE not defined
LOCKD_OPTIONS=""
LOCKMGR=1
STATD_OPTIONS=""
GRACE_PERIOD=90
LOCKD_LISTEN_BACKLOG=32
LOCKD_RETRANSMIT_TIMEOUT=5
LOCKD_SERVERS=20
STATD_PORT not defined
MAX_STATD_THREADS not defined
PERCENT_STATD_THREADS not defined
klm_log_level=0
KEYSERV_OPTIONS=""
ENABLE_NOBODY_KEYS not defined
MAX_NISCHECKS=2
NIS_CLIENT=1
NIS_DOMAIN=dev
NIS_MASTER_SERVER=0
NIS_SLAVE_SERVER=0
SHADOW_MODE=0
YPBIND_OPTIONS="-ypset"
YPPASSWDD_OPTIONS="/etc/passwd -m passwd PWFILE=/etc/passwd"
YPSERV_OPTIONS=""
YPSET_ADDR="nis."
YPUPDATED_OPTIONS=""
YPXFRD_OPTIONS=""
NFS_CLIENT=1
MOUNTD_OPTIONS=""
NFS_SERVER=1
PCNFS_SERVER=0
START_MOUNTD=1
START_NFSLOGD=0
MOUNTD_PORT not defined
MOUNTD_TRACE not defined
MOUNTD_THREADS not defined
NFS_CLIENT_VERSMIN not defined
NFS_CLIENT_VERSMAX not defined
NFS_SERVER_DELEGATION not defined
NFS_SERVER_VERSMIN not defined
NFS_SERVER_VERSMAX not defined
NFSD_DEVICE not defined
NFSD_LISTEN_BACKLOG=32
NFSD_MAX_CONNECTIONS not defined
NFSD_PROTOCOL=ALL
NFSD_SERVERS=16
NFSMAPID_DOMAIN not defined
GSSD_MAXRECSIZE not defined
nfs2_async_clusters=1
nfs2_bsize=8192
nfs2_cots_timeo=600
nfs2_do_symlink_cache=1
nfs2_dynamic=1
nfs2_lookup_neg_cache=1
nfs2_max_threads=8
nfs2_nra=4
nfs2_shrinkreaddir=0
nfs2_srv_read_copyavoid=0
nfs3_async_clusters=1
nfs3_bsize=32768
nfs3_cots_timeo=600
nfs3_do_readdirplus=1
nfs3_do_symlink_cache=1
nfs3_dynamic=0
nfs3_jukebox_delay=1000
nfs3_lookup_neg_cache=1
nfs3_max_threads=8
nfs3_max_transfer_size=1048576
nfs3_max_transfer_size_clts=32768
nfs3_max_transfer_size_cots=1048576
nfs3_nra=4
nfs3_pathconf_disable_cache=0
nfs3_srv_read_copyavoid=0
nfs4_async_clusters=1
nfs4_bsize=32768
nfs4_cots_timeo=600
nfs4_do_symlink_cache=1
nfs4_lookup_neg_cache=1
nfs4_max_threads=8
nfs4_max_transfer_size=1048576
nfs4_max_transfer_size_cots=1048576
nfs4_nra=4
nfs4_pathconf_disable_cache=0
nfs_async_timeout=6000
nfs_disable_rddir_cache=0
nfs_enable_write_behind=0
nfs_exi_cache_time=3600
nfs_nacache=0
nfs_nogpage=1
nfs_nrnode=0
nfs_portmon=0
nfs_write_error_interval=5
nfs_write_error_to_cons_only=0
nfs3_enable_async_directio_read=0
nfs3_enable_async_directio_write=0
nfs3_max_async_directio_requests=8
CYCLE_FREQUENCY not defined
IDLE_TIME not defined
MAX_LOGS_PRESERVE not defined
MIN_PROCESSING_SIZE not defined
UMASK not defined
MAPPING_UPDATE_INTERVAL not defined
PRUNE_TIMEOUT not defined
port not defined
printer not defined
spooldir not defined
uidrange not defined
wtmp not defined
NFS_CORE=1
RPCBIND_OPTIONS=""
COMMAND_START_DAEMON not defined
rpc_clnt_idle_timeout=300000
rpc_clnt_max_conns=1
rpc_clnt_udpresvports=0
rpc_svc_cltsmaxdupreqs=1024
rpc_svc_cotsmaxdupreqs=1024
rpc_svc_default_max_same_xprt=8
rpc_svc_idle_timeout=360000



Server side

AUTO_MASTER="/etc/auto_master"
AUTOFS=1
AUTOMOUNT_OPTIONS=""
AUTOMOUNTD_OPTIONS="-D ARCH=ia64"
AUTOMOUNT_TIMEOUT not defined
AUTOMOUNT_VERBOSE not defined
AUTOMOUNTD_ENV not defined
AUTOMOUNTD_NOBROWSE not defined
AUTOMOUNTD_TRACE not defined
AUTOMOUNTD_VERBOSE not defined
LOCKD_OPTIONS=""
LOCKMGR=1
STATD_OPTIONS=""
GRACE_PERIOD=90
LOCKD_LISTEN_BACKLOG=32
LOCKD_RETRANSMIT_TIMEOUT=5
LOCKD_SERVERS=20
STATD_PORT not defined
MAX_STATD_THREADS not defined
PERCENT_STATD_THREADS not defined
klm_log_level=0
KEYSERV_OPTIONS=""
ENABLE_NOBODY_KEYS not defined
MAX_NISCHECKS=2
NIS_CLIENT=1
NIS_DOMAIN=dev
NIS_MASTER_SERVER=0
NIS_SLAVE_SERVER=0
SHADOW_MODE=0
YPBIND_OPTIONS="-ypset"
YPPASSWDD_OPTIONS="/etc/passwd -m passwd PWFILE=/etc/passwd"
YPSERV_OPTIONS=""
YPSET_ADDR="192.168.0.10"
YPUPDATED_OPTIONS=""
YPXFRD_OPTIONS=""
NFS_CLIENT=1
MOUNTD_OPTIONS=""
NFS_SERVER=1
PCNFS_SERVER=0
START_MOUNTD=1
START_NFSLOGD=0
MOUNTD_PORT not defined
MOUNTD_TRACE not defined
MOUNTD_THREADS not defined
NFS_CLIENT_VERSMIN not defined
NFS_CLIENT_VERSMAX not defined
NFS_SERVER_DELEGATION not defined
NFS_SERVER_VERSMIN not defined
NFS_SERVER_VERSMAX not defined
NFSD_DEVICE not defined
NFSD_LISTEN_BACKLOG=32
NFSD_MAX_CONNECTIONS not defined
NFSD_PROTOCOL=ALL
NFSD_SERVERS=16
NFSMAPID_DOMAIN not defined
GSSD_MAXRECSIZE not defined
nfs2_async_clusters=1
nfs2_bsize=8192
nfs2_cots_timeo=600
nfs2_do_symlink_cache=1
nfs2_dynamic=1
nfs2_lookup_neg_cache=1
nfs2_max_threads=8
nfs2_nra=4
nfs2_shrinkreaddir=0
nfs2_srv_read_copyavoid=0
nfs3_async_clusters=1
nfs3_bsize=32768
nfs3_cots_timeo=600
nfs3_do_readdirplus=1
nfs3_do_symlink_cache=1
nfs3_dynamic=0
nfs3_jukebox_delay=1000
nfs3_lookup_neg_cache=1
nfs3_max_threads=8
nfs3_max_transfer_size=1048576
nfs3_max_transfer_size_clts=32768
nfs3_max_transfer_size_cots=1048576
nfs3_nra=4
nfs3_pathconf_disable_cache=0
nfs3_srv_read_copyavoid=0
nfs4_async_clusters=1
nfs4_bsize=32768
nfs4_cots_timeo=600
nfs4_do_symlink_cache=1
nfs4_lookup_neg_cache=1
nfs4_max_threads=8
nfs4_max_transfer_size=1048576
nfs4_max_transfer_size_cots=1048576
nfs4_nra=4
nfs4_pathconf_disable_cache=0
nfs_async_timeout=6000
nfs_disable_rddir_cache=0
nfs_enable_write_behind=0
nfs_exi_cache_time=3600
nfs_nacache=0
nfs_nogpage=0
nfs_nrnode=0
nfs_portmon=0
nfs_write_error_interval=5
nfs_write_error_to_cons_only=0
CYCLE_FREQUENCY not defined
IDLE_TIME not defined
MAX_LOGS_PRESERVE not defined
MIN_PROCESSING_SIZE not defined
UMASK not defined
MAPPING_UPDATE_INTERVAL not defined
PRUNE_TIMEOUT not defined
port not defined
printer not defined
spooldir not defined
uidrange not defined
wtmp not defined
NFS_CORE=1
RPCBIND_OPTIONS=""
COMMAND_START_DAEMON not defined
rpc_clnt_idle_timeout=300000
rpc_clnt_max_conns=1
rpc_clnt_udpresvports=0
rpc_svc_cltsmaxdupreqs=1024
rpc_svc_cotsmaxdupreqs=1024
rpc_svc_default_max_same_xprt=8
rpc_svc_idle_timeout=360000




/usr/sbin/share -F nfs -o sec=sys,rw=dev_team -d "user --> /home" /home1

After changing

- /home1 sec=sys,rw=dev_team "user --> /home"
Stephan.
Honored Contributor

Re: NFS and NIS issue

Hi Praveen,
i see a lot of variables not configured - any specific reason for that?

NFS_CLIENT_VERSMIN not defined
NFS_CLIENT_VERSMAX not defined

And no mount option for v4, so you leave the decision to the machine which version to use?

NFSMAPID_DOMAIN not defined

This one is pretty important if you run nfs version 4. HP-UX runs through several steps to define it and V4 does not work if client/server has a different value.

Nevertheless it can work, not optimal but it can.

/home1 rw=dev_team,ro= "user --> /home"
After changing
- /home1 sec=sys,rw=dev_team "user --> /home"

So the Read Only access list is gone - does it work now?

Best,
Stephan
prav
Occasional Advisor

Re: NFS and NIS issue

Hi Stephen,

The issue got resolved, it was related DNS

Actually I was mentioned about the hostname changed of the client which was having the issue. Problem was reverse lookup of the IP was resulting to the old hostname and this was causing automounter to mount as a read-only.

I am very gr8 to both of you for helping me

Thanks,
Praveen