SUMMARY: NIS+ custom automount table? (Delayed)

From: Marc Gibian (gibian@typhoon.hanscom.af.mil)
Date: Fri Jan 26 1996 - 09:32:03 CST


Quite a while back I posted this question about adding my own
automount tables with NIS+. The original question contained two basic
elements:

1. How do I create a custom automount table in NIS+?

nistbladm -c automount_table key=S value= auto_disks.org_dir.YOURDOMAIN.

nispopulate -F -p /etc auto_disks
nispopulate -F -p /etc auto_master

2. Can I setup an indirect map at / (root)?

This is something that should not be attempted and was actually a flaw
in how the SunOS environment I inherited operated. I have followed the
recommendations I recieved and moved things to host name independent
subdirectories that ARE appropriate indirect map targets.

I am sorry about the delay in this summary, but project emergencies
and priority changes caused my use of the replies to my original email
to be delayed until rather recently.

Marc S. Gibian
Telos Consulting Services phone: (617) 377-6350
PRISM/TFS email: gibian@stars1.hanscom.af.mil

------------------------ original post -------------------------------
I am setting up a Solaris 2.5 server in preperation for migration of
my development team when they are ready (and presumably when the
release version of 2.5 hits the streets). I have a lot running as I
wish already, including the basic NIS+ environment.

I am now venturing into the NFS automounter and have a problem I can't
find an answer to in the answerbook or other forums:

I want to use an indirect map to automount workstation disks at the
root. My auto_master entry is:

/ auto_disks <options>

and the contents of the auto_disks table will be:

foobar machine:/foobar

The main question here is: How do I add and populate an auto_disks map
in NIS+ so that it works as intended with automounting?
----------------------------------------------------------------------
>From gfaus@osi.com Wed Nov 15 12:24:36 1995
Date: Wed, 15 Nov 1995 09:22:50 +0800
From: gfaus@osi.com (Glenn Faus)
To: gibian@typhoon.HANSCOM.AF.MIL
Subject: Re: NIS+ custom automount table?
X-Sun-Charset: US-ASCII
Content-Length: 1226
X-Display-Position: 0

You have to do a nischown change on the map so that it is available.
----------------------------------------------------------------------
>From hkatz@panix.com Wed Nov 15 14:01:30 1995
Date: Wed, 15 Nov 1995 14:03:34 -0500 (EST)
From: Henry Katz <hkatz@panix.com>
To: Marc Gibian <gibian@typhoon.HANSCOM.AF.MIL>
Subject: Re: NIS+ custom automount table?
In-Reply-To: <9511141713.AA10815@typhoon.forecast>
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
Content-Length: 1562
X-Display-Position: 0

On Tue, 14 Nov 1995, Marc Gibian wrote:

>
> I want to use an indirect map to automount workstation disks at the
> root. My auto_master entry is:
>
> / auto_disks <options>
Marc,

your auto_master entry indicates that your automounts wish to overlay
the root file system. you realize of course that as soon as you do this
bye, bye. what you probably meant to say was
/something auto_disks <options>
>
> and the contents of the auto_disks table will be:
>
> foobar machine:/foobar
>
> The main question here is: How do I add and populate an auto_disks map
> in NIS+ so that it works as intended with automounting?
Ok - peek into the /usr/lib/nis/nissetup script at the table creation
section and first create your own table in similar fashion to that of the
script then use nistbladm to populate it. Ideally you will want some
sort of wrapper to conceal this.

Good luck,
Henry

----------------------------------------------------------------
Henry Katz, M.S. | Email: hkatz@lehman.com (d)
ISCS, Inc. | hkatz@panix.com (e)
(718) 263.5762 | currently on contract at:
                                  |
Wang Software, Inc | Phone: (212) 476-6464
622 Third Ave 5th floor | Fax: (212) 476-6915
New York, NY 10016 | Pager: (917) 899-1420
----------------------------------------------------------------
      "The hereafter for all we know may be an eternal state of
        excruciating insanity" - V. I. Nabokov, Look at the Harlequins
----------------------------------------------------------------------
>From uucp@hustle.rahul.net Wed Nov 15 15:37:00 1995
Date: Wed, 15 Nov 1995 16:14:41 -0400
From: Roger Salisbury <rogers@ttmc.com>
To: gibian@typhoon.HANSCOM.AF.MIL
Subject: Re: NIS+ custom automount table?
X-Sun-Charset: US-ASCII
Content-Length: 163
X-Display-Position: 0

nistbladm -c automount_table key=S value= auto_disks.org_dir.YOURDOMAIN.

nispopulate -F -p /etc auto_disks
nispopulate -F -p /etc auto_master

