Here is a few tips I’ve learned with VMWare virtual machines hosting Ubuntu 12.04 / 14.04.
How to refresh an upgraded disk
If you want to resize a disk at runtime, go to your VM preferences and update your disk size. Now, how to refresh the state of the disk in the virtual machine without rebooting it?
For each disk in your VM, there is a related directory in the /sys/class/scsi_devices directory. Use the following command to rescan your disk capacity:
$ echo 1 > /sys/class/scsi_device/DISK/device/rescan
How to refresh new disk
If you want to add another disk at runtime, go to your VM preferences and add a new disk. Now, how to refresh the system so it can see the new disk without rebooting the VM?
Basically, you just need to rescan the SCSI bus to which the storages are connected.
The following commands assume you have root access on the system.
Find your host bus number
$ grep mpt /sys/class/scsi_host/host?/proc_name
This will return a line like the following:
Where host0 is the relevant bus number.
Rescan the SCSI bus
$ echo "- - -" > /sys/class/scsi_host/host0/scan