Add a new HDD to a VM without rebooting on Ubuntu server

Firstly, install scsitools package:

sudo apt install scsitools

Then run the command rescan-scsi-bus:

sudo rescan-scsi-bus

That’s it, your new virtual HDD has now been detected.

Another way would be to do it with a loop and without the need for that package:

for host in ls /sys/class/scsi_host/; do
echo "- - -" > /sys/class/scsi_host/${host}/scan;



About SoCRaT

Systems Engineer, OSS & Linux Geek
This entry was posted in Linux and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s