不重启Linux系统重新扫描新增磁盘

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

ls /sys/class/scsi_device/
echo 1 > /sys/class/scsi_device/0\:0\:0\:0/device/rescan 
echo 1 > /sys/class/scsi_device/2\:0\:0\:0/device/rescan
Logo

更多推荐