Move NIS+ Root Master + Solaris 2.4->2.5.1 Upgrade ?

Move NIS+ Root Master + Solaris 2.4->2.5.1 Upgrade ?

Post by Mario Klebs » Fri, 14 Feb 1997 04:00:00




>Greetings all!
>I am in the process of doing some major network upgrades (Solaris 2.4 to
>2.5.1 on all servers), and I'd ideally like to move my NIS+ root
>master server (currently 2.4) to a new machine that will be running 2.5.1.
>Has anyone been able to do this successfully?  Even if you haven't been
>successful, what are some of the "gotchas" that you have run into???

The transition sould be possible, but it will take some time.

1. Make the new NIS+ root master a client of the old NIS+ root master.

2. Make the new NIS+ root master a NIS+ replica, using
   nismkdir -s newmaster on all directories..

2a. Wait at least 12 hours and make sure, the changes have propagated
    to the NIS_COLDSTART file on every client.

3. Make the new NIS+ root master the NIS+ master server for using
   nismkdir -m newmaster onm all directories.

3a. Again wait at least 12 hours till the changes have propagated to
    all clients. I am not sure, what will happen to modify requests,
    sind to the old master during this time. In doubt don't change
    anything during this time.

4. Remove the NIS+ directories from the old root master using
   nisrmdir -s oldmaster.

4a. Once again 12 more houres until the changes have propagated.

5. Now you can remove the old master from the network and use it for
   any purpose, you like.

Remember to always make a backup of /var/nis on the master server
(backing in up on the replicas, too is no miskate), before doing
experiments like this. It is also a good idea to create ASCII files
from the tables using nisaddent -d.

I also have to mention that I never did this procedure. I never had to
move a NIS+ root master server.

And one more problem, I ran into. I once wanted to add a new
replica. This failed, because I used FQDNs in the host tables cname
field. After changing is to a simple hostname, I was able to to add
the replica. This is the reason, why I prefer DNS lookups on hosts
over NIS+ lookups.

73, Mario
--

Institut fuer Robotik und Prozessinformatik der TU Braunschweig
Hamburger Strasse 267, 38114 Braunschweig, Germany

 
 
 

Move NIS+ Root Master + Solaris 2.4->2.5.1 Upgrade ?

Post by William Mall » Sat, 15 Feb 1997 04:00:00


Just a comment.  If you use 'nischttl' first to lower the Time To live on
the NIS+ directory objects (including org_dir and groups_dir) you do NOT have
to wait 12 hours twice, (just the first time you do it).  You can reset the
TTL's to 12 hours later if you like.

Another even simpler method for this problem is to build a 2.5.1 machine
and then rename it to the the oldmaster's name (including the IP address, the
/etc/.rootkey and copy over the /var/nis directory).  This replacement is
much faster so long as you do not have to change the servers IP address.

=wpm    William P. Malloy       SunSoft         Networking




>>Greetings all!

>>I am in the process of doing some major network upgrades (Solaris 2.4 to
>>2.5.1 on all servers), and I'd ideally like to move my NIS+ root
>>master server (currently 2.4) to a new machine that will be running 2.5.1.
>>Has anyone been able to do this successfully?  Even if you haven't been
>>successful, what are some of the "gotchas" that you have run into???

>The transition sould be possible, but it will take some time.

>1. Make the new NIS+ root master a client of the old NIS+ root master.

>2. Make the new NIS+ root master a NIS+ replica, using
>   nismkdir -s newmaster on all directories..

>2a. Wait at least 12 hours and make sure, the changes have propagated
>    to the NIS_COLDSTART file on every client.

>3. Make the new NIS+ root master the NIS+ master server for using
>   nismkdir -m newmaster onm all directories.

>3a. Again wait at least 12 hours till the changes have propagated to
>    all clients. I am not sure, what will happen to modify requests,
>    sind to the old master during this time. In doubt don't change
>    anything during this time.

>4. Remove the NIS+ directories from the old root master using
>   nisrmdir -s oldmaster.

>4a. Once again 12 more houres until the changes have propagated.

>5. Now you can remove the old master from the network and use it for
>   any purpose, you like.

>Remember to always make a backup of /var/nis on the master server
>(backing in up on the replicas, too is no miskate), before doing
>experiments like this. It is also a good idea to create ASCII files
>from the tables using nisaddent -d.

>I also have to mention that I never did this procedure. I never had to
>move a NIS+ root master server.

