scsiadd 1.3 - released 15 October 2000
Copyright (C) 2000 by Dirk Jagdmann <doj@cubic.org>
---------------------------------------------------------------------------
Add and remove SCSI devices from your Linux system during runtime. No need
to reboot your system, just because you have switched on an external
device.

Please be aware that this program makes important and non-trivial changes
to the kernel runtime configuration. It is possible for the kernel to crash
or corrupt data, when using this tool. If you want to be on the safe side,
reboot your system if anything in you SCSI configuration changes!
Be sure to read the paragraph after the syntax.

If you think you found a bug, please submit a bug report to the authors.
If you miss a feature, please let us know.

---------------------------------------------------------------------------
syntax: scsiadd [-a|-r] <id>
        scsiadd [-a|-r] <id> <lun>
        scsiadd [-a|-r] <host> <id> <lun>
        scsiadd [-a|-r] <host> <channel> <id> <lun>
        scsiadd -s <host>
        scsiadd -s <host> <channel>
        scsiadd -p
  parameters not given are assumed 0
  -a: add a device (default if no command given)
  -f: force
  -p: print scsi status
  -r: remove device
  -s: scan for devices

---------------------------------------------------------------------------
Some examples:

scsiadd 3                - add SCSI device with ID 3 on primary host
scsiadd -r 1             - remove SCSI device with ID 1 from primary host
scsiadd -s               - scan for new devices on primary host

scsiadd -a 1 2 13 4      - add SCSI device with ID 13 and LUN 4 on second
                           hosts(1) channel 2

scsiadd -p               - just print the scsi status

---------------------------------------------------------------------------
Scsiadd checks for a possibly dangerous situation when adding or removing
a SCSI device. A device is only added or removed if its ID is greater or
equal to the greatest currently manages ID on the designated bus.
This is important as Linux will remap the SCSI devices to the devices in
/dev when the SCSI configuration changes.

An example: Two hard disks are currently managed by the Linux SCSI system.
This corresponds to the following mapping:
  
  SCSI ID 0 -> /dev/sd0
  SCSI ID 2 -> /dev/sd1

Now we add a third drive with ID 1. The Linux kernel will remap its
devices:

  SCSI ID 0 -> /dev/sd0
  SCSI ID 1 -> /dev/sd1
  SCSI ID 2 -> /dev/sd2

You see, that the hard disk with SCSI ID 2 has changed its device (from
sd1 to sd2). As other parts of the kernel have not notices this, you are
likely to damage both disks /dev/sd1 and /dev/sd2 when reading/writing
from them!!!

Note that the checks are only valid for devices on the same SCSI bus.
The program does not behave properly on a system with more than one
bus. Please by extra careful if you are using such systems!

The same problem applies to all other classes of SCSI devices, like CDs,
scanners, tapes etc.

If you would have mounted a CD drive with ID 1 the above configuration
would not have been corrupted, although scsiadd would not have permitted
a mount.

If you really know what you are doing and want to add devices "in the middle"
you can use the "-f" switch to override the SCSI ID checks of scsiadd.

---------------------------------------------------------------------------
New version can be found on
http://llg.cubic.org/misc/scsiadd
ftp://ftp.cubic.org/pub/llg

---------------------------------------------------------------------------
Thanks to:
Douglas N. Arnold <dna@psu.edu> - wrote initial man page
Christian Jaeger <christian.jaeger@sl.ethz.ch> - various improvements
