动态添加硬盘
作者:互联网
方法1
1.ls /sys/class/scsi_host
host0 host1 host2 #有几个host就执行几步echo
2.echo "- - -" > /sys/class/scsi_host/host0/scan
3.echo "- - -" > /sys/class/scsi_host/host1/scan
4.echo "- - -" > /sys/class/scsi_host/host2/scan
fdisk -l
方法2
1.cat /proc/scsi/scsi
2.echo "scsi add-single-device 0 0 X 0" > /proc/scsi/scsi # X是上一步结果id加1
标签:echo,sys,host,添加,host1,scsi,动态,class,硬盘 来源: https://www.cnblogs.com/sylhong/p/11255370.html