Manipulating SCSI devices in the kernel
source link: https://arrfab.net/posts/2007/Jun/15/manipulating-scsi-devices-in-the-kernel/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
You've added a scsi disk on a controller and you don't want to restart linux to scan the scsi bus ? Tell the kernel directly that a new scsi device was added .
The previous method was to use the echo command talking to /proc/scsi/scsi : For example , we've added a scsi disk on the first scsi controller (0), on the first channel (0), with a scsi id 4 (4) and on LUN 0 (0) : echo "scsi add-single-device 0 0 4 0" > /proc/scsi/scsi
Now (better and updated solution) : echo "- - -" > /sys/class/scsi_host/host0/scan
Check with cat /proc/scsi/scsi that you're able to see the device and use the disk without having to reboot ....
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK