Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Dec 2015 22:29:28 +0000 (UTC)
From:      Pallav Bose <pallav_bose@yahoo.com>
To:        "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org>
Subject:   Meaning behind target ID in the output of camcontrol and MegaCli
Message-ID:  <714512716.14770398.1449268168021.JavaMail.yahoo@mail.yahoo.com>
References:  <714512716.14770398.1449268168021.JavaMail.yahoo.ref@mail.yahoo.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

I have a Dell PowerEdge R730 with a PERC H730 and a PERC H830. The H730 is =
connected to 15 disks and the H830 to two disks, with a RAID 0 configuratio=
n created out of each disk. The mrsas(4) driver is attached to each RAID co=
ntroller.

# MegaCli cfgdsply aall | grep -e Slot -e Target -e RAID -e Adapter
Adapter: 0

Product Name: PERC H730 Mini

Virtual Drive: 0 (Target Id: 0)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 0
Virtual Drive: 1 (Target Id: 1)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 1
Virtual Drive: 2 (Target Id: 2)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 2
Virtual Drive: 3 (Target Id: 3)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 3
Virtual Drive: 4 (Target Id: 4)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 4
Virtual Drive: 5 (Target Id: 5)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 5
Virtual Drive: 6 (Target Id: 6)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 6
Virtual Drive: 7 (Target Id: 7)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 7
Virtual Drive: 8 (Target Id: 8)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 8
Virtual Drive: 9 (Target Id: 9)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 9
Virtual Drive: 10 (Target Id: 10)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 10
Virtual Drive: 11 (Target Id: 11)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 11
Virtual Drive: 12 (Target Id: 12)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 12
Virtual Drive: 13 (Target Id: 13)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 13
Virtual Drive: 14 (Target Id: 14)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 14

Adapter: 1

Product Name: PERC H830 Adapter

Virtual Drive: 0 (Target Id: 0)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 0
Virtual Drive: 1 (Target Id: 1)
RAID Level=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 : Primary-=
0, Secondary-0, RAID Level Qualifier-0
Slot Number: 1

How is the target ID determined? Where is this information stored? Under wh=
at circumstances can it change?

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 Meg=
aCli configuration output above and the camcontrol output below. MegaCli gi=
ves us the 3-tuple [adapter,slot,target ID] and camcontrol gives us the 3-t=
uple [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 particul=
ar adapter map to.

Is my understanding correct?

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

I haven't tried any other configuration apart from RAID 0.

Regards,Pallav
From owner-freebsd-questions@freebsd.org  Sat Dec  5 00:21:03 2015
Return-Path: <owner-freebsd-questions@freebsd.org>
Delivered-To: freebsd-questions@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 454A0A4154B
 for <freebsd-questions@mailman.ysv.freebsd.org>;
 Sat,  5 Dec 2015 00:21:03 +0000 (UTC)
 (envelope-from freebsd@edvax.de)
Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id B104419B6
 for <freebsd-questions@freebsd.org>; Sat,  5 Dec 2015 00:21:01 +0000 (UTC)
 (envelope-from freebsd@edvax.de)
Received: from r56.edvax.de (port-92-195-76-245.dynamic.qsc.de [92.195.76.245])
 (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx02.qsc.de (Postfix) with ESMTPS id E2886278F3;
 Sat,  5 Dec 2015 01:20:52 +0100 (CET)
Received: from r56.edvax.de (localhost [127.0.0.1])
 by r56.edvax.de (8.14.5/8.14.5) with SMTP id tB50KqNh002047;
 Sat, 5 Dec 2015 01:20:52 +0100 (CET) (envelope-from freebsd@edvax.de)
Date: Sat, 5 Dec 2015 01:20:52 +0100
From: Polytropon <freebsd@edvax.de>
To: Pallav Bose <pallav_bose@yahoo.com>
Cc: freebsd-questions@freebsd.org
Subject: Re: Meaning behind target ID in the output of camcontrol and MegaCli
Message-Id: <20151205012052.77256a47.freebsd@edvax.de>
In-Reply-To: <714512716.14770398.1449268168021.JavaMail.yahoo@mail.yahoo.com>
References: <714512716.14770398.1449268168021.JavaMail.yahoo.ref@mail.yahoo.com>
 <714512716.14770398.1449268168021.JavaMail.yahoo@mail.yahoo.com>
Reply-To: Polytropon <freebsd@edvax.de>
Organization: EDVAX
X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2)
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions/>;
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
 <mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Sat, 05 Dec 2015 00:21:03 -0000

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

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



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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?714512716.14770398.1449268168021.JavaMail.yahoo>