NIS master migration.

midguy used Ask the Experts™

I got a task to migrate NIS master from ultra 5 to ultra 10 machine in same network, which both are running on solaris 7. Please explain in detail steps.
Thanks in advance.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Copy the ascii-files in /etc which are the base for nis-maps.

If you dont know which files, check the /var/nis/Makefile.
In the beginning of that file you have a target all and here are the files listed.
Looks loke this:

all:  passwd,hosts, .. .. .. .

When all the ascifiles are in place, set the same domainname as on the ultra 5.
# domainname
# domainname > /etc/defaultdomain

# ypinit -m
it will ask you about other servers ( slaveservers ) some errors might show up from mailaliases, dont worry about it.

# /usr/lib/netsvc/yp/ypstart
and ypserv and ypbind will start.
Go to /var/yp and run
# /usr/ccs/bin/make
this will make your maps once again and take care of the mailaliases problem.

Unfortunatley you also have to reconfigure your clients with
# /usr/lib/netsvc/yp/ypstop
# ypinit -c    and give the new systems name. Also remember to put the ultra 10:s name and ipaddr. in /etc/inet hosts on the client.

The start ypbind again with
# /usr/lib/netsvc/yp/ypstart

Go to the ultra 5, do an
# /usr/lib/netsvc/yp/ypstop
# cd /var/yp
# rmr -rf
# rm *.time

and if its going to be a client,
run ypinit -c    as on the other clients.




Thanks for info, but I want use the same hostname and IP of old nis master on new nis master, so that I don't need to restart the clients, and I want shutdown the old ultra 5 master server.
OK, just skip the clientpart.

Be sure to turn of the Ultra 5 so you dont get conflicting IPadresses.

It might take a while for clients to find the new server if you dont flush the arp cache.
For every ipadress you connect to that systems MACaddress is put in the arpcache for 5 minutes and then they are cleared.

So it could take a while or use
arp -d ipaddress  on the client if you dont can wait.



Thanks Besky
It is useful for me.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial