 |
» |
|
|
 |
The simplest way to configure a disk device (hard disk, floppy
disk, disk array, or CD-ROM) 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. Familiarize yourself with 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 disk. For examples of ioscan usage, consult "Using ioscan to Display your I/O Configuration," in Appendix
B of this book. Consult the tables in the previous section ( “Selecting Device
Drivers for a Disk Device and Interface ”) to determine the device driver(s)
needed for your disk and interface. (If you are configuring a magneto-optical
device, use the table in the section, Magneto-Optical Disk Configuration
Guidelines, found in the next chapter.) If any necessary device
driver is absent from the kernel, you will need to rebuild the kernel
to include it. Here is how to rebuild the kernel: 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, as follows: cd /stand/build /usr/lbin/sysadm/system_prep -v -s system |
The system_prep script writes a system file in your current directory (that is, it creates /stand/build/system). The -v gives verbose explanation as the script executes. Edit the /stand/build/system file to add the absent driver(s). Build the kernel by invoking the command, /usr/sbin/mk_kernel -s system |
The mk_kernel command creates /stand/build/vmunix_test, a kernel ready for testing. 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 disk. 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 down 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 provided
in the hardware documentation. When attaching the disk, set the
switches on the disk to an unused target 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 disk and associates it
with its device driver. Also during boot-up, insf creates the character and block device special
(/dev) files required to communicate with the disk.
For a disk array in independent mode, insf creates device special files for each disk; in
striped mode, insf treats the entire array as a single disk. Verify the configuration by executing ioscan. If you are configuring a hard disk, you have
finished the initial configuration. If you are configuring a floppy disk drive, initialize the
floppy disk by invoking the mediainit command on the character device special file.
|