niscat auto_disks

----------------------------------------------------------------------
>From holzmann@cs.uleth.ca Wed Nov 15 17:43:24 1995
Date: Wed, 15 Nov 1995 15:44:50 -0700
From: holzmann@cs.uleth.ca (Wolf Holzmann)
To: gibian@typhoon.HANSCOM.AF.MIL
Subject: Re: NIS+ custom automount table?
X-Sun-Charset: US-ASCII
Content-Length: 2408
X-Display-Position: 1308

It sounds like the auto_disks map you want to generate will change over time.
I use a data file to populate and to repopulate such maps because
it is more flexible.
Also I put such maps in a separate NIS+ directory (auto_dir say),
although for a single map you might save yourself the effort.

#### NIS+ automounter setup

# your domain name and the map name
export DOMAIN=nis.domain.
export MAP=disks

#### Once *only*:
nismkdir auto_dir.$DOMAIN
 
#### For each new indirect map:

## To see example of the type of table you are trying to generate:
niscat -o auto_home.org_dir

## Generate auto_$MAP.auto_dir
nistbladm -c automount_map key=S value=S auto_$MAP.auto_dir.$DOMAIN

## edit file auto_$MAP.data to contain desired entries; for example
# foobar machine:/foobar
# foobar2 machine2:/foobar2
# * defaultmachine:/&
vi auto_$MAP.data

## Populate or repopulate table.
## Empty table and then add entries to table.
## Don't use -m if you just want to append entries.
nisaddent -m -f auto_$MAP.data -t auto_$MAP.auto_dir key-value

## Change auto_master map if necessary.
nistbladm -a key=/ value="auto_$MAP.auto_dir <options>" auto_master.org_dir

# For each machine on net, take new automount maps
automount
----------------------------------------------------------------------
>From dme9246@eeidf002.ca.boeing.com Wed Nov 15 19:39:54 1995
Date: Wed, 15 Nov 1995 16:35:02 -0800
From: dme9246@eeidf002.ca.boeing.com (Dave Estlick 865-5320)
To: gibian@typhoon.HANSCOM.AF.MIL
Subject: Re: NIS+ custom automount table?
X-Sun-Charset: US-ASCII
Content-Length: 1511
X-Display-Position: 0

> The main question here is: How do I add and populate an auto_disks map
> in NIS+ so that it works as intended with automounting?

This will add and populate your table but requires you perform each step
separately. First you must create the definition for the table object by:

nistbladm -c automount_map key=S value= auto_disks.org_dir.<domainname>

where automount_map is the default table type for automount maps and
specifing the attributes on the two standard columns (do a niscat -o
on either auto_master or auto_home).

You can add the entry object by:

nistbladm -a key=/ value=machine:/foobar auto_disks.org_dir.<domainname>

Good Luck!

       _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/ _/ _/_/_/
      _/ _/ _/ _/ _/ _/ _/_/ _/ _/
     _/_/_/ _/ _/ _/_/_/ _/ _/ _/ _/ _/ _/_/
    _/ _/ _/ _/ _/ _/ _/ _/_/ _/ _/
   _/_/_/ _/_/_/ _/_/_/ _/_/_/ _/ _/ _/_/_/

_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]
_] Dave Estlick _]
_] Systems Development/Administration - E/E Wiring Systems _]
_] Boeing Computer Services (BCS) _]
_] P.O. Box 24346 MS 7W-43 _]
_] Seattle WA 98124-0346 _] Internet: _]
_] Tel: (206) 865-5320 _] dme9246@eeidf002.ca.boeing.com _]
_] FAX: (206) 865-5945 _] ( 130.42.115.12 ) _]
_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]_]

----------------------------------------------------------------------
>From fstaes@innet.be Thu Nov 16 03:29:45 1995
Sender: frans@innet.be
Date: Thu, 16 Nov 1995 09:28:18 +0100
From: Francois Staes <fstaes@innet.be>
X-Mailer: Mozilla 2.0b1J (X11; I; SunOS 5.4 sun4m)
Mime-Version: 1.0
To: Marc Gibian <gibian@typhoon.HANSCOM.AF.MIL>
Subject: Re: NIS+ custom automount table?
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Length: 253
X-Display-Position: 0

I hope they fixed the problem in 2.5, because what you ask for
is not possible in 2.4. Don't know yet about 2.5...

-- 
Francois Staes
UNIX Consultant
Eigen Heerdstraat 76
B - 2170 Merksem - Antwerpen
Belgium

Phone: +32/3/6454226 Email: fstaes@innet.be

