Scan SCSI bus for new drive

less than 1 minute read

Recently when adding a new disk to a VM, a colleague of mine suggested a new trick.

“You don’t have to reboot”, he said, “just do this!”

for BUS in /sys/class/scsi_host/host*/scan
> do
>    echo "- - -" >  ${BUS}
> done

Now you can go about fdisk and formatting your disk.