Skip to content

Instantly share code, notes, and snippets.

@danitfk
Created February 5, 2019 12:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danitfk/ff2be15087c62eacf105d37fe05893c5 to your computer and use it in GitHub Desktop.
Save danitfk/ff2be15087c62eacf105d37fe05893c5 to your computer and use it in GitHub Desktop.
#!/bin/bash
for i in `ls /sys/class/scsi_device/`
do
echo 1 > /sys/class/scsi_device/`echo $i | sed 's|:|\:|g'`/device/rescan
done
for i in `ls /sys/class/scsi_host/`
do
echo "- - -" > /sys/class/scsi_host/$i/scan
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment