2016年10月4日 星期二

SCSI Bus Rescan

SCSI Bus rescan
但是一些 SCSI Control Card已經是很久以前的
但 SCSI Device ID 變更, Linux 會還是記著, 不會釋放


只能斷電重新開機或是使用 SCSI bus Delete 指令

1:
 #  echo "- - -" > /sys/class/scsi_host/hostX/scan
  hostX:  0 to n

  #  echo "- - -" > /sys/class/scsi_host/host0/scan
  #  echo "- - -" > /sys/class/scsi_host/host6/scan

 # lsscsi

 # cat /proc/scsi/scsi



2:
 # echo "1" > /sys/class/block/sdX/device/rescan
  sdX:  A to n
  # echo "1" > /sys/class/block/sdb/device/rescan
  # echo "1" > /sys/class/block/sdc/device/rescan


3:
  # echo "1" > /sys/class/scsi_device/6:0:1:0/device/rescan
    6:0:1:0  => Host 6,  ID 1


4:
 # apt-get install scsitools
 # rescan-scsi-bus
 # lsscsi


5:  SCSI bus Delete
echo 1 > /sys/bus/scsi/drivers/sd/6\:0\:6\:0/delete



//========================
lsscsi Source Code
 http://sg.danny.cz/scsi/lsscsi.html
 https://github.com/hreinecke/lsscsi





沒有留言:

張貼留言