cancel
Showing results for 
Search instead for 
Did you mean: 

automounter / NFS

SOLVED
Go to solution
Stephan._1
Trusted Contributor

automounter / NFS

Hi,
long day and it seems i can't find the problem, perhaps someone can shed light on my foggy brain.

HPUX 11.23 Server: ux001

/etc/exports:
============
/usr/sap/trans root=ux001:ux002:lx001
/sapmnt/TST/profile root=lx001
/sapmnt/TST/global root=lx001

showmount -e:
============
/usr/sap/trans root=ux001:ux002:lx001
/sapmnt/TST/profile root=lx001
/sapmnt/TST/global root=lx001


Linux box: lx001

/etc/auto.master
#
# Sample auto.master file
# This is an automounter map and it has the following format
# key [ -mount-options-separated-by-comma ] location
# For details of the format look at autofs(5).
#/misc /etc/auto.misc --timeout=60
#/smb /etc/auto.smb
#/misc /etc/auto.misc
#/net /etc/auto.net
/tsttrans /etc/auto.trans

/etc/auto.trans
===============
trans_TST -o vers=3,proto=tcp,rw,hard,intr,bg,nosuid,timeo=200,retrans=5 ux001:/usr/sap/trans
profile -o vers=3,proto=tcp,rw,hard,intr,bg,nosuid,timeo=200,retrans=5 ux001:/sapmnt/TST/profile
global -o vers=3,proto=tcp,rw,hard,intr,bg,nosuid,timeo=200,retrans=5 ux001:/sapmnt/TST/global

Autofs is running and i already tryed restarting as well as reexporting all on ux001.

Now the Problem, on lx001 (the Linux box)

lx001:/ # cd /tsttrans/trans_TST
lx001:/bwptrans/trans_BWP # df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
ux001:/usr/sap/trans
14680064 10179584 4219264 71% /tsttrans/trans_TST

Nice one, works :-)

Same Procedure

lx001:/ # cd /txttrans/profile
-bash: cd: /txttrans/profile: No such file or directory

lx001:/ # cd /tsttrans/global
-bash: cd: /tsttrans/global: No such file or directory

Trying to mount it manually:

lx001:~ # mount -t nfs ux001:/sapmnt/TST/global /mnt
mount: ux001:/sapmnt/TST/global failed, reason given by server: Permission denied

Any ideas or suggestion?
Share what you know, learn what you don't.
14 REPLIES
Stephan._1
Trusted Contributor

Re: automounter / NFS

>> lx001:/ # cd /tsttrans/trans_TST
>> lx001:/bwptrans/trans_BWP # df -k .
>> Filesystem 1K-blocks Used Available Use% Mounted on
>> ux001:/usr/sap/trans
14680064 10179584 4219264 71% /tsttrans/trans_TST

This should be read as:

lx001:/ # cd /tsttrans/trans_TST
lx001:/tsttrans/trans_TST # df -k .
Filesystem 1K-blocks Used Available Use% Mounted on
ux001:/usr/sap/trans
14680064 10179584 4219264 71% /tsttrans/trans_TST

Just to confuse everybody :-x
Share what you know, learn what you don't.
Hakki Aydin Ucar
Honored Contributor

Re: automounter / NFS

I assume hp-ux is nfs server, am I right ?
if yes, just a suggestion ,did you try this:

/etc/exports:
============
/usr/sap/trans
/sapmnt/TST/profile
/sapmnt/TST/global
Stephan._1
Trusted Contributor

Re: automounter / NFS

>> I assume hp-ux is nfs server, am I right ?

Yes, you are right.

Now the strange part - it works with

/etc/exports:
============
/usr/sap/trans root=ux001:ux002:lx001
/sapmnt/TST/profile
/sapmnt/TST/global

Now the big question - why?

From the man page:

root=hostname[:hostname]...
Give root access only to the root users from a specified hostname. The default is for no hosts to be granted root access.

Now i have 1 export working with the root option and 2 only working without it.

I have no idea where or what to look for.



Share what you know, learn what you don't.
Hakki Aydin Ucar
Honored Contributor

Re: automounter / NFS

The only thing I am sure that if you take that options out you have an export config that to all systems with read/write access.
Stephan._1
Trusted Contributor

Re: automounter / NFS

That's the reason why i don't want it :-p

Anyone else has an idea why it works only partially?
Share what you know, learn what you don't.
Dave Olker
HPE Pro

Re: automounter / NFS

