[comp.sys.sun] Moving YP master to new SERVER

dsf@ihlpm.att.com (Dale Stuart Finkey) (01/12/91)

I have a SUN 3/280 (sunos 4.0.3) serving as our YP master, another 3/460
(sunos4.0.3) serving as a YP slave and a new 4/470 (sunos 4.1) being added
to this YP (NIS) domain as a YP master.

I have looked at all the SUN YP documentation and cannot figure out how to
switch the 3/280 to a YP slave and make the 4/470 the YP master.

I am willing to lose YP services or boot any or all of these servers to
get the job done.  Can anyone help with this?  Please email or post a
reply to this newsgroup.

Dale Finkey
att!ihlpm!dsf

mike@relgyro.stanford.edu (Mike Macgirvin) (01/16/91)

dsf@ihlpm.att.com (Dale Stuart Finkey) writes:

>I have looked at all the SUN YP documentation and cannot figure out how to
>switch the 3/280 to a YP slave and make the 4/470 the YP master.

There are important pieces of the procedure in the Systems and Network
Admin docs, but it isn't exactly straightforward.

1. On the NEW server, collect all the necessary files and run "ypinit -m".

2. On the OLD server, run ypxfr and get all of the files from the NEW
   server (or ftp /var/yp/{domain}/* if you think it's faster).

3. Go back to the NEW server and touch all the files and run make from
   /var/yp, or just yppush everything.

The key to all of this is that the master server's name gets put in all of
the maps. You need to build the maps with the new name, and then get them
out to all of the slave servers. If you have more than one slave, then you
can use yppush to help you, once you've gotten the new files to the old
server. If you do the "ypinit" procedure "by hand", remember to recreate
the ypservers map with the new server as the first entry.

mike (Mike Macgirvin)	mtm@CAMIS.Stanford.EDU
Systems Administrator	SUMEX-AIM computer facility