 |
» |
|
|
 |
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 “Viewing the System Configuration with
ioscan” in Chapter 1 “Getting Started” Determine the device drivers needed for your tape drive
and interface. If any necessary static 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 |
Modify the /stand/build/system file to add the absent driver(s) by invoking the kmsystem command. The -c Y specifies that driver-name is to be configured
into the system. /usr/sbin/kmsystem -S /stand/build/system -c Y driver-name |
 |  |  |  |  | NOTE: To avoid introducing format errors, do not edit the
HP-UX system description files directly. Instead, use the commands kmsystem and kmtune. These commands are new for Release 11.0; consult kmsystem(1M) and kmtune(1M) in
the HP-UX Reference. |  |  |  |  |
Build the new kernel by invoking the mk_kernel command. This creates /stand/build/vmunix_test, a kernel ready for testing. /usr/sbin/mk_kernel -s /stand/build/system |
Save the old system file by moving it. Then move the
new system file into place. mv /stand/system /stand/system.prev
mv /stand/build/system /stand/system |
Prepare for rebooting by invoking the kmupdate command. This sets a flag that tells the system
to use the new kernel when it restarts.
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
rrr 2/2 601 June 6 16:40 1994 /etc/passwd |
|