Wednesday, December 9, 2009

Quick tip: Scanning scsi bus (Linux) to add new hard drive on VMware and Citrix Xen

Probably this is not a hot topic, however I regularly go through the trouble of adding more disk space to VMs on any of the VM environments (VMWare and Citrix Xen). You would think it should not be different however it is quite different depending on the Hypervisor or Linux flavor.

For Citrix Xen, it is very simple you only create the disk and attached to the VM and finally you can run fdisk and create partitions. It is like magic, however as soon as you add the disk you can detached until you poweroff the VM.

For VMWare, it is not that simple you can create the disk and added to the VM , however the VM is not detecting the new disk, that's because the VM requires to scan de scsi bus to detect new devices.

There are different ways to do that however that depends of the Linux OS that you are running.

For Red Hat, or Centos, you can force the scan, this blog can show you how http://misterd77.blogspot.com/2007/12/how-to-scan-scsi-bus-with-26-kernel.html

For Ubuntu , forcing the scan using the procedures for Centos does not work ...so I decided to take a look and I have found this utility that can help you http://www.garloff.de/kurt/linux/scsidev/

This rescan utility it is also valid for any type of linux OS so try it ...

No comments:

Post a Comment