>And one more problem, I ran into. I once wanted to add a new
>replica. This failed, because I used FQDNs in the host tables cname
>field. After changing is to a simple hostname, I was able to to add
>the replica. This is the reason, why I prefer DNS lookups on hosts
>over NIS+ lookups.

>73, Mario
>--

>Institut fuer Robotik und Prozessinformatik der TU Braunschweig
>Hamburger Strasse 267, 38114 Braunschweig, Germany


 
 
 

Move NIS+ Root Master + Solaris 2.4->2.5.1 Upgrade ?

Post by King Chung » Sat, 15 Feb 1997 04:00:00


: Just a comment.  If you use 'nischttl' first to lower the Time To live on
: the NIS+ directory objects (including org_dir and groups_dir) you do NOT have
: to wait 12 hours twice, (just the first time you do it).  You can reset the
: TTL's to 12 hours later if you like.

: Another even simpler method for this problem is to build a 2.5.1 machine
: and then rename it to the the oldmaster's name (including the IP address, the
: /etc/.rootkey and copy over the /var/nis directory).  This replacement is
: much faster so long as you do not have to change the servers IP address.

I think there is a difference between the 2.4 and 2.5.1 nis+ directory
structure. Am I correct to assume that 2.5.1's nis+ server can read the
/var/nis directory from 2.4 machine or will do the conversion automatically
if it sees the old directory structure?

Thanks.

Best regards,

King Ho
Global Link Information Services Ltd.

 
 
 

Move NIS+ Root Master + Solaris 2.4->2.5.1 Upgrade ?

Post by William Mall » Sat, 15 Feb 1997 04:00:00





>: Just a comment.  If you use 'nischttl' first to lower the Time To live on
>: the NIS+ directory objects (including org_dir and groups_dir) you do NOT have
>: to wait 12 hours twice, (just the first time you do it).  You can reset the
>: TTL's to 12 hours later if you like.

>: Another even simpler method for this problem is to build a 2.5.1 machine
>: and then rename it to the the oldmaster's name (including the IP address, the
>: /etc/.rootkey and copy over the /var/nis directory).  This replacement is
>: much faster so long as you do not have to change the servers IP address.

>I think there is a difference between the 2.4 and 2.5.1 nis+ directory
>structure. Am I correct to assume that 2.5.1's nis+ server can read the
>/var/nis directory from 2.4 machine or will do the conversion automatically
>if it sees the old directory structure?

Yes the conversion is done automatically from /var/nis/$HOSTNAME to
/var/nis/data.  This does not work the other way, 2.4 does not handle a
2.5 or greater /var/nis/data directory.

=wpm    William P. Mallot       SunSoft         Networking

 
 
 

Move NIS+ Root Master + Solaris 2.4->2.5.1 Upgrade ?

Post by Peter Marenba » Sat, 22 Feb 1997 04:00:00


Two comments:

In article <5e217o$6s...@unix2.glink.net.hk>, kin...@glink.net.hk (King Chung Ho) writes:

>William Malloy (w...@quincy.eng.sun.com) wrote:
>: Another even simpler method for this problem is to build a 2.5.1 machine
>: and then rename it to the the oldmaster's name (including the IP address, the
>: /etc/.rootkey and copy over the /var/nis directory).  This replacement is
>: much faster so long as you do not have to change the servers IP address.

>I think there is a difference between the 2.4 and 2.5.1 nis+ directory
>structure. Am I correct to assume that 2.5.1's nis+ server can read the
>/var/nis directory from 2.4 machine or will do the conversion automatically
>if it sees the old directory structure?

This is right: On 2.4 the master has the directory /var/nis/<hostname> while
2.5 uses /var/nis/data. But probably the contens is the same?!

In article <855856528.11...@dejanews.com>, ssny...@cecom.com writes:
>Greetings all!
>From what I have read, it doesn't appear to be an easy way to upgrade
>from 2.4 to 2.5.1 without breaking NIS+, and moving the NIS+ master
>doesn't seem terribly easy, either.  So, the solution that I'm planning
>is to export the relevant NIS+ tables into flat files, completely
>remove NIS+ from the network, and then do a fresh install of NIS+ on
>newmaster (Unless anyone can suggest a better alternative).  FYI: We've
>only got about 20 NIS+ clients on the network, so removing NIS+ and then
>reinitializing the clients from the new server shouldn't be TOO much
>work...

Doing this you'll loose all your credentials ... everybody gets 'nisplus'
as nis+-password.

