echo "- - -" > /sys/class/scsi_host/host0/scanUpdate: Tim Verhoeven has a more complete description of the re-scanning process.
Subscribe to:
Post Comments (Atom)
echo "- - -" > /sys/class/scsi_host/host0/scanUpdate: Tim Verhoeven has a more complete description of the re-scanning process.
4 comments:
Very handy, THANKS!
Cool. I'm finding that I need to leave these "Dear Google. Please index how to do this thing." posts more and more as I go through my career. Thanks for the legwork. :)
I think they're called "senior moments." :) I'll thank you, too.
I made a minor change to take out this error:
./rescan-scsi-bus.sh: line 262: return: : numeric argument required
Here is the patch diff for you :
# diff -urp rescan-scsi-bus.sh.0 rescan-scsi-bus.sh
--- rescan-scsi-bus.sh.0 2011-07-20 18:10:33.967834956 -0400
+++ rescan-scsi-bus.sh 2011-07-20 18:10:41.719834262 -0400
@@ -259,7 +259,7 @@ idlist ()
# Returns the list of existing LUNs
getluns ()
{
- if test ! -x /usr/bin/sg_luns; then return ""; fi
+ if test ! -x /usr/bin/sg_luns; then echo ""; return ; fi
sgdevice
if test -z "$SGDEV"; then return ""; fi
sg_luns -d /dev/$SGDEV | sed -n 's/.*lun=\(.*\)/\1/p'
Post a Comment