1748170 Members
3970 Online
108758 Solutions
New Discussion юеВ

Re: upgrading NIS Server

 
SOLVED
Go to solution
itai weisman
Super Advisor

upgrading NIS Server

Hello people,
I'm going to upgrade (change hardware and reinstall) one of our servers, which is the NIS Master Server.
does anyone know any procedure of how doing this upgrade? (saving maps, define a diffrent server as NIS master, importing maps etc...)
couldn't find anything about it...
thanks a lot!
Itai
7 REPLIES 7
Peter Godron
Honored Contributor

Re: upgrading NIS Server

Itai,
depends on your setup (NIS slave servers).
Here some suggestions if you do not have a slave server:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=9373

Otherwise use the slave server as master during the rebuild and then switch back.
Peter Nikitka
Honored Contributor

Re: upgrading NIS Server

Hi,

consider these points:
- if an OS-Upgrade is involved: will the same Makefile (or script) work for map updates?
- backup the input data of your NIS tables and /var/yp
- do you have NIS slaves (running ypserv)?
-- if no:
create one and use this as the new master -> do a complete migration of the NIS master
-- if yes:
copy the master data additionally to one nis slave

Only for 'yes':
If your hostname before and after the upgrade is NOT the same: change the NIS master before upgrading.
If its the same:
Of course, if you do not switch the NIS master, there will be no update possible during the dead time of the NIS master (yppasswdd - related stuff!).

If this wouldn't be a problem AND you estimate the timeframe of your update as not critical: you could do the upgrade of your NIS master without having a running substitute, if you really want.

Nevertheless, I would prefer changing the NIS master before the update.

I did this many years ago on SGI using something like that:

http://techpubs.sgi.com/library/tpl/cgi-bin/getdoc.cgi/srch17@change%20NIS%20master/0650/bks/SGI_Admin/books/NIS_AG/sgi_html/ch05.html#LE54304-PARENT

(Or search for 'change NIS master').

mfG Peter



The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
MarkSyder
Honored Contributor
Solution

Re: upgrading NIS Server

By sheer coincidence I did the same thing a couple of weeks ago - the old NIS server filesystem was 100% full, so drastic action was necessary.

The following instructions assume you have the old server and the new available at the same time. They also assume your NIS directory is called /var/yp/source (as mine is).

1. Transfer the contents of /var/yp/source on the old server to the same directory on the new.

2. Copy /var/yp/Makefile and /usr/sbin/ypinit from the old to the new.

3. vi /etc/rc.config.d/namesvrs on the new master. Set NIS_MASTER_SERVER=1. Set YPPASSWD_OPTIONS="/var/yp/source/passwd -m passwd PWFILE=/var/yp/source/passwd".

4. Edit the same file on the old server set NIS_MASTER_SERVER=0 and YPPASSWD_OPTIONS="/var/yp/source/fakefile -m passwd PWFILE=/var/yp/source/fakefile".

5. Run ypinit -m on the new server.

6. Run /sbin/init.d/nis.server start on the new server.

7. Run /sbin/init.d/nis.server stop on the old server.

8. Log into a random selection of clients and type ypwhich. They should be bound to the new master. As an additional check, try ypwhich -m which should show all the maps as belonging to the new server.

Mark Syder (like the drink but spelt different)

4.
The triumph of evil requires only that good men do nothing
itai weisman
Super Advisor

Re: upgrading NIS Server

Hello and thanks,
Peter - I have slave servers, how can i perform a "switch" between these servers?
how can I make sure the slave retrives maps from the new server?
Itai.

Re: upgrading NIS Server

Hi,

Why don't you take an Ignite backup of the old NIS server and restore it in the new server Hardware. And if still you wanted to go for an OS upgrade, restore the Ignite Image first and then go for OS upgrade.

This would help you to retain all old settings, not only NIS maps.

Use make_tape_recovery or make_recovery / make_net_recovery tools.


Regards,
Sunil
Your imagination is the preview of your life's coming attractions
itai weisman
Super Advisor

Re: upgrading NIS Server

I can't use ignite, I'm upgrading OS version as well.
Peter Nikitka
Honored Contributor

Re: upgrading NIS Server

Hi,

if you want to keep the master (which gets upgraded and keeps its hostname), you only have to make shure, that no client is bound to the master (acting as a slave for this role).

On clients call:
ypwhich
Only if this results in an output of the master hostname:
- kill ypclient, if not started with the option '-ypsetme'
- start ypclient -ypsetme [-other options]
- call 'ypset otherserverhost'
- check via 'ypwhich'

If no clients are left pointing to the master server, you can do the upgrade.

Again, note this:
- backup master data
- no update of maps possible during update, since no master is available
- hostname of master after the upgrade must be the same (since it is included in the maps)

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"