---------------------------------------------------------------------- >From grm@star.le.ac.uk Thu Nov 16 03:50:30 1995 Date: Thu, 16 Nov 1995 08:51:44 +0000 (GMT) From: Geoff Mellor <grm@star.le.ac.uk> X-Sender: grm@ltsun1 To: Marc Gibian <gibian@typhoon.HANSCOM.AF.MIL> Subject: Re: NIS+ custom automount table? In-Reply-To: <9511141713.AA10815@typhoon.forecast> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Content-Length: 2289 X-Display-Position: 0

To add a NIS+ automount map, type the following:

nistbladm -c automount_map key=S value=I auto_disks.org_dir.nis+.domain.name.

This assumes /usr/lib/nis is in your path and you will change nis+.domain.name. for your appropriate values.

I find that the easiest way to add values to such maps is to keep a disk copy of your automount table similar to below:

######################################################################### # # auto_home database # # This is the master database from which we populate the NIS+ table # using the command # # nisaddent -m -f /etc/auto_home -t auto_home.org_dir key-value # # File last modified 26/10/95 grm # ######################################################################### # # sun home directories # ltsun0 ltsun0:/export/home darc darc:/export/home

I just add new entries into the file when I need them and then execute the nisaddent command in the header with a cut and paste operation and my table is updated.

Hope this helps

Geoff Mellor

--------------------------------------------------------------------------- Geoff Mellor Internet: grm@star.le.ac.uk Systems Administrator Phone : +44 (0)116 252 3599 Dept of Physics and Astronomy Fax : +44 (0)116 252 3311 University of Leicester

---------------------------------------------------------------------- >From tkld@cogsci.ed.ac.uk Thu Nov 16 04:57:23 1995 Date: Thu, 16 Nov 1995 09:59:34 GMT To: Marc Gibian <gibian@typhoon.HANSCOM.AF.MIL> In-Reply-To: <9511141713.AA10815@typhoon.forecast> (message from Marc Gibian on Tue, 14 Nov 95 12:13:53 EST) Subject: Re: NIS+ custom automount table? From: Kevin Davidson <tkld@cogsci.ed.ac.uk> X-Mailer: Emacs 19.29.2 X-Subliminal-Message: We know where you live. X-Attribution: tkld X-Face: IK=!I,S[:^|Bug1}@a9VnvjDO"GNt$]}]ea~={AD:+[wb*"i\iVO)=3bq1T~h}M+o[Gg%:F W_nxe>e{k"KwVasaBy"+rL^'?UugT`|I[jr.E3(b`s$Ge|@Xv*LX=Gc<)h`36*j&noJ"~iB"8i/:K' F#5'!i[SGv.Czm4?R')?B7'qiJVyCQv0LMA<Gx{`z4es%j8S/Vc Content-Length: 2563 X-Display-Position: 0

Oh dear! This turns / into an auto mount point. You've just said goodbye to whatever was in / before (ie /etc /usr /var ...) :-(

What you're looking for is a *direct* map.

gibian> and the contents of the auto_disks table will be:

gibian> foobar machine:/foobar

Set up the maps like this instead:

auto_master:

/home auto_home /net -hosts /- auto_direct

auto_direct:

/foobar machine:/export/foobar /burfls machine:/export/burfle

Be very careful if the UFS mount point (export point) and NFS mount point have the same name. On the machine that hosts the UFS filesystem the automounter will go into an infinite loop unless you set up -null maps in the local /etc/auto_direct file. I would recommend mounting all your disks under /export and letting the automounter do a loopback mount for the machine that has the filesystem local. You don't need to do anything special for this.

gibian> The main question here is: How do I add and populate an auto_disks map gibian> in NIS+ so that it works as intended with automounting?

Create the map with:

nistbladm -D access=go=rcmd,nw=r -c automount_map key=S,nogw= value=,nogw= auto_direct.org_dir.`nisdefaults -d` nischgrp admin auto_direct.org_dir

Add it to auto_master:

nistbladm -a key=/- value=auto_direct auto_master.org_dir

Populate with nistbladm:

nistbladm -a key=/foobar value=machine:/export/foobar auto_direct.org_dir

Every time you add an entry to a direct map, you must rerun automount on all the clients or the new mount point will not be seen. This does not apply to indirect maps.

-- |Kevin.Davidson@edinburgh.ac.uk +-+ Centre for Cognitive Science/HCRC, | |tkld@cogsci.ed.ac.uk | | University of Edinburgh, | |+44 (0)131 650 6879 .oOo. | | 2 Buccleuch Place, EH8 9LW. .oOo. | `-------------------------------' `-------------------------------------------'

----------------------------------------------------------------------



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:10:52 CDT