You can try enabling debug rpc.mountd logging on the 11.23 system:

# ps -e | grep rpc.mountd
2073 ? 0:00 rpc.mountd
# kill -17 2073
# ll /var/adm/mountd.log
-rw-r--r-- 1 root root 66689 Sep 23 15:31 /var/adm/mountd.log

Once debug logging is enabled try the working and failing mounts again and then turn off debug logging by sending the same PID another kill -17. The /var/adm/mountd.log file will hopefully give some clues as to why the server is granting one mount request and failing the others.

Regards,

Dave
Stephan._1
Trusted Contributor

Re: automounter / NFS

Hi Dave,
thanks for the suggestion - first try i found entries pointing to different hostnames, due to this fact i changed the exports to the following:

/etc/exports
============
/SMART/TST -anon=65534,root=ux003:ux004,access=ux003:ux004 <-- works, nothing todo with the problem
/usr/sap/trans root=ux001:ux002:lx001 <-- works as expected
/sapmnt/TST/profile root=lx001.mydomain.com <-- does not work
/sapmnt/TST/global root=lx001 <-- does not work

Attached is the debug from that configuration trying to switch in all 3 directories, if you could be so kind and have a look at it - i don't find something self-explanatory.

After that i tryed using the working options:

/etc/exports
============
/SMART/TST -anon=65534,root=ux003:ux004,access=ux003:ux004 <-- works, nothing todo with the problem
/usr/sap/trans root=ux001:ux002:lx001 <-- works as expected
/sapmnt/TST/profile root=ux001:ux002:lx001 <-- works
/sapmnt/TST/global root=ux001:ux002:lx001 <-- works <-- does not work

To be honest, i don't get it ...

Any help appreciated.
Share what you know, learn what you don't.
Stephan._1
Trusted Contributor

Re: automounter / NFS

Attachment didn't work so please check:

http://hpux.de/tmp/mountd.log
Share what you know, learn what you don't.
Hakki Aydin Ucar
Honored Contributor

Re: automounter / NFS

your problem is weird, maybe you 'd better check patch db for an privilege enhancement ,for example this patch PHCO_32523

http://www.itrc.hp.com/service/patch/mainPage.do
Dave Olker
HPE Pro
Solution

Re: automounter / NFS

Looking at the logfile data:

09.24 06:16:53 ux001 pid=5868 rpc.mountd
rpc.mountd: compare_hostnames_hp: sourcehost = 'root=lx001.mydomain.com'
09.24 06:16:53 ux001 pid=5868 rpc.mountd
rpc.mountd: compare_hostnames_hp: targethost = 'lx001.mydomain.com'
09.24 06:16:53 ux001 pid=5868 rpc.mountd
rpc.mountd: compare_hostnames_hp: return that names differ (no ambiguity)

rpc.mountd believes the system name in question is "root=lx001.mydomain.com" instead of "lx001.mydomain.com". It is not parsing the root= list properly because there is no separating "-" character.

I think the problem is you're missing a "-" before the "root=" list. In other words, the export line currently looks like this:

/sapmnt/TST/global root=ux001:ux002:lx001

and it should look like this:

/sapmnt/TST/global -root=us001:ux002:lx001

Try making sure all the option lists begin with a "-" and see if that solve this.

Regards,

Dave
Stephan._1
Trusted Contributor

Re: automounter / NFS

>> your problem is weird, maybe you 'd better check patch db for an privilege enhancement ,for example this patch PHCO_32523

I did not check the system, but it's a productive machine with a fixed patch set and if we are lucky the customer give us a downtime once a year ...


>> Try making sure all the option lists begin with a "-" and see if that solve this.

Gotcha! You're a genius ... that solved it 100% - many thanks, that's one more beer i have to pay if we meet again, send Doug regards from me.
Share what you know, learn what you don't.
Stephan._1
Trusted Contributor

Re: automounter / NFS

Problem solved by a missing - as option seperator.

Thanks to all!
Share what you know, learn what you don't.
Dave Olker
HPE Pro

Re: automounter / NFS

My apologies, but I cannot remember who you are based on your screen name "svo". I'll never turn down a free beer, but I'm just curious who's paying? :)

I'll also be happy to pass along your regards to Doug but I'd like to let him know who they're from.

Cheers!

Dave
Stephan._1
Trusted Contributor

Re: automounter / NFS

Hint:
Check denic.de who owns hpux.de ;-)
Share what you know, learn what you don't.