Today I added 1GB of extra space to a virtual disk (basically extended it) in esxi VM. I followed 2 approaches to get the new space recognized:

  1. echo "- - -" > /sys/class/scsi_host/host2/scan
  2. echo 1 > /sys/class/scsi_disk/2:0:1:0/device/rescan

First approach din't work, second one worked.

Any thoughts?

I haven't read documentation in the kernel source tree, that might have what I want.


As "val0x00ff" shared the link containing exact answer already:


Once you've changed the disk's size in VMware and did not reboot your server, rescan your SCSI devices as such. First, check the name(s) of your scsi devices.

$ ls /sys/class/scsi_device/

Then rescan the scsi bus. Below you can replace the '0:0:0:0′ with the actual scsi bus name found with the previous command. Each colon is prefixed with a slash, which is what makes it look weird.

$ echo 1 > /sys/class/scsi_device/0:0:0:0/device/rescan

That will rescan the current scsi bus and the disk size that has changed will show up.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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