Operating System - HP-UX
1834010 Members
2085 Online
110063 Solutions
New Discussion

NIS and Automount problems

 
Annie_8
Occasional Contributor

NIS and Automount problems

Hello,

I am using HP-UX 11.00 system, and using NIS and Automount for network services. Recently I want to add one direct map to auto.master file on the NIS server. I already have one direct map file "auto.direct". Now I want to add another direct map file "auto.disks'. On the NIS server, I already modified "ypmake", "Makefile", and "ypinit" file to build auto.disks map file. and Run ypmake from NIS server, everything seems works smoothly, and I can get auto.disks file contents from NIS clients when I run "ypcat auto.disks". So I just modified auto_master file on the NIS server like this"

/- auto.direct -hard,rsize=8192,wsize=8192
/- auto.disks -hard,rsize=8192,wsize=8192

and then run "ypmake". But when I run "ypcat auto.direct" no matter from NIS server or NIS clients, there is only one line like this:
auto.direct -hard,rsize=8192,wsize=8192

If I change fiel auto_master file like this:
/- auto.disks -hard,rsize=8192,wsize=8192
/- auto.direct -hard,rsize=8192,wsize=8192

There is only one line like this:
auto.disks -hard,rsize=8192,wsize=8192

I don't know why there is only one line can be available from NIS server. If everyone know this, please give me one reply.

Thanks in advance!
Annie

Annie
3 REPLIES 3
Steve Labar
Valued Contributor

Re: NIS and Automount problems

/- refers to a mount point for the automounter to mount to as a client. You can only mount /- from one source, so it your server is only accepting the first mount point. To add additional exported file systems, you should add a new mounts in the auto_master file or add the new exported directories to your auto.direct.

Good Luck.

Steve
Shannon Petry
Honored Contributor

Re: NIS and Automount problems

I think the problem is with your thinking of the "/-" notation and what it means.



/- means everything that you dont have in an indirect map of. Since it means "everything else", it can not go to another "everything else".

To defeat this, use different locations. I use specifically:
/net /etc/auto.home
/apps /etc/auto.apps
/- /etc/auto.direct

Regards,
Shannon
Microsoft. When do you want a virus today?
S.K. Chan
Honored Contributor

Re: NIS and Automount problems

Apart from Shannon's suggestion you can also include all your direct mounts in a single file. This is how I've seen it done usually (for direct mounts). First your /etc/auto_master file would have something like this ..
/- /etc/auto.direct direct
/net -hosts -soft special
Then you would build your /etc/auto.direct where yout put all the entries of the intended FS mapping. For example ..
/opt/myapps -ro serverA:/opt/apps
/opt/apps -ro serverB:/opt/vendor/apps
Basically only use one direct mount file where it has all the direct map entries in it.