pdiadd(1M) pdiadd(1M)
NAME
pdiadd - add new disk, tape, or SCSI devices to the UNIX
System kernel
SYNOPSIS
/sbin/pdiadd [-O] [-I] [-d dma_channel [-v vector
[-s sharing] [-i i/o_address] [-m memory_address]
[-R ROOT] device
/sbin/pdiadd -h [-n] disk number
DESCRIPTION
This script, pdiadd(1M), adds support for a new disk, tape, or
SCSI device to the UNIX system kernel by modifying the current
system configuration in /etc/conf.
Options
pdiadd takes the following options:
-O Print the resulting PDI configuration information to
standard output.
-I Read the input PDI configuration information from
standard input instead of getting the information using
the pdiconfig command.
-d dma_channel
Use this value instead of the default DMA channel
specified in the disk.cfg file for the device you want
to add. dma_channel should be an integer in the range 0
to 7 on ISA-bus machines. The value 0 here implies that
the device does not use a DMA channel. This option is
unnecessary on Micro-Channel ArchitectureO machines.
-v vector
Use this value instead of the default interrupt vector
specified in the disk.cfg file for the device you want
to add. vector should be an integer in the range 0 to
15. The value 0 here implies that the device does not
use an interrupt vector.
-s sharing
sharing should be an integer in the range of 0 to 4. The
value of 0 here implies that this device does not use
interrupts.
Copyright 1994 Novell, Inc. Page 1
pdiadd(1M) pdiadd(1M)
-h disk number
Inform the system that a device has been added to it and
that it should search the SCSI buses for new devices.
When using -h, pdiadd may only be run from the console.
It will pause the SCSI bus and inform the user that the
device can be added to the SCSI bus. After adding the
device, the user hits RETURN to allow pdiadd to search
for the device. By pausing the SCSI bus, the
possibility of SCSI bus resets, data loss, or data
corruption is greatly diminished; in most cases, the
system will temporarily halt.
The command optionally takes one argument to specify the
device being added. The argument, a disk number, can
take any one of the following forms: cWbXtYlZ, cWtYlZ,
cWbXtY, cWtY, cWbX, and cW where W, X, Y, and Z specify
a controller, bus, target, and lun. If the bus is not
specified, but a target is provided, then it is assumed
that the bus is 0. If there is no argument, then all
controllers are searched for devices.
-i i/o_address
Use this value instead of the default starting I/O
address specified in the disk.cfg file for the device
you want to add. i/o_address should be a 3-digit
hexadecimal number on AT-bus machines, or a 3- or 4-
digit hexadecimal number on Micro-Channel ArchitectureO
machines.
-m memory_address
Use this value instead of the default starting memory
address specified in the disk.cfg file for the device
you want to add. memory_address should be a 5-digit
hexadecimal number on ISA-bus machines and Micro-Channel
ArchitectureO machines. The value 0 here implies that
the device does not use a region of memory.
-n Prevents pdiadd from prompting the user or quieting the
SCSI bus. It also allows the command to be run outside
the console.
device
This required argument specifies the new controller you
want to add. For a list of the devices supported by
your release of the UNIX System, simply execute pdiadd
without any arguments and a list will be displayed.
Copyright 1994 Novell, Inc. Page 2
pdiadd(1M) pdiadd(1M)
Return Values
Because pdiadd calls other system commands to perform system
reconfiguration, it reports all errors encountered by those
commands, then cleans up intermediate files created in the
process.
USAGE
After you run pdiadd to add a controller, you need to reboot
the system. A kernel reconfiguration will take place during
this reboot. Any configuration changes made with pdiadd will
not be reflected in the output of pdiconfig(1M) until the
current UNIX System kernel is rebuilt and the system is
rebooted. The UNIX System kernel will be rebuilt
automatically for you when you use the shutdown command to
reboot your system.
Note that pdiadd does not use the shell variable ROOT from the
user environment as its starting path. You may specify a
value for ROOT by using the -R option. The -R option should
not be used except for the special case of kernel development
in a non-root source tree.
Please note that if all you are trying to do is add a new
mass-storage device to an existing, working disk controller or
SCSI host bus adapter already installed in your UNIX System,
you do not need to use this command. Simply shutdown your
system, power it off, install the new mass-storage device and
turn your system back on. Any reconfiguration that must take
place to support your device will be automatic.
If the device you are adding is a disk device, you also need
to use the diskadd(1M) utility to setup your new disk device
and create filesystems on it. Do not attempt to run diskadd
until after you have shutdown and restarted your UNIX System.
If the device you are about to install is or requires a new
controller, you must be able to determine some of the basic
characteristics of your new controller. If you do not
understand the terms DMA channel, interrupt vector, and memory
address, please read the documentation that came with your new
device carefully. This should provide you with enough data to
successfully install your new device in the UNIX System.
pdiadd has been enhanced to provide a comprehensive
configuration editing functionality. It will allow users to
add and remove multiple HBA drivers in one session. A
Copyright 1994 Novell, Inc. Page 3
pdiadd(1M) pdiadd(1M)
pipeline editing approach manages this complex functionality
in the form of the -O and -I options. The following is an
example of how to remove an adsc driver, and add a dpt and
wd7000 driver using DMA channel 6 from the current system
configuration:
pdirm -O adsc | pdiadd -IO dpt | pdiadd -I -d 6 wd7000
Using SCSI Hot Insertion/Removal with pdiadd
Hot insertion/removal is the ability to add and remove SCSI
devices from a running system. This feature works with all
packages that access the HBA driver, including, but not
limited to, mounted file systems, the Veritas Volume Manager,
and raw device access through /dev/rdsk.
To use this feature, the HBA and target drivers must support
hot insertion/removal.
The system administrator does the following to add a device to
the system:
1. Choose a SCSI id for the device, making sure it doesn't
conflict with any on the SCSI bus. Failure to do this
correctly will crash the system. This is a hardware limitation
that cannot be addressed in software.
2. Ensure that adding the device to the system will maintain
proper SCSI bus termination. Failure to do this correctly
will crash the system. This is also a hardware limitation that
cannot be addressed in software.
It is possible to simplify this problem by never having any
termination on a device; instead use terminators attached to
the SCSI bus cable. It is recommended that the device not
provide termination power. Most devices have a jumper or
switch to disable termpower.
3. Execute /sbin/pdiadd with the -h argument. The command
takes an optional argument allowing the administrator to
specify which [controller, bus, target] the device will find.
This reduces short-term disruption of performance on the
system. pdiadd will quiet the SCSI bus and notify the user
when it is safe to add the device to the system.
4. Add the device to the system.
Copyright 1994 Novell, Inc. Page 4
pdiadd(1M) pdiadd(1M)
5. Press the RETURN key to inform pdiadd that the device has
been added and that normal SCSI bus operation may resume.
Notices
Using pdiadd without the -I option turns off non-active SCSI
devices.
If you change the hard disk configuration on your system (for
example, you add or replace a hard disk), you should create
new emergency recovery diskettes. For details, see
emergency_disk(1M) or the chapter "Recovering Your System" in
the System Owner Handbook.
REFERENCES
disk.cfg(4), diskadd(1M), idbuild(1M), idcheck(1M), pdirm(1M)
Copyright 1994 Novell, Inc. Page 5