Subject: Re: Polling SCSI bus
From: Nathan A. McQuillen (nm@steaky.dhs.org)
Date: Mon Nov 05 2001 - 13:39:50 MST
OK, so: haven't tried it yet (not at home) but here's the info., from the
SCSI-programming-HOWTO-4, for the edification of all concerned:
______
If a newer kernel and the /proc file system is running, a non-busy device
can be removed and installed 'on the fly'.
To remove a SCSI device:
echo "scsi remove-single-device a b c d" > /proc/scsi/scsi
and similar, to add a SCSI device, do
echo "scsi add-single-device a b c d" > /proc/scsi/scsi
where
a == hostadapter id (first one being 0)
b == SCSI channel on hostadapter (first one being 0)
c == ID
d == LUN (first one being 0)
So in order to swap the /dev/sgc and /dev/sgd mappings from the previous
example, we could do
echo "scsi remove-single-device 0 0 4 0" > /proc/scsi/scsi
echo "scsi remove-single-device 0 0 5 0" > /proc/scsi/scsi
echo "scsi add-single-device 0 0 5 0" > /proc/scsi/scsi
echo "scsi add-single-device 0 0 4 0" > /proc/scsi/scsi
since generic devices are mapped in the order of their insertion.
When adding more devices to the scsi bus keep in mind there are limited
spare entries for new devices. The memory has been allocated at boot time
and has room for 2 more devices.
__
So -- progress reports forthcoming.
- N2
This archive was generated by hypermail 2a24 : Mon Nov 05 2001 - 13:51:54 MST