On 03/01/2017 08:31 AM, Stefan G. Weichinger wrote:
> Am 2017-03-01 um 16:49 schrieb Daniel Frey:
> 
>>> Have you tried `lsblk -O`?
>>>
>>> Dan
>>>
>>
>> Well, I forgot how much info that barfs out.
>>
>> Try `lsblk -o name,model,serial` instead.
> 
> nice one, thanks.
> But the shown serials don't match the serials on the disk(s) :-(
> 
> I also tried "-O" and searched for them.
> 
> It seems that the controller adds some extra layer or something.
> The vendor is shown as "ICP" (wrong in a way), I see partitions and so
> (looks good).
> 
> I have a list containing the actual vendors/serials on the physical
> labels, and the order in the physical slots, plus which label matches
> which /dev/sgX
> 
> *but* the map between sg- and sd-devices isn't correct IMO.
> 
> This is really a pita because I never can tell exactly which physical
> disk failed, I only see "ah, sdi1 was kicked out of the array" but then
> the search starts ....
> 
> 

I'm not sure how the sg? -> sd? mapping is supposed to work. I find it
odd that there seems to be two nodes reported for each sd? entry.
However, this could be the way the controller driver reports it to the
kernel...

> 07:01.0 SCSI storage controller: LSI Logic / Symbios Logic 53c1030
> PCI-X Fusion-MPT Dual Ultra320 SCSI (rev 08)
> 0a:0e.0 RAID bus controller: Adaptec AAC-RAID
>

Well, if you are using a hw raid card in jbod mode the controller will
generally not report that info. You'd have to install the controller's
cli management tools and use that. You'd have to figure out which
controller your drives are attached to.

Adaptec uses sys-block/arcconf
LSI uses sys-block/megacli
3ware uses sys-block/tw_cli

An example of my 3ware card in my home server:

//<hostname>> /c4 show drivestatus

VPort Status         Unit Size      Type  Phy Encl-Slot    Model
------------------------------------------------------------------------------
p0    OK             u0   931.51 GB SATA  0   -            WDC
WD1003FBYX-01Y7
p1    OK             u0   931.51 GB SATA  1   -            WDC
WD1003FBYX-01Y7
p2    OK             u0   931.51 GB SATA  2   -            WDC
WD1003FBYX-01Y7
p3    OK             u0   931.51 GB SATA  3   -            WDC
WD1003FBYX-01Y7
p4    OK             u0   931.51 GB SATA  4   -            WDC
WD1003FBYX-01Y7
p5    OK             u0   931.51 GB SATA  5   -            WDC
WD1003FBYX-01Y7
p6    OK             u0   931.51 GB SATA  6   -            WDC
WD1003FBYX-01Y7
p7    OK             u0   931.51 GB SATA  7   -            WDC
WD1003FBYX-01Y7

I can also pick a drive and get stats:
//<hostname>> /c4/p0 show model
/c4/p0 Model = WDC WD1003FBYX-01Y7B1

//<hostname>> /c4/p0 show serial
/c4/p0 Serial = WD-WMAW31350107

The management tools for the other cards should provide this sort of
functionality.

If you had used the raid card to create an array the management cli
tools with show that a specific port is dead and you query it for the
serial number.

This doesn't help you with the sg mapping. The problem for you now will
be figuring out why sg_map is reporting the way it is.

Dan


Reply via email to