Saturday, June 13, 2015

Rescan-scsi-bus and slow DVD drives

For reasons that fail my, my internal SATA DVD drive is very seldom seen by the kernel at startup. My guess is that it takes very long to start, and the kernel doesn't wait that long before deciding that it had all SCSI devices, so it misses it. It's actually very annoying, since you can't use the drive at all. After digging around, I finally stumbled on the rescan-scsi-bus tool from the scsitools package. Running (as root, of course)
~ rescan-scsi-bus -w -l
(sometimes two or three times) is enough to get the device back up, with the /dev/dvd udev symlink.

Hope this'll help !

1 comment:

Anonymous said...

You can also just write "- - -" to /sys/class/scsi_host/host[nr]/scan, e.g.

echo '- - -' > /sys/class/scsi_host/host2/scan

or fancier,

for i in /sys/class/scsi_host/host*/scan; do
  echo '- - -' > $i