Adding a new disk to a linux server without rebooting

This is most useful when using virtualisation platforms such as VMware, Hyper-V etc. When you have added your new disk to your Linux server from your Host, simply run the below command to pick up the new disk without restarting.

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

You can now use fdisk to view the new disk and partition as required:

fdisk -l

Any comments or questions? Get in touch here or Email me at [email protected]