Scsi-Bus scannen
Jan-Benedict Glaw
jbglaw at lug-owl.de
Mon Aug 23 17:53:25 CEST 1999
On Mon, Aug 23, 1999 at 05:48:48PM +0200, Martin Krueger wrote:
>
> Hallo
> Wie kann ich unter Linux den Scsi-Bus scannen,
> ohne auf den naechsten Systemstart zu warten?
Willst Du neuscannen, oder einfach nur wissen, was angeschlossen ist?
Du kannst unter /proc/scsi/* nachgucken. Wenn es um ein neuangeschlossenes
Gerät ist, kannst Du Dir das einfach anzeigen lassen, indem Du cdrecord mit
-scanbus startest. Um das Gerät einzutragen (sodaß Du beispielsweise auf eine
im laufenden Betrieb zugesteckte SCSI-Platte zugreifen kannst), kannst Du
so vorgehen (SCSI-HowTo):
---------------
4.3.1. Dynamically insert and remove SCSI devices
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.
------------------------
MfG, JBG
--
Fehler eingestehen, Größe zeigen: Nehmt die Rechtschreibreform zurück!!!
More information about the Linux
mailing list