1

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.

3
  • 1
    See communities.vmware.com/thread/492752 Commented Oct 25, 2017 at 19:36
  • Wow, that's exactly what I was looking for! Commented Oct 25, 2017 at 19:43
  • 1
    Post the solution and accept it since this could help others as well. Commented Oct 25, 2017 at 19:57

1 Answer 1

0

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

communities.vmware.com/thread/492752

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.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.