Solaris Naming Administration Guide

Adding a Replica to an Existing Directory

This section describes how to add a replica server to an existing system using the nismkdir command. An easier way to do this is with the nisserver script as described in Solaris Naming Setup and Configuration Guide.

Keep in mind the following principles:

To assign a new replica server to an existing directory, use nismkdir on the master server with the -s option and the name of the existing directory, org_dir, and groups_dir:

nismkdir -s replica-server existing-directory-name
nismkdir -s replica-server org_dir. existing-directory-name
nismkdir -s replica-server groups_dir. existing-directory-name

The nismkdir command realizes that the directory already exists, so it does not recreate it. It only assigns it the additional replica. Here is an example with rep1 being the name of the new replica machine:

rootmaster% nismkdir -s
rootmaster% nismkdir -s
rootmaster% nismkdir -s

Caution - Caution -

Always run nismkdir on the master server. Never run nismkdir on the replica machine. Running nismkdir on a replica creates communications problems between the master and the replica.

After running the three iterations of nismkdir as shown above, you need to run nisping from the master server on the three directories:

rootmaster# nisping
rootmaster# nisping
rootmaster# nisping

You should see results similar to these:

rootmaster# nisping
Pinging replicas serving directory :
Master server is
 Last update occurred at Wed Nov 18 19:54:38 1995
Replica server is
 Last update seen was Wed Nov 18 11:24:32 1995
 Pinging ...

It is good practice to include nisping commands for each of these three directories in the master server's cron file so that each directory is "pinged" at least once every 24 hours after being updated.