Actually, I did what you proposed first: Moving NIS+ from one host to another
(without waiting 12 hours twice!). There is a description on how to do that
available from the NIS+ FAQ (http://www.eng.auburn.edu/users/rayh/solaris/NIS+_FAQ.html), but be careful
with that ... there are a couple of bugs. I'll append this document including
some notices I made while I was doing the procedure (actually I did it three
times):

...

I attached the document as I received it from Sun
and included some comments in lines starting with '!'. The old lines
are preceeded by a '<' the new once by a '>'.

----- Begin Included Message -----

INFODOC ID: 11742
STATUS: Issued

SYNOPSIS: How to convert a NIS+ root replica server to a root master server.
DETAIL DESCRIPTION:

Use the following steps if you need to convert one of your root replica
servers to be the root master server:

< NOTE: In the following examples, <master> indicates the name of the old
< master server, <replica> indicates the name of the old replica server,
! this sounds nice but obviously there appears 'old master' 'new replica'
! and even 'master' when the old replica is meant. So we should better
! call the old master 'hostA' and the old replica 'hostB'

> NOTE: In the following examples, <hostA> indicates the name of the old
> master server, <hostB> indicates the name of the old replica server,

and `domainname` indicates the domainname. Items such as <rpc.nisd pid>
indicate the pid for the given process, obtained with the following
command:

        ps -ef|grep <processname>

All other punctuation should be typed as written.

1 - Create master's objects for replica:

<        On Master machine:
<        # nsmkdir -m <replica> groups_dir.`domainname`.
<        # nsmkdir -m <replica> org_dir.`domainname`.
<        # nsmkdir -m <replica> `domainname`.

>        On hostA:
>        # nismkdir -m <hostB> groups_dir.`domainname`.
>        # nismkdir -m <hostB> org_dir.`domainname`.
>        # nismkdir -m <hostB> `domainname`.

<2 - Copy root.object of master
<
<        On Replica machine:
<        # rcp <master>:/var/nis/<master>/root.object /var/nis/<replica>
<        Move root.object from master /var/nis/<master> directory to somewhere
<        else (don't delete it as you may need to reverse the process if it goes wrong)
! Hm, on most systems root is not allowed to do 'rcp' *and* only root should be
! allowed to read /var/nis.
! Furthermore from Solaris 2.5 on the directories are no longer called
! /var/nis/<hostname> but /var/nis/data.

>2 - Temporary move root.object of hostA to a public place where root at hostB

can read it (don't delete it as you may need to reverse the process if it goes wrong):

>        On hostA:
>        # cp /var/nis/data/root.object <public_dir>
>        # rm /var/nis/data/root.object

>        On hostB:
>        # cp <public_dir>/root.object /var/nis/data

! One thing I'm not sure about is, whether it is a good advice to keep the
! root.object *after* it was changed for the 'reverse process if it goes wrong'.
! To me it seems much more plausible to keep the original file ... but I never
! tried either.

3 - Kill rpc.nisd and nis_cachemgr on both master and replica:

>        On hostA and hostB:

        # kill <rpc.nisd pid> <nis_cachemgr pid>

4 - Restart rpc.nisd and nis_cachemgr on the new replica server:

<        On new replica machine:

>        On hostA:

        # /usr/sbin/rpc.nisd -S 0
        # /usr/sbin/nis_cachemgr -i

< 5 - Access the domainname directory and verify that the old replica is
< now the master:

> 5 - Restart rpc.nisd on the new master, access the domainname directory, and verify that
> it is now the master. This is for sure the worst part of the whole procedure if you type
> 'nisshowcache -v' on hostA it probably knows that is is *not* master anymore but at this
> moment hostB doesn't know that it is the master now. Now you have to make hostB to get
> these information from hostA:

<        On new master machine:
>        On hostB:

        # nisshowcache -v
        # niscat -o groups_dir.`domainname`.
        # niscat -o org_dir.`domainname`.
        # niscat -o `domainname`.

6 - If the contents of the cache still shows the old master server to be
the old master, do the following on the new master:

! I'm really not sure whether the following work always. The first time I tried it, I made
! what the original document said and I know that this did *not* work. What I'm sure about
! is that 'nismkdir' does not work without the rpc.nisd being startet
<        # nsmkdir -m <hostB> groups_dir.`domainname`.
<        # nsmkdir -m <hostB> org_dir.`domainname`.

>        On hostB:
>        # /usr/sbin/rpc.nisd -S 0
>        # nismkdir -m <hostB> groups_dir.`domainname`.
>        # nismkdir -m <hostB> org_dir.`domainname`.
>        # nismkdir -m <hostB> `domainname`.
> If hostB still doesn't want to be the master:
>    - Kill or disconnect other replica servers (if you have more than the one involved
>         here)
>       - Kill and restart rpc.nisd and nis_cachemgr on the old master (see 4)
>       - ... kill this rpc.nisd start that nis_cachemgr until 'nisshowcache -v' tells
>         hostB to be the master

7 - Change the ownership of the directories

>        On hostB:

        # nischown <hostB> groups_dir.`domainname`.
        # nischown <hostB> org_dir.`domainname`.

>        # nischown <hostB> `domainname`.

8 - Change the ownership of all the tables within the directories

<        # for tables in `nisls org_dir groups_dir`
<        > do
<        > nischown <master> $tables
<        > done
! The above certainly does not work. This should do what we wanted ...

>        On hostB:
>        # for table in `nisls org_dir | grep -v org_dir`
>        > do
>        > nischown <hostB> $table.org_dir
>        > done
>        # for table in `nisls groups_dir | grep -v groups_dir`
>        > do
>        > nischown <hostB> $table.groups_dir
>        > done

9 - Check the tables and directory structures are owned by the correct newmaster

niscat -o org_dir
niscat -o hosts.org_dir  etc...

10 - Remove the old replica from replicating the directory structures

>        On hostB:

        # nisrmdir -s <oldmaster> groups_dir.`domainname`.
        # nisrmdir -s <oldmaster> org_dir.`domainname`.
        # nisrmdir -s <oldmaster> `domainname`.

11 - Checkpoint the domain

>        On hostB:

        # nisping -C groups_dir.`domainname`.
        # nisping -C org_dir.`domainname`.

>        # nisping -C `domainname`.

12 - If they are all now owned and replicated by the correct machine, stop and
restart rpc.nisd in security level 2

>        On hostB:

        # kill <rpc.nisd pid> <nis_cachemgr pid>
        # /usr/sbin/rpc.nisd
        # /usr/sbin/nis_cachemgr -i

13 - Check as users and root that all is well.
! This advice is really great! A good check would be ...

>  E.g. log in to hostB as user and see if there is more that '*NP*' in the second
>  column when trying 'niscat passwd.org_dir'.

14 - On the old master, clear out the old info and make it a client of the
domain

>        On hostA:

        Remove everything from /var/nis except NIS_COLD_START and
        NIS_SHARED_DIRCACHE.
        Put the name and IP number of the new master in the /etc/hosts file.
<        # nisinit -c -H <master>

>        # nisinit -c -H <hostA>
>        # /usr/sbin/nis_cachemgr -i

15 - Make the old master a replica of the domain
> (If you killed the other replicas in 6 it time to restart them here)

<        On the new replica, start rpc.nisd.
<        On hostA, start rpc.nisd:

>        # /usr/sbin/rpc.nisd

<        On the master
<        # nismkdir -s <replica> groups_dir.`domainname`.
<        # nismkdir -s <replica> org_dir.`domainname`.
<        # nismkdir -s <replica> `domainname`.
>        On hostB:
>        # nismkdir -s <hostA> groups_dir.`domainname`.
>        # nismkdir -s <hostA> org_dir.`domainname`.
>        # nismkdir -s <hostA> `domainname`.

        # nisping -C groups_dir.`domainname`. (note: server busy messages are
        # nisping -C org_dir.`domainname`.     (generated because the previous
        # nisping -C `domainname`.              (command has not finished.

16 - On each client, kill nis_cachemgr

        # kill <nis_cachemgr pid>

17 - On each client, get a new coldstart file from the new master server ...

read more »

 
 
 

Move NIS+ Root Master + Solaris 2.4->2.5.1 Upgrade ?

Post by Neil Ricke » Sat, 22 Feb 1997 04:00:00




>>I think there is a difference between the 2.4 and 2.5.1 nis+ directory
>>structure. Am I correct to assume that 2.5.1's nis+ server can read the
>>/var/nis directory from 2.4 machine or will do the conversion automatically
>>if it sees the old directory structure?
>This is right: On 2.4 the master has the directory /var/nis/<hostname> while
>2.5 uses /var/nis/data. But probably the contens is the same?!

I upgraded from 2.3 to 2.5.1.  I did this by allowing a fresh install
(while retaining /export/home and /usr/local partitions).  I then
simply restored /var/nis from backups, rebooted, and nis+ worked
fine.  The nis+ daemon recognized the 2.3 directory organization and
changed it to the appropriate 2.5.1 organization.  (For safety, I
also had flat file backups so that I could reinstall nis+ if anything
went wrong).

Quote:>>Greetings all!
>>From what I have read, it doesn't appear to be an easy way to upgrade
>>from 2.4 to 2.5.1 without breaking NIS+, and moving the NIS+ master
>>doesn't seem terribly easy, either.  So, the solution that I'm planning
>>is to export the relevant NIS+ tables into flat files, completely
>>remove NIS+ from the network, and then do a fresh install of NIS+ on
>>newmaster (Unless anyone can suggest a better alternative).  FYI: We've
>>only got about 20 NIS+ clients on the network, so removing NIS+ and then
>>reinitializing the clients from the new server shouldn't be TOO much
>>work...
>Doing this you'll loose all your credentials ... everybody gets 'nisplus'
>as nis+-password.

You can put the credentials into flat files too.  I used this method
about two years ago to recover from a disk crash.  I created the flat
files on a replica server, reinstalled on the reconstitued main
server, then resetup the replica as a replica.  (I was also changing
IP addresses at the same time, and that made the reinstall look
attractive).
 
 
 

Move NIS+ Root Master + Solaris 2.4->2.5.1 Upgrade ?

Post by spamm.. » Sat, 22 Feb 1997 04:00:00


I agree with Neil's post - as long as you reload the 2.4 cred table with
nispopulate and copy over the /etc/.rootkey file you should be fine,
right? Please tell me this is so because I have to upgrade a 2.4 machine
to 2.5.1 in the near future and I wasn't planning on needing Divine
Intervention to get it to work right.

Now, changing the IP address of the master server is another matter. The
clients have this in their configuration, so if you ever need to change
the IP of the master server you are in deep doo doo.

-w

 
 
 

Move NIS+ Root Master + Solaris 2.4->2.5.1 Upgrade ?

Post by Scott MacKa » Thu, 27 Feb 1997 04:00:00


Bah!  If you change a NIS+ master's IP address don't worry about
the fact that all his clients contain the IP address.  Be concerned
about the fact that the IP encrypts into the creds and that the NIS+
master will no longer be authenticated to connect to itself anymore.

I believe Sun has an SRDB out on this, anyone know the number?
-Scott


> I agree with Neil's post - as long as you reload the 2.4 cred table with
> nispopulate and copy over the /etc/.rootkey file you should be fine,
> right? Please tell me this is so because I have to upgrade a 2.4 machine
> to 2.5.1 in the near future and I wasn't planning on needing Divine
> Intervention to get it to work right.

> Now, changing the IP address of the master server is another matter. The
> clients have this in their configuration, so if you ever need to change
> the IP of the master server you are in deep doo doo.

> -w

 
 
 

1. NIS+ Master Upgrade Solaris 2.3, 2.4 -> 2.5.1

I have to install Solaris 2.5.1 on a NIS+ Master Server (currently
running Solaris 2.3) and on two NIS+ Replica's (both running Solaris
2.4).
A simple upgrade of the systems may not be possible because a backout
of some of the installed patches isn't possible.
A first inquiry in a local group states a rich spectrum of
possibilities.
From only make a backup/recover of /var/nis or to make a transition of
the Master to one of the Replicas up to a complete new installation of
NIS+.
Which is the best proceeding and sequence of actions?
Who can point me the right way or to appropriate documentation?

Please send answers also via E-Mail.

Thanks in advance,

Michael

--

Max-Planck-Institut fuer Aeronomie
Postfach 20
D-37189 Katlenburg-Lindau

Tel: 05556/979-345
Fax: 05556/979-240

2. Problems with Adaptec 1542CF/Spea Mirage P64

3. Solaris 2.3 w/NIS+ Upgrade to 2.5 w/ NIS+ (Master Server)?

4. SCSI Quantum Viking

5. Q - how to move NIS+ root master server

6. TERM for DEC Alpha station?

7. NIS+ root master move

8. binutils sources?

9. Moving NIS+ root master

10. Need to upgrade OS on NIS+ root master server

11. NIS+ root master upgrade

12. Moving NIS master from SunOS to Solaris 2.6

13. Upgrading NIS+ server 2.4 -> 2.5.1