8.5. Changing a client's name
If you have not changed the default diskless client
configuration, it's easiest to
shut down the client, remove its root and swap filesystems, and then
create a new client, with the new name, using the AdminSuite
software. However, if you have made a large number of local changes
-- modifying configuration files, setting up a name service, and
creating mount points -- then it may be easier to change the
client's name using the existing root and swap filesystems.
Before making any changes, shut down the client system so that you
can work on its root filesystem and change NIS maps that affect it.
On the NIS master server, you need to make several changes:
-
Update /etc/bootparams to reflect the new
client's name and root and swap filesystem pathnames.
-
Add the new hostname to the hosts map in place of the old client
name. If any mail aliases include the old hostname, or if the host is
embedded in a list of local hostnames, update these files as well.
-
Modify the ethers NIS map if all hosts are
listed in it.
-
Rebuild the bootparams,
ethers, and hosts maps.
On the client's boot server, complete the renaming process:
-
Rename the root and swap filesystems for the client:
# cd /export/root
# mv oldname newname
# cd /export/swap
# mv oldname newname
-
Update the server's list of exported NFS filesystems with the
new root and swap pathnames. Also change the rw=
and root options in
/etc/dfs/dfstab. After modifying the file,
share the newly named filesystems, or
shareall filesystems, so that the client will be
able to find them when it reboots.
-
In the client's root filesystem, modify its hosts file and boot
scripts to reflect the new hostname:
# cd /export/root/newname/etc
# vi hosts
# vi hostname.*[0-9]*
# vi nodename
# vi /etc/net/*/hosts
In Solaris, the hostname is set in a configuration file with the
network interface as an extension; for example:
hostname.hme0. It is essential that the
host's name and IP address in its own hosts file agree with its
entries in the NIS map, or the machine either boots with the wrong IP
address or doesn't boot at all.
Aside from shutting the client down, the remainder of this operation
could be automated using a script that takes the old and new client
names as arguments. The number of changes that were made to NIS maps
should indicate a clear benefit of using NIS: without the centralized
administration, you would have had to change the
/etc/ethers and
/etc/bootparams files on every server, and
update
/etc/hosts on
every
machine
on the
network.
| | |
8.4. Managing client swap space | | 8.6. Troubleshooting |