Re-identify the disk device

After adding a disk to the virtual machine, you don’t need to restart it. Use the following command to re-identify the disk device and you can see the newly added disk:

#查看有哪些总线
ls /sys/class/scsi_host/host*/scan		

#写入---即可
echo "- - -" > /sys/class/scsi_host/host0/scan
echo "- - -" > /sys/class/scsi_host/host1/scan
echo "- - -" > /sys/class/scsi_host/host2/scan

lsblk 即可看到新加的磁盘

Guess you like

Origin blog.csdn.net/MssGuo/article/details/131172851