public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: "Lars Täuber" <taeuber@bbaw.de>
Cc: linux-scsi@vger.kernel.org
Subject: Re: MPTSAS: ("activate status led" | "find disc") in external enclosure
Date: Mon, 21 Apr 2008 10:16:45 -0500	[thread overview]
Message-ID: <1208791005.3640.10.camel@localhost.localdomain> (raw)
In-Reply-To: <20080421110148.1918485e.taeuber@bbaw.de>

On Mon, 2008-04-21 at 11:01 +0200, Lars Täuber wrote:
> Hi James,
> 
> James Bottomley <James.Bottomley@HansenPartnership.com> schrieb:
> > On Fri, 2008-04-18 at 12:41 +0200, Lars Täuber wrote:
> > > Is there a standard way to lit the led in the enclosure with linux means or anything alike?
> > > The enclosure does not tell the serial numbers of the included disc.
> > > The HBA is an LSI SAS 3801X.
> > 
> > It depends on whether you have the HBA configured in RAID mode or not.
> > If you have, then it takes absolute control of the enclosure management
> > at the moment and I don't think you can get to it.
> 
> our HBA has no RAID option.
> 
> > If you run the HBA as a pure SAS one, then the promise website says this
> > enclosure is ses2 compliant, so you should just be able to insert the
> > ses module and have enclosure management (2.6.24+ kernels).  This relies
> > on the HBA exposing the enclosure device, but I think mptsas only eats
> > it for RAID configurations.

> I tried 2.6.24.5 but the ses seems to be introduced in 2.6.25.

OK ... it's hard for me to keep track of what went when.  It must have
gone in after 2.6.24 in the merge window.
 
> > to see what's in the enclosure, just do
> > 
> > ls /sys/class/enclosure/*/
> 
> # ls /sys/class/enclosure/*/
> /sys/class/enclosure/6:0:16:0/:
> 0  10  12  14  2  4  6  8  components  subsystem
> 1  11  13  15  3  5  7  9  device      uevent
> 
> /sys/class/enclosure/6:0:33:0/:
> 0  10  12  14  2  4  6  8  components  subsystem
> 1  11  13  15  3  5  7  9  device      uevent
> 
> This is two times the same enclosure.

That's unusual .. to have two devices managing the same enclosure, but
if you only have 16 slots and not 32, I suppose it must be so.  I'd also
guess the enclosure information doesn't provide slot names, so ses
automatically provided the numbering.

I have a 12 slot vitesse enclosure with two enclosure devices but they
each manage half the slots:

/sys/class/enclosure/0:0:1:0/:
components  power/     SLOT 007/  SLOT 009/  SLOT 011/   uevent
device@     SLOT 006/  SLOT 008/  SLOT 010/  subsystem@

/sys/class/enclosure/0:0:3:0/:
components  power/     SLOT 001/  SLOT 003/  SLOT 005/   uevent
device@     SLOT 000/  SLOT 002/  SLOT 004/  subsystem@

> > each of the subdirectories has a slot label (name taken from SES) to
> > locate the enclosure, just echo 1 to the locate file and it will flash
> > the lights.  If it has a disk, there should be a device link in the slot
> > directory (might not be, this depends on ses working correctly and VPD
> > inquiries identifying the right disk).
> 
> monosan:/sys/class/enclosure/6:0:16:0/0 # ls -l
> insgesamt 0
> -rw-r--r-- 1 root root 4096 21. Apr 10:48 active
> -rw-r--r-- 1 root root 4096 21. Apr 10:48 fault
> -rw-r--r-- 1 root root 4096 21. Apr 10:48 locate
> -rw-r--r-- 1 root root 4096 21. Apr 10:48 status
> lrwxrwxrwx 1 root root    0 21. Apr 10:46 subsystem -> ../../../enclosure_component
> -r--r--r-- 1 root root 4096 21. Apr 10:48 type
> --w------- 1 root root 4096 21. Apr 10:48 uevent
> 
> There seems to be no device link if I understood you correctly.
> Is the subdirctory numbering somehow in relation to the SCSI ID?

No ... the subdirectory numbering is taken from the enclosure
information (if available)... it should be the slot numbers of the
enclosure.  If the slot is populated a device link should appear (this
is the tricky bit because the ses driver uses VPD inquiries to match up
the reported disk, assuming the enclosure reports it, to the actual one.
These work for SAS disks, but not for SATA ones).  Empty slots have no
device link (but you can still flash the lights using the files).

If you look at my enclosure, I only have two devices:

sparkweed:~# ls -l /sys/class/enclosure/*/*/device
lrwxrwxrwx 1 root root 0 2008-04-21 10:16 /sys/class/enclosure/0:0:1:0/SLOT 006/device -> ../../../../../../../port-0:0:0/end_device-0:0:0/target0:0:0/0:0:0:0
lrwxrwxrwx 1 root root 0 2008-04-21 10:16 /sys/class/enclosure/0:0:3:0/SLOT 001/device -> ../../../../../../../port-0:1:11/end_device-0:1:11/target0:0:2/0:0:2:0

James


James


> Thanks
> Lars
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2008-04-21 15:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-18 10:41 MPTSAS: ("activate status led" | "find disc") in external enclosure Lars Täuber
2008-04-18 14:29 ` James Bottomley
2008-04-21  9:01   ` Lars Täuber
2008-04-21 15:16     ` James Bottomley [this message]
2008-04-22  7:18       ` Lars Täuber
2008-04-22 15:44         ` Moore, Eric
2008-04-23  8:11           ` Lars Täuber
2008-04-23 15:39             ` Moore, Eric
2008-04-22 16:12         ` James Bottomley
2008-04-23  7:55           ` Lars Täuber

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1208791005.3640.10.camel@localhost.localdomain \
    --to=james.bottomley@hansenpartnership.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=taeuber@bbaw.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox