Meaning behind target ID in the output of camcontrol and MegaCli

Polytropon freebsd at edvax.de
Sat Dec 5 00:21:03 UTC 2015


On Fri, 4 Dec 2015 22:29:28 +0000 (UTC), Pallav Bose via freebsd-questions wrote:
> My understanding is that the target ID links a disk in a particular
> slot on a particular adapter to its device name. This can be gathered
> from the MegaCli configuration output above and the camcontrol output
> below. MegaCli gives us the 3-tuple [adapter,slot,target ID] and
> camcontrol gives us the 3-tuple [adapter,target ID,device name]. So,
> I now know what device name does a physical disk (configured as a
> RAID 0) in a particular slot on a particular adapter map to.

The numbering B:T:L (or B:T:U) is typical regarding how SCSI
enumerates devices. B is the bus number, T the target number
(the device on that bus), and L is the LUN (logical unit number)
depending on the device, which can have more than one "unit"
(slot, drive, whatever).

In ye olden times one SCSI bus could have up to 8 devices,
numbered 0 - 6, and 7 being the controller itself. The number
of a device ("target") usually was configured via jumpers on
that device.

Today, ATA and SATA, as well as other mass storage means, have
adopted CAM ("SCSI language"), so some terminology is still
being used. But device enumeration isn't coded in hardware
anymore. Modern SCSI BIOSs typically do that in firmware.

See this for example:

% camcontrol devlist
<HL-DT-ST DVDRAM GSA-H42N RL00>    at scbus0 target 0 lun 0 (pass0,cd0)
<Generic Flash HS-CF 4.55>         at scbus3 target 0 lun 0 (da0,pass1)
<Generic Flash HS-MS/SD 4.55>      at scbus3 target 0 lun 1 (da1,pass2)
<Generic Flash HS-SM 4.55>         at scbus3 target 0 lun 2 (da2,pass3)

As you can see, there are a bus 0 and bus 3, each with only one
device, but target 3:0 has three LUNs.

In your case, it's a lot easier:

> # camcontrol devlist
> <DELL PERC H730 Mini 4.25>         at scbus0 target 0 lun 0 (pass0,da0)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 1 lun 0 (pass1,da1)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 2 lun 0 (pass2,da2)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 3 lun 0 (pass3,da3)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 4 lun 0 (pass4,da4)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 5 lun 0 (pass5,da5)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 6 lun 0 (pass6,da6)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 7 lun 0 (pass7,da7)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 8 lun 0 (pass8,da8)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 9 lun 0 (pass9,da9)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 10 lun 0 (pass10,da10)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 11 lun 0 (pass11,da11)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 12 lun 0 (pass12,da12)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 13 lun 0 (pass13,da13)
> <DELL PERC H730 Mini 4.25>         at scbus0 target 14 lun 0 (pass14,da14)
> <DELL PERC H830 Adp 4.25>          at scbus2 target 0 lun 0 (pass15,da15)
> <DELL PERC H830 Adp 4.25>          at scbus2 target 1 lun 0 (pass16,da16)
> <Kingston DataTraveler 3.0 PMAP>   at scbus4 target 0 lun 0 (da17,pass17)

Bus 0 with 15 targets, each with one LUN, and bus 2 with two of
them. They represent two "SCSI adapters", each one representing
a disk as a _single_ target (with one LUN). It could have been
a different setup, for example, one target per four disks with
LUNs 0 - 3...



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list