VMware
VMware ESX Server 2.1
Features | Documentation | Knowledge Base | Discussion Forums

previous Prev   Contents   Last   Next next

Determining SCSI Target IDs

Determining SCSI Target IDs

In order to assign SCSI disks to a virtual machine, you need to know which controller the drive is on and what the SCSI target ID of the controller is. This section helps you determine these values without opening your computer and physically looking at the SCSI target ID settings on the drives.

SCSI disks may be accessed by local SCSI adapters, or on a SAN by Fibre Channel adapters. Therefore, whenever we describe SCSI adapters in this section, these descriptions also apply to Fibre Channel adapters, even though they are not explicitly mentioned.

On a standard Linux system, or for a VMware service console that has SCSI or Fibre Channel (FC) controllers assigned to the service console rather than the VMkernel, information on attached SCSI devices, including SCSI target IDs is available in the boot log (usually /var/log/messages), or from examining /proc/scsi/scsi.

Information about the SCSI controllers assigned to the VMkernel and about the devices attached to these controllers is available in the /proc/vmware/scsi directory once the VMkernel and the VMkernel device module(s) for the SCSI controller(s) have been loaded.

Each entry in the /proc/vmware/scsi directory corresponds to a SCSI controller assigned to the VMkernel. For example, assume you issued a vmkload_mod command with the base name vmhba and a single SCSI controller was found.

To identify the controller, type this command:

ls -l /proc/vmware/scsi

The output of the ls command is:

total 0
dr-xr-xr-x 2 root    root       0 Jun 22 12:44 vmhba0

Each SCSI controller's subdirectory contains entries for the SCSI devices on that controller, numbered by SCSI target ID and LUN (logical unit number). Run cat on each target ID:LUN pair to get information about the device with that target ID and LUN. For example, type this command:

cat /proc/vmware/scsi/vmhba0/1:0

The following information is displayed:

Vendor: SEAGATE Model: ST39103LW Rev: 0002
Type: Direct-Access ANSI SCSI revision: 02
Size: 8683 Mbytes
Queue Depth: 28

Partition Info:
Block size: 512
Num Blocks: 17783240

     num: Start     Size Type
     4:   1  17526914 fb

Partition 0:
    VM 11
    Commands 2
    Kbytes read 0
    Kbytes written 0
    Commands aborted 0
    Bus resets 0
Partition 4:
    Commands 336
    Kbytes read 857
    Kbytes written 488
    Commands aborted 0
    Bus resets 0

This information should help you determine the SCSI target ID to use in the storage configuration page, as displayed by the VMware Management Interface. See Configuring Storage: Disk Partitions and File Systems.

previous Prev   Contents   Last   Next next