Chapter 6. Maintaining Diskless Implementations
Prev |  | Next

## Chapter 6. Maintaining Diskless Implementations

This chapter contains procedures that are commonly required to maintain a diskless software implementation. The chapter contains the following subsections:

- “Removing a Client Tree”

- “Removing a Share Tree”

- “Changing the Size of the Swap Space”

- “Setting Up a Local Disk”

- “Moving a Client to a Different Server”

- “Converting a Client to a Standalone Workstation”

## Removing a Client Tree

To remove a client tree, use the `client_inst` command with the -d (delete) option. All client trees should be removed from the server before you remove their share tree. Before removing a client tree, be sure to back up anything on the tree that you want to save.

The procedure for removing a client tree is given below:

1. Enter `client_inst` with the -d option.

   Use the `client_inst` command with the delete argument, as shown in this sample entry, which removes host starlite:

       # /var/boot/client_inst -h starlite -r IRIX_62 -c Indigo_XS -d

   After your entry, you see a response similar to this:

       Remove client tree at /diskless/client/starlite
                           (shared tree = /diskless/share/IRIX_62
       Enter confirmation (y/Y):

2. Enter `Y` to confirm removal.

   After your entry, you see this prompt:

            Do you want host /diskless/client/starlite removed from NIS (y/n)?

3. Enter `y` or `n` to this prompt.

   Unless you are moving this client to another network, answer `no` to this prompt. A no entry maintains the client's name and address in the current network's host database. If the client is moving to a new network, answer `yes`; its hostname and Internet address will be removed from the host database for this network.

The client tree that you specified is now removed from the server.

## Removing a Share Tree

The procedure for removing a share tree is similar to the procedure for removing a client tree: you use the `share_inst` command with the `-d` (delete) option. When you use this procedure, all client trees for the class should be removed, because removing a share tree disables its clients. You should also make a backup copy of the share tree before starting this procedure, just in case you need to restore it later.

The procedure for removing a share tree is as follows:

1. Verify that the share tree is not supporting any clients.

2. Enter `share_inst` with the -d option.

   Use the `share_inst` command with the delete option, as shown in the following example. If any client is still using the tree when you enter this command, `share_inst` posts warning messages (the note is shown in Step 3).

       # /var/boot/client_inst -r IRIX_62 -d

       About to remove shared tree at /diskless/share/IRIX_62...
       Enter confirmation (y/Y):

3. Enter `y` or `Y` (yes) to confirm the removal.

   After your entry, wait several minutes for the share tree to be removed.

   | Note: If you have not shut down clients for this share tree, `share_inst` displays this message after your command entry:

             WARNING: Class IRIX_62 is still serving clients.
             continue to delete IRIX_62(Y/N)?

   If you answer `y` (yes), `share_inst` posts a final warning:

             Checking clients status:
             client client_1 ... UP
             WARNING: clients will be out of sync.
             Clients which are UP may crash.

   If you proceed with the installation in spite of these warnings,`share_inst` removes the share tree.

The share tree for this version of IRIX is now removed from the server. Any clients that were using this share tree can no longer operate as diskless workstations.

## Changing the Size of the Swap Space

The size of a client's swap space is set during the installation of its client and swap trees (see “Client and Swap Tree Variables” in Chapter 4). The default size is 64 megabytes. If you find that the swap size for any client is not suitable, you can change it using this procedure:

1. Shut down the client.

   | Caution: Allowing the client to remain in operation is likely to result in the loss of data.

2. From the server, change to the swap tree directory.

   This sample command changes to the swap directory for the client starlite:

       # cd /diskless/swap/starlite

3. Issue the `mkfile` command to change the swap size.

   This sample command changes the size of the swap file to 100 megabytes:

       # mkfile 100m _swap

4. Boot the client.

   The new swap space size goes into effect as soon as the boot process is completed.

## Setting Up a Local Disk

If a client workstations contains a disk, the disk can be set up to provide local resources to the client. The procedures in this section explain how to set up a local filesystem (`/var/tmp`) and a local swap partition on the installed disk.

The procedures in this section make these assumptions:

- The local disk is properly installed in the client workstation.

  If you have not yet installed or mounted the local disk, see the owner's guide for your system for installation instructions.

- The local disk is partitioned as a system disk.

  If your disk is formatted as an option disk rather than a system disk, you can configure a filesystem on partition 7 of your disk; however, if you plan to add a swap partition to an option disk, you must first repartition it. See IRIX Admin: Disks and Filesystems and the `fx` man page for instructions on disk repartitioning.

### Getting Prepared

To prepare for setting up resources on the local disk, first verify that the disk is properly installed. You should also determine the disk partition on which the new filesystem or swap partition is to be mounted and the name of the IRIX device special file that designates the partition.

#### Verifying Installation

To verify proper installation, enter the `hinv` command and check the output for an entry that identifies the newly installed disk. If the disk is properly configured, `hinv` reports the drive and its installed location. The output in the following example shows a device installed as the first drive (unit 1) on the first SCSI controller (0):

    # hinv
    Disk Drive: unit 1 on SCSI controller 0

#### Determining the Mount Partition

A local filesystem or swap partition is made available by mounting it to a particular partition on the local disk. Disk partitions are designated by a set of device special files in the `/dev/dsk` directory (see `intro` for an explanation of naming conventions for special files). For example, these files pertain to the disk reported in the sample output of `hinv` above:

    # ls /dev/dsk
    /dev/dsk/dks0d1s0   /dev/dsk/dks0d1s1  /dev/dsk/dks0d1s6
    /dev/dsk/dks0d1s7   /dev/dsk/dks0d1vh  /dev/dsk/dks0d1vol

The partition that you designate for mounting (specified by `s0`,`vh`, and so on, in the filename) will depend on whether you installed a system or option disk, and, if you have installed a system disk, on whether you are adding swap space or a filesystem to the disk. IRIX uses the conventions shown in Table 6-1 for designating disk partitions.

Table 6-1. IRIX Disk Partitions

Partition | Designation
--- | ---
0 | `root` partition
1 | `swap` partition
6 | `usr` partition
7 | entire disk except for the volume header
8 | volume header
10 | the entire disk

| Note: Partition 7 is omitted from factory-shipped system disks, and partitions 0, 1, and 6 are omitted from factory-shipped option disks.

### Adding a Local Filesystem

The procedure that follows explains how to set up a `/var/tmp` filesystem on a local (system) disk. It explains how to mount the filesystem, using the `/etc/fstab` file in a client tree. Log in to the client workstation as the superuser to do this procedure:

1. Create the mount point on the client tree:

       # mkdir /var/tmp

2. Add an entry to `/etc/fstab` that mounts the filesystem.

   Open the client's copy of `/etc/fstab` and add a line similar to the following sample entry (see `fstab` for more information). This entry mounts the `/tmp` filesystem on the root partition:

           /dev/dsk/dks0d1s0    /var/tmp   xfs    rw,raw=/dev/rdsk/dks0d1s0 0 0

3. Boot the system to make your changes take effect.

When the boot is completed, the new filesystem is available to users of the client system.

### Adding a Local Swap Partition

The procedure that follows explains how to set up a swap partition on a local (system) disk using an `/etc/fstab` file entry in a client tree. This swap partition is used in conjunction with the client's swap tree, unless you remove the swap tree. When both the swap tree and a local swap partition are available, IRIX selects the swap location based on the priority setting in your `/etc/fstab` entry (see `fstab`(4) for more information).

1. Make the `/etc/fstab` entry for the swap space.

   Open the client's copy of `/etc/fstab` and add a line similar to the following sample entry. This entry uses the standard IRIX swap partition for the local swap space. The priority setting in this entry (pri=3) weights the swap location in favor of the local swap space:

       /dev/dsk/dks0d1s1    swap    swap    pri=3 0 0

2. Reboot the client system:

       # /etc/reboot

   The initialization sequence makes the local swap partition available for swap operations.

## Moving a Client to a Different Server

When you move a client tree to a different server, be sure that the share tree on the new server is appropriate (see “Checking a Server” in Chapter 2). If you do not yet have a share tree on the new server, you must create one before doing this procedure (see Chapter 3, “Creating a Share Tree”).

Moving a client to another server involves six general steps. Each step is described in detail in the sections that follow.

1. Prepare the client system.

2. Back up the old client tree.

3. Create a client tree on the new server.

4. Move private files to the new client tree.

5. Verify that the client works.

6. Clean up the old server.

### Preparing the Client

To prepare the client to move to the new server, follow these steps:

1. Bring the client down gracefully:

       # shutdown

2. Power off the client and relocate it, if needed.

   If the client must be physically moved to a new location, power it off before moving it. Once it is moved, reconnect it to the new network and power it on.

3. Assign the new Internet address, if needed.

   If the client is moved to a new physical network, or if it has been issued a new hostname, it will need to be assigned an internet address. Obtain the Internet address from your network administrator.

### Backing Up the Old Client Tree

Backing up the old client tree is important for two reasons: some of the files you back up will be needed on the new server, so your copies will save you time when setting up the new client tree; the backup copies are insurance against unforeseen problems that might arise during the move.

Follow these steps to back up the old client tree:

1. Make a backup copy of the client's private files.

   Transfer the client's private files onto tape or to a temporary holding directory. You should include such files as `passwd`, `fstab`, `aliases`, and `group`. Remember that this copy of the `fstab` file will need to be modified for the new server.

2. Back up any other files the users might have requested.

   As a precaution, ask users on this client to identify any other files that reside on the client tree. Make backup copies of these files on tape or in a temporary holding directory.

### Creating a Client Tree on the New Server

Once the client is moved to the new network and you have backed up files on the old server, go to the new server and create a new client tree for it:

1. Change to the `/var/boot` directory.

       # cd /var/boot

2. Use `client_inst` to build the new client tree.

       # ./client_inst -r IRIX_65-32 -h starlite

   If you need instructions to complete this step, see “Client and Swap Tree Installation Procedure”.

### Moving Private Files to the New Tree

Once the new client tree is built, move any of the client's private files to it. You can transfer the files over the network using rcp or copy them from backup media. Follow these steps to transfer the private files with `rcp`:

1. Change to the private files directory.

   Log in to the new server as superuser and change to the directory that will contain the private files, as shown in this example:

       # cd /diskless/client/starlite/etc

2. Copy the private files from the old server to the new one.

   The following examples show how the files would be copied for a remote directory on the network, using `rcp`. If the private files are on removable media, use the restore command that is appropriate for your medium.

   | Note: Because the filesystem on the new server might differ from that on the old, this example copies the archived version of `fstab` to a file called `fstab.old`. Creating`fstab.old` preserves the version of `fstab` made during the client tree installation.

       # rcp oldserver:/diskless/client/starlite/etc/fstab fstab.old
       # rcp oldserver:/diskless/client/starlite/etc/passwd passwd
       # rcp oldserver:/diskless/client/starlite/etc/group group
       # cd ../var/lib
       # rcp oldserver:/diskless/client/starlite/etc/aliases aliases

3. Copy other files requested by users of this workstation.

4. Make a final working copy of `/etc/fstab`.

5. Make additional mount points for NFS directories, if needed.

### Verifying Client Operation

Once the client tree is built and the required files are transferred to the new server, verify that the client is working properly. Use this procedure to verify client operation:

1. Set the required NVRAM variables.

   The NVRAM variable bootfile for this client must be set to reflect the new server environment. If you changed the Internet address for this client, the netaddr variable must also be changed. See Steps 4 and 5 of “Booting a Client Workstation” if you need more details.

2. Enter `init` and boot the client.

   This step sets the NVRAM variables and starts up the workstation using the new NVRAM values. After your entry, you are asked if you want to reconfigure the kernel.

3. Enter `y` to reconfigure the kernel.

4. Log in as the superuser and reboot the client.

### Cleaning the Old Server

Once the client is set up and running properly on the new server, you can clean up the old one. Use the delete option (-d) of the `client_inst` command to remove the client tree on the old server.

## Converting a Client to a Standalone Workstation

Eventually, you might decide to convert your diskless client to a standalone workstation. The procedure in this section explains how to convert a diskless client into a workstation that uses its local disk.

Converting a diskless workstation involves four general steps:

1. Install the new hardware (if any) in the workstation.

2. Enable network software on the new host.

3. Move private and working files from the server to the new host.

4. Remove the client tree from the server.

Each of these steps is described in detail in the sections that follow.

### Installing the Hardware

The following instructions explain how to configure a disk drive. They assume that a fully functioning operating system is installed on the disk. If the operating system is not installed on the disk, refer to IRIX Admin: Software Installation and Licensing .

1. Follow all instructions in “Preparing the Client”.

2. Install the disk drive in the workstation.

   Follow the installation instructions sent with the disk.

3. Power on the workstation.

   After the power-on diagnostics run, you see this message:

       Starting up the system...
       To perform System Maintenance instead, press Esc

4. Press `Esc` to display the System Maintenance menu.

5. Invoke the workstation's Command Monitor.

   The procedure for invoking the Command Monitor varies, depending on the workstation model. If you are not familiar with this procedure, check the owner's guide shipped with the system. At the Command Monitor, this prompt is posted:

       >>

6. Verify that the disk was properly installed:

       >> hinv

   The `hinv` (hardware inventory) command lists devices installed on this workstation. Look for output lines similar to the one shown here:

       SCSI Disk: dksc(#,#)

   | Note: If the drive does not appear in the listing, it is not correctly installed. The drive must be removed and installed again.

7. Determine the internet address for this workstation:

       >> printenv

   Several variables are listed on the screen. Check for the value of the netaddr variable. If you want to keep the same internet address, make a note of the netaddr setting. You will need this information when you enable network software on this station.

8. Disable diskless operation:

       >> setenv diskless 0

9. Initialize the workstation environment:

       >> init

10. Exit the Command Monitor:

        >> exit

    After your entry, the System Maintenance menu is displayed.

11. Select option 1, “Start System.”

After it starts, this workstation is ready to function as a standalone system. The procedure in “Enabling Network Software” explains how to change the standalone system to a network host that can communicate with other network members.

### Enabling Network Software

Many files that the new disk-based system will need are located on its former server. You can copy these files in one of two ways: enable the workstation's network software so that it can communicate with its former server (and other hosts), or obtain a hard copy of the required files. Guidelines for turning on network software are given in the procedure below.

To enable network software, you need this information:

- The Internet address for the workstation and old diskless server.

- The hostname for the workstation and old diskless server.

- The NIS domain name for this workstation, if it uses NIS.

The following procedure explains how to turn on network software:

1. Assign a hostname in `/etc/sys_id`.

   Edit the`/etc/sys_id` file and enter the hostname for this system.

2. Enter the name of the new host in the hosts database.

   The name and Internet address of this workstation must be entered in the network database files. If your network uses the DNS or NIS name service, the service needs a record of the new hostname and address. If you do not administer the name service , notify its administrator to add the new host to its database.

   If your site does not use a name service, add the names of other network hosts to this workstation, either with the System Manager tool (see the Personal System Administration Guide ), or by editing the workstation's /etc/hosts file. The remote hosts must also have the name and address of this workstation in their host database.

3. Turn on NIS software, if needed.

   If you are using NIS, set the NIS flag to on with `chkconfig`.

4. Reboot the system so that your changes will take effect.

### Moving Private Files to the New Host

To move the private files for this host from its former server, follow the instructions given here. These instructions explain how to complete the transfer with `rcp`. They assume that you are logged in to the new host and have appropriate permissions on it and the former server.

1. Copy the private files from the old server to the new host.

   The following examples show how the files are copied from a remote directory on the network, using `rcp`.

   | Note: Because the filesystem on the new host differs from that on the old server, this example copies the archived version of the `fstab` file to a file called `fstab.old`. Creating `fstab.old` preserves the existing version of `fstab` (made during the installation).

       # cd /etc
       # rcp oldserver:/diskless/client/starlite/etc/fstab fstab.old
       # rcp oldserver:/diskless/client/starlite/etc/passwd  passwd
       # rcp oldserver:/diskless/client/starlite/etc/group group
       # cd /var/lib
       # rcp oldserver:/diskless/client/starlite/etc/aliases aliases

2. Copy other files requested by users of this workstation.

3. Make the final working version of `fstab`.

4. Make additional mount points for NFS directories, if needed.

When you finish these instructions, the workstation is ready to operate as an independent network host.

### Removing the Client Tree

Once you have copied all the useful files from the server to the new disk, you should remove the client tree from the server. Follow these general steps:

1. Make a backup copy of the client tree from the server.

   This backup is for insurance; it might be required if unforeseen problems arise on the new host. See “Backing Up the Old Client Tree” for instructions.

2. Remove the client tree from the server.

   See “Removing a Client Tree” for instructions.

3. If no client workstations remain on the server, remove the share tree.

   See “Removing a Share Tree” for instructions.

Prev | Table of Contents | Next
Chapter 5. Updating Software on Diskless Trees |  | Chapter 7. Troubleshooting Diskless Installations