hot-add disk in oracle enterprise linux 5.5

Hi all,

I have an Oracle Enterprise Linux 5.5 server which is a virtual guest on a vSphere host.

I have provisioned 500GB disk space from SAN. I then migrated the VM from a 200GB disk onto the new 500GB disk. I then increased the disk space allocated to the VMware to the maximum size of 500GB which all went without a problem.

I am having an issue where i want to make the Linux kernel see the extra provisioned space.

when i try to run the following command which should rescan the scsi disks it doesnt seem to run the scan:

echo "- - -" > /sys/class/scsi_host/scan

it just returns to the prompt and when i do an ls -l the scan file appears to just be wiped out, not even that it replaced the contents with - - -.

So i rebooted the box and it saw the extra disk and the scan file returned to the original size of 4096.

My question is, i currently have 9 Linux servers and will have about 20 by the time i finish building the rest, hot-adding disk would be very useful but could anyone give me some advice on how to do it, or what i did wrong with the scan file?

Cheers,
Tom

Another option would be to find the script (open sourced) rescan_scsi_bus.sh

that will do what you need.

Unfortunately that did not do what i need. This scan's for new devices, as its not a new device its just an extension of an existing device it doesn't find anything.

I need something that will see that there is extra disk space available.

Disk /dev/sda: 139.5 GB, 139586437120 bytes
255 heads, 63 sectors/track, 16970 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          25      200781   83  Linux
/dev/sda2              26       10468    83883397+  8e  Linux LVM
/dev/sda3           10469       15690    41945715   8e  Linux LVM

As you can see, it thinks there is only 1 available disk of size 139.5GB, if i increase the size of the disk space by 5GB on the Virtual Host i want fdisk to be able to see that without a reboot.

I have also tried creating a new partition to see if it knows to update to the last cyclinder instead of the 139.5GB end cyclinder, but this didnt work either.

can i manually edit or is there a command to edit one of the /proc files or a /dev file?

Oh, what about the resize2fs commands?

I misread what you were doing. I thought you were moving drives.

i thing without reboot u cont get it

just a try
run kudzu and check it

I had a look at those but they are only for file system sizing.

class: HD
bus: SCSI
detached: 0
device: sda
desc: "VMware Virtual disk"
host: 0
id: 0
channel: 0
lun: 0

It shows the hardware device /dev/sda but it doesnt seem to pick up on the allocated size at all.

Thanks for the effort but i will keep looking and if i find anything will let you know, or if you do happen to think of anything else its always worth a try.

Does this help?

unfortunately no, my fdisk -l command is not showing the increased allocated space until i reboot. I want to force the kernel to see the extra space allocated on /dev/sda without having any downtime.