From owner-freebsd-questions@freebsd.org Fri Dec 4 22:34:45 2015 Return-Path: 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 36596A400AB for ; Fri, 4 Dec 2015 22:34:45 +0000 (UTC) (envelope-from pallav_bose@yahoo.com) Received: from nm38-vm5.bullet.mail.gq1.yahoo.com (nm38-vm5.bullet.mail.gq1.yahoo.com [98.136.217.76]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 019FF19E7 for ; Fri, 4 Dec 2015 22:34:44 +0000 (UTC) (envelope-from pallav_bose@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1449268357; bh=kNU+aPhk//Iq05cny4CKxqPbvKNBum5pIVb96RP7NV0=; h=Date:From:Reply-To:To:Subject:References:From:Subject; b=JP8wrNQGQkprv0v3MV7tRNWtvGwdNnjFLIyBWlBVJ/jIcDbc/AYAcEYFq3ODhb+D6lTbC/OtSD206ZQar9YceVFMTBn2ylUAXq+0J5TRuZoJ5foyRlfbBksKF0Zcdi5Llk/+vy1SfUxwSXYBiCTf2rslHj1c+qPSxE3k/xgfkM+FHGiUu34bOLjz1qpeinhDCxaLL32RllsuV5uWyq0whmgQP9PrJ/9CljQwMbKsB6aSWDXfSf89WVrgVsaMArM4UuZ4eekoPGAduItNDTMNMKirhdWng7Ui3J1ZE9VFrT1hpgHm+KxEhz8nSFUinV7Pfe5UWM/ruQnMgTyV23uYZA== Received: from [127.0.0.1] by nm38.bullet.mail.gq1.yahoo.com with NNFMP; 04 Dec 2015 22:32:37 -0000 Received: from [98.137.12.190] by nm38.bullet.mail.gq1.yahoo.com with NNFMP; 04 Dec 2015 22:29:37 -0000 Received: from [98.137.12.199] by tm11.bullet.mail.gq1.yahoo.com with NNFMP; 04 Dec 2015 22:29:37 -0000 Received: from [127.0.0.1] by omp1007.mail.gq1.yahoo.com with NNFMP; 04 Dec 2015 22:29:37 -0000 X-Yahoo-Newman-Property: ymail-4 X-Yahoo-Newman-Id: 772998.74613.bm@omp1007.mail.gq1.yahoo.com X-YMail-OSG: vF7TzXwVM1nWH0ybhE6rz3uazEaz4DQ4na.9N0SniaW0g4WZeBvssbuFSe6QYAL CgDygWcbLJGaqM.6cYL0OGBNyuo8vlpxgOIN.CZVL6GeVJZ_k3dcfZc0OzYyOKM_R.cMZF.Qe824 YMS1FPvIw_Iu.yP.frQiJI2yjpjpVjBgDkVrgKwgzPCCyHFg1sQO2YtZ7CvmU_MsOGxBDxXMYM_2 FD2JHaNyyggSZy.Xr4Yk2qJDEWOuHDsZCKtnym5kg8tFKMZkG6.ZxHL9ycYSSCjH9I4VYFbci2pi tJXrRuvxTVul_pxW82FWQhLzzj8jiqJQT3wf7rNIprzQhwv1_Lkr6vopYFSCb7T2zVRG7hqa3sbw kdIMFR5buE6fLjb_uUgSccIBUGJwp4mkTHQ.4m3GdVgsC9wzzyIDjmm7KUe.sJ1UfJJlZwltHF9r SKuMCQDGinRz8WCHam0IPP95.PVJ1OL6ZOl6IvJxYIokIwZZxZeuRPXgTGFLQJK2oRyaLrkHEMBw mrc_qW6tV_CwXHZ4JCdsW.g-- Received: by 216.39.60.207; Fri, 04 Dec 2015 22:29:37 +0000 Date: Fri, 4 Dec 2015 22:29:28 +0000 (UTC) From: Pallav Bose Reply-To: Pallav Bose To: "freebsd-questions@freebsd.org" Message-ID: <714512716.14770398.1449268168021.JavaMail.yahoo@mail.yahoo.com> Subject: Meaning behind target ID in the output of camcontrol and MegaCli MIME-Version: 1.0 References: <714512716.14770398.1449268168021.JavaMail.yahoo.ref@mail.yahoo.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Dec 2015 22:34:45 -0000 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 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 0 lun 0 (pass0,da0) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 1 lun 0 (pass1,da1) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 2 lun 0 (pass2,da2) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 3 lun 0 (pass3,da3) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 4 lun 0 (pass4,da4) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 5 lun 0 (pass5,da5) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 6 lun 0 (pass6,da6) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 7 lun 0 (pass7,da7) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 8 lun 0 (pass8,da8) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 9 lun 0 (pass9,da9) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 10 lun 0 (pass10,da10) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 11 lun 0 (pass11,da11) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 12 lun 0 (pass12,da12) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 13 lun 0 (pass13,da13) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 = at scbus0 target 14 lun 0 (pass14,da14) =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) =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) =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: 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 ; 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 ; 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 To: Pallav Bose 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 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 at scbus0 target 0 lun 0 (pass0,cd0) at scbus3 target 0 lun 0 (da0,pass1) at scbus3 target 0 lun 1 (da1,pass2) 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 > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 0 lun= 0 (pass0,da0) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 1 lun= 0 (pass1,da1) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 2 lun= 0 (pass2,da2) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 3 lun= 0 (pass3,da3) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 4 lun= 0 (pass4,da4) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 5 lun= 0 (pass5,da5) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 6 lun= 0 (pass6,da6) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 7 lun= 0 (pass7,da7) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 8 lun= 0 (pass8,da8) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 9 lun= 0 (pass9,da9) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 10 lu= n 0 (pass10,da10) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 11 lu= n 0 (pass11,da11) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 12 lu= n 0 (pass12,da12) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 13 lu= n 0 (pass13,da13) > =A0=A0=A0=A0=A0=A0=A0=A0 at scbus0 target 14 lu= n 0 (pass14,da14) > =A0=A0=A0=A0=A0=A0=A0=A0=A0 at scbus2 target 0 l= un 0 (pass15,da15) > =A0=A0=A0=A0=A0=A0=A0=A0=A0 at scbus2 target 1 l= un 0 (pass16,da16) > =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, ...