This can get hard fast, because you're somewhat relying on the kernel
to always identify the controllers and ports in the same order.  It
may not.  [The cynic in me says you are probably going to get
completely f*cked by this at some point - and lose data.  Particularly
if you don't already have a whitelist or something of disks that THOU
SHALT NOT format... because things can change so easily.  PCI timings
change, controllers swap IDs, bla bla bla.... I trust nothing.]

google SES, scsi enclosure services

You'll want something that supports it correctly, and understands the
topology of whatever controllers and slots are present.  This is
incredibly machine dependent.

[We went through quite a bit of pain when I was at Joyent a couple
years ago to make this very thing sane, on machines built for us by
SuperMicro and Redapt -- to the extent that the SKU in use is
explicitly supported by SmartOS.]

In Solaris-derivative-land, fmtopo and FMA/hotplug (fault management)
know how/where all this stuff works, if you've got a machine with a
proper and supported map available.

--e


On Thu, Apr 9, 2015 at 1:32 PM, Michael Tiernan
<[email protected]> wrote:
> On 4/8/15 4:00 PM, John Stoffel wrote:
>>> lspci | grep MPT
>> 02:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2008 
>> PCI-Express Fusion-MPT )
>>
>>> lsscsi -v | grep 02:00.0
>>   dir: /sys/bus/scsi/devices/0:0:0:0  
>> [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por]
>>   dir: /sys/bus/scsi/devices/0:0:1:0  
>> [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por]
>>   dir: /sys/bus/scsi/devices/0:0:2:0  
>> [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por]
>>   dir: /sys/bus/scsi/devices/0:0:3:0  
>> [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por]
>>   dir: /sys/bus/scsi/devices/0:0:4:0  
>> [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por]
>>   dir: /sys/bus/scsi/devices/0:0:5:0  
>> [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por]
>>   dir: /sys/bus/scsi/devices/0:0:6:0  
>> [/sys/devices/pci0000:00/0000:00:02.0/0000:02:00.0/host0/por]
> This is some of the stuff I've achieved so far. The part that I'm now
> trying to determine is that slot 0 (in your case devices/0:0:0:0 will
> always be the zero entry there.
>
> --
>   << MCT >> Michael C Tiernan. http://www.linkedin.com/in/mtiernan
>   Non Impediti Ratione Cogatationis
>   Women and cats will do as they please, and men and dogs
>    should relax and get used to the idea. -Robert A. Heinlein
>
> _______________________________________________
> Discuss mailing list
> [email protected]
> https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss
> This list provided by the League of Professional System Administrators
>  http://lopsa.org/
_______________________________________________
Discuss mailing list
[email protected]
https://lists.lopsa.org/cgi-bin/mailman/listinfo/discuss
This list provided by the League of Professional System Administrators
 http://lopsa.org/

Reply via email to