Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a CentOS 5 VM and I've just increased the VM disk from 10G to 20G, but I cannot get fdisk to see the new disk size without a reboot.

I've tried echo 1 > /sys/block/sda/device/rescan, it seems to indicate it can see the new size, but when I go to fdisk to create a new partion it still sees the disk as 10G.

Any ideas?

share|improve this question
Depending on your virtualisation platform and storage method, this may or may not be possible. Details matter. –  womble Aug 31 '11 at 9:47
Which virtual disk type you've added: IDE or SCSI? –  quanta Aug 31 '11 at 9:48

3 Answers 3

up vote 2 down vote accepted

You need to issue the rescan command to your SCSI bus.

In VMware the SCSI controller might be found in some unusual place. First find it:

find /sys -iname 'scan'

For me that returned


Then just issue the rescan command

echo "- - -" >/sys/devices/pci0000:00/0000:00:07.1/host0/scsi_host/host0/scan
echo "- - -" >/sys/devices/pci0000:00/0000:00:07.1/host0/scsi_host/host1/scan
echo "- - -" >/sys/devices/pci0000:00/0000:00:10.0/host0/scsi_host/host2/scan

That should help. :)

share|improve this answer
ls /sys/class/scsi_host maybe faster. –  quanta Aug 31 '11 at 9:52

If the partition table is directly in use (e.g. you have mounted filesystem using a base partition) the kernel will continue to use the old partition table until this is no longer the case. Someone once told me that if you are using LVM you can get around this....

share|improve this answer

You have to reboot, there's no way around that.

share|improve this answer
How about the force system to rescan? –  quanta Aug 31 '11 at 9:50
I did have to reboot :-( –  AndyM Sep 9 '11 at 12:10

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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