 |
» |
|
|
 |
The simplest way to configure a tape drive is to use SAM (/usr/sbin/sam). If SAM is not loaded on your system or if you
prefer to use the command-line interface, the following procedure
will guide you through the task. Understand the instructions before
getting started. Invoke /usr/sbin/ioscan -fn to figure out what addresses are available on
the interface card to which you will be attaching the tape drive. For examples of ioscan usage, consult "Using ioscan to Display Your I/O Configuration," in Appendix
B of this book. Determine the device drivers needed for your tape
drive and interface by consulting ,Table 6-1 “HP-IB Tape Drive Configuration Requirements”,Table 6-2 “HP-IB Cartridge Tape Drive Configuration Requirements ”, or Table 6-3 “SCSI Tape Drive Configuration Requirements” in the previous section, “Selecting Device
Drivers for a Tape Device and Interface ”. If any necessary device driver is
absent from the kernel, you will need to rebuild the kernel to include
it. Change directory to the build environment (/stand/build). There, execute a system preparation script, system_prep, which extracts the system file from the current
kernel and writes a system file in your current directory. (That is, it creates /stand/build/system.) The -v gives verbose explanation as the script executes. cd /stand/build /usr/lbin/sysadm/system_prep -v -s system
|
Edit the /stand/build/system file to add the absent driver(s). Build the kernel by invoking the mk_kernel command. This creates /stand/build/vmunix_test, a kernel ready for testing. /usr/sbin/mk_kernel -s system |
Save the old system file and kernel by moving them.
Thus, if anything goes wrong, you still have a bootable kernel. mv /stand/system /stand/system.prev mv /stand/vmunix /stand/vmunix.prev
|
Move the new system file and new kernel into place,
ready to be used when you reboot the system. mv /stand/build/system /stand/system mv /stand/build/vmunix_test /stand/vmunix
|
Notify users that the system will be shut down to
configure the tape drive. You can use the wall command and/or the interactive capabilities of
the shutdown command to broadcast a message to users before
the system goes down. See wall(1M) or shutdown(1M)
in the HP-UX Reference. Bring the system to a halt, using the shutdown command. Turn off the power to all peripheral devices and then to
the SPU. Install the hardware, following instructions shown
in the hardware documentation. When attaching the tape drive, set
the switches on the tape drive to an unused address, which you will
have determined from ioscan output. Use the cabling recommended in the hardware
documentation. If installing a SCSI device, make sure the last device
in the SCSI chain is terminated. Turn on the power to all peripheral devices. Wait
for them to become "ready", then turn on power
to the SPU. On booting up, HP-UX detects the new tape drive and associates
it with its device driver. insf creates the character device special files required
to communicate with the tape drive. Verify the configuration by invoking the ioscan command to confirm that the tape device is present
and device special files have been created for it. In the sample output shown, the tape driver at hardware path 2/0/1.3.0 can be accessed by one of eight device files. /usr/sbin/ioscan -C tape -fun Class I H/W Path Driver S/W State H/W Type Description ========================================================================== tape 0 2/0/1.3.0 stape CLAIMED DEVICE HP35480A /dev/rmt/0m /dev/rmt/c0t3d0BESTn /dev/rmt/0mb /dev/rmt/c0t3d0BEST /dev/rmt/0mn /dev/rmt/c0t3d0BESTb /dev/rmt/0mnb /dev/rmt/c0t3d0BESTnb
|
You can also use the tar command to verify that you can read and write
to and from the device. In the following example, the first tar command writes the /etc/passwd file to tape using a device special file shown
in the ioscan output. The second tar command displays the contents of the tape. /usr/bin/tar cvf /dev/rmt/c0t3d0BEST /etc/passwd a /etc/passwd 2 blocks /usr/bin/tar tvf /dev/rmt/c0t3d0BEST r--r--r-- 2/2 601 June 6 16:40 1994 /etc/passwd |
|