5

I frequently expand drives on my VMs. How can I rescan the drives without rebooting the server?

11

The easiest solution is to use scsitools script rescan-scsi-bus.

sudo apt-get install scsitools
sudo rescan-scsi-bus

To do it without installing a utility on 14.04:

echo '1' > /sys/class/scsi_disk/0\:0\:0\:0/device/rescan

IMPORTANT: Be sure to replace the 0:0:0:0 with the appropriate disk for your purposes.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.