How to Rescan SCSI Disk Without Reboot in Linux?

[root@test ~]# ls -l /sys/class/scsi_host
total 0
drwxr-xr-x 2 root root 0 Apr 15 11:00 host0
drwxr-xr-x 2 root root 0 Apr 15 11:00 host1
drwxr-xr-x 2 root root 0 Apr 15 11:00 host2
drwxr-xr-x 2 root root 0 Apr 15 11:00 host3
drwxr-xr-x 2 root root 0 Apr 15 11:00 host4


echo "- - -" > /sys/class/scsi_host/host0/scan
echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/host2/scan
echo "- - -" > /sys/class/scsi_host/host3/scan
echo "- - -" > /sys/class/scsi_host/host4/scan

 

PS.
"- - -" means scan for channel, SCSI target ID, and LUN which are specified in wildcards format.

 

arrow
arrow
    全站熱搜

    DanBrother 發表在 痞客邦 留言(0) 人氣()