Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

I had to deal with a similar problem, on a SLES 11 server. The LVM was built with raw disks, running on VMWare ESXi

# pvcreate /dev/sdd; vgextend ....

After a while I needed to increase LVM size, but I didn't add a supplemental disk and then pvcreate + vgextend as I've done before, but I chose to increase the size of an existing disk (/dev/sdd in this case). After doing the increase in VMWare, I executed a


But pvdisplay was still showing the 'old' disk size. It was necessary to do a

# echo 1 > /sys/block/sdd/device/rescan

for the kernel to learn the new disk size of /dev/sdd

share|improve this answer
echo 1 > /sys/block/sda/device/rescan worked for me on CentOS – Benedikt Köppel Apr 30 at 19:37

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
I had to reboot too. – ondra Jun 13 at 8:12

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.