Resource icon

Disk failure LEDs for Supermicro SAS backplanes 0.3

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
I hope no one minds me waking this thread back up.
I tried the script and it didn't make the LED for the drive I took offline blink and every time the script ran it sent an email whether the drive was online or offline.
I was hoping to get some help with the script. I don't know much about scripting and I have looked the script over.
I'd like to disable the email notifications as FreeNAS sends a email notification anyhow when a pool degrades and only have it blink the RED LED of the drive in question.
I plan to put a couple drives in my system for testing and will obviously degrade that pool to see if the script works.
Any chance of getting some help?

Edit: Oh! I forgot to add that I'm using SAS3 so I changed the sas2ircu to sas3ircu within the script.
As for my prior post, apparently I was using a older version of the script which was causing problems.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Don't mind it at all, but I'm not sure much I'm going to be able to help. I suspect the issue is that the output of sas3ircu looks a little different than sas2ircu, in a way that breaks the grep statements and other logic in the script--and honestly, the script is using wizardry that I don't understand well (i.e., at all). But let's see if there's a visible difference in the output. Here's what I get on my system with sas2ircu 0 display:
Code:
LSI Corporation SAS2 IR Configuration Utility.
Version 20.00.00.00 (2014.09.18)
Copyright (c) 2008-2014 LSI Corporation. All rights reserved.

Read configuration has been initiated for controller 0
------------------------------------------------------------------------
Controller information
------------------------------------------------------------------------
  Controller type						 : SAS2308_1
  BIOS version							: 7.39.00.00
  Firmware version						: 20.00.04.00
  Channel description					 : 1 Serial Attached SCSI
  Initiator ID							: 0
  Maximum physical devices				: 255
  Concurrent commands supported		   : 8192
  Slot									: 5
  Segment								 : 0
  Bus									 : 3
  Device								  : 0
  Function								: 0
  RAID Support							: No
------------------------------------------------------------------------
IR Volume information
------------------------------------------------------------------------
------------------------------------------------------------------------
Physical device information
------------------------------------------------------------------------
Initiator at ID #0

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 0
  SAS Address							 : 5003048-0-00e5-7b8c
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 1907729/3907029167
  Manufacturer							: ATA	 
  Model Number							: WDC WD20EARX-008
  Firmware Revision					   : AB51
  Serial No							   : WDWCAZAJ685519
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 1
  SAS Address							 : 5003048-0-00e5-7b8d
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 2861588/5860533167
  Manufacturer							: ATA	 
  Model Number							: WDC WD30EFRX-68E
  Firmware Revision					   : 0A82
  Serial No							   : WDWCC4N1UH2ZFE
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 2
  SAS Address							 : 5003048-0-00e5-7b8e
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 1907729/3907029167
  Manufacturer							: ATA	 
  Model Number							: ST2000DM001-1CH1
  Firmware Revision					   : CC27
  Serial No							   : Z1E6VRKJ
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 3
  SAS Address							 : 5003048-0-00e5-7b8f
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 2861588/5860533167
  Manufacturer							: ATA	 
  Model Number							: WDC WD30EFRX-68E
  Firmware Revision					   : 0A80
  Serial No							   : WDWMC4N2493116
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 4
  SAS Address							 : 5003048-0-00e5-7b90
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 2861588/5860533167
  Manufacturer							: ATA	 
  Model Number							: WDC WD30EFRX-68E
  Firmware Revision					   : 0A80
  Serial No							   : WDWCC4N1112041
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 5
  SAS Address							 : 5003048-0-00e5-7b91
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 2861587/5860531054
  Manufacturer							: ATA	 
  Model Number							: WDC WD30EFRX-68E
  Firmware Revision					   : 0A80
  Serial No							   : WDWCC4N0985882
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 6
  SAS Address							 : 5003048-0-00e5-7b92
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 3815447/7814037167
  Manufacturer							: ATA	 
  Model Number							: WDC WD40EFRX-68W
  Firmware Revision					   : 0A82
  Serial No							   : WDWCC4E3XCP1U8
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 7
  SAS Address							 : 5003048-0-00e5-7b93
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 3815447/7814037167
  Manufacturer							: ATA	 
  Model Number							: WDC WD40EFRX-68W
  Firmware Revision					   : 0A82
  Serial No							   : WDWCC4E6TYU37L
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 8
  SAS Address							 : 5003048-0-00e5-7b94
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 3815447/7814037167
  Manufacturer							: ATA	 
  Model Number							: WDC WD40EFRX-68W
  Firmware Revision					   : 0A82
  Serial No							   : WDWCC4E6TYU28H
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 9
  SAS Address							 : 5003048-0-00e5-7b95
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 3815447/7814037167
  Manufacturer							: ATA	 
  Model Number							: WDC WD40EFRX-68W
  Firmware Revision					   : 0A82
  Serial No							   : WDWCC4E6TYUL0X
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 10
  SAS Address							 : 5003048-0-00e5-7b96
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 3815447/7814037167
  Manufacturer							: ATA	 
  Model Number							: WDC WD40EFRX-68W
  Firmware Revision					   : 0A82
  Serial No							   : WDWCC4E5EVD7P4
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 11
  SAS Address							 : 5003048-0-00e5-7b97
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 3815447/7814037167
  Manufacturer							: ATA	 
  Model Number							: WDC WD40EFRX-68W
  Firmware Revision					   : 0A82
  Serial No							   : WDWCC4E0PVTXJH
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 12
  SAS Address							 : 5003048-0-00e5-7b98
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 5723166/11721045167
  Manufacturer							: ATA	 
  Model Number							: WL6000GSA6457   
  Firmware Revision					   : RRE1
  Serial No							   : WOL240339825
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 13
  SAS Address							 : 5003048-0-00e5-7b99
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 5723166/11721045167
  Manufacturer							: ATA	 
  Model Number							: WDC WD60EFRX-68L
  Firmware Revision					   : 0A82
  Serial No							   : WDWX11DC58030A
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 14
  SAS Address							 : 5003048-0-00e5-7b9a
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 5723166/11721045167
  Manufacturer							: ATA	 
  Model Number							: ST6000VN0021-1ZA
  Firmware Revision					   : SC61
  Serial No							   : S4D0MJ2B
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 15
  SAS Address							 : 5003048-0-00e5-7b9b
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 5723166/11721045167
  Manufacturer							: ATA	 
  Model Number							: ST6000VN0021-1ZA
  Firmware Revision					   : SC61
  Serial No							   : S4D0M47P
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 16
  SAS Address							 : 5003048-0-00e5-7b9c
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 5723166/11721045167
  Manufacturer							: ATA	 
  Model Number							: WDC WD6002FFWX-6
  Firmware Revision					   : 0A83
  Serial No							   : K1H02NUD
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 17
  SAS Address							 : 5003048-0-00e5-7b9d
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 5723166/11721045167
  Manufacturer							: ATA	 
  Model Number							: WL6000GSA6457   
  Firmware Revision					   : RRE1
  Serial No							   : WOL240339829
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 22
  SAS Address							 : 5003048-0-00e5-7ba2
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 7630885/15628053167
  Manufacturer							: ATA	 
  Model Number							: WDC WD80EZAZ-11T
  Firmware Revision					   : 0A83
  Serial No							   : 1SGWHAPZ
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Enclosure services device
  Enclosure #							 : 2
  Slot #								  : 24
  SAS Address							 : 5003048-0-00e5-7bbd
  State								   : Standby (SBY)
  Manufacturer							: LSI	 
  Model Number							: SAS2X36		 
  Firmware Revision					   : 0e12
  Serial No							   : x365514180
  GUID									: N/A
  Protocol								: SAS
  Device Type							 : Enclosure services device

Device is a Enclosure services device
  Enclosure #							 : 3
  Slot #								  : 0
  SAS Address							 : 5003048-0-00bc-443d
  State								   : Standby (SBY)
  Manufacturer							: LSI	 
  Model Number							: SAS2X28		 
  Firmware Revision					   : 0e12
  Serial No							   : x365514180
  GUID									: N/A
  Protocol								: SAS
  Device Type							 : Enclosure services device
------------------------------------------------------------------------
Enclosure information
------------------------------------------------------------------------
  Enclosure#							  : 1
  Logical ID							  : 50030480:139dc800
  Numslots								: 8
  StartSlot							   : 0
  Enclosure#							  : 2
  Logical ID							  : 50030480:00e57bbf
  Numslots								: 25
  StartSlot							   : 0
  Enclosure#							  : 3
  Logical ID							  : 50030480:00bc443f
  Numslots								: 13
  StartSlot							   : 0
------------------------------------------------------------------------
SAS2IRCU: Command DISPLAY Completed Successfully.
SAS2IRCU: Utility Completed Successfully.
root@freenas2:~/.sas2ircu #

What do you get on your system with sas3ircu 0 display?
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
It looks similar, but maybe I'm not seeing where it's different?...
Code:
sas3ircu 0 display
Avago Technologies SAS3 IR Configuration Utility.
Version 16.00.00.00 (2017.04.26)
Copyright (c) 2009-2017 Avago Technologies. All rights reserved.

Read configuration has been initiated for controller 0
------------------------------------------------------------------------
Controller information
------------------------------------------------------------------------
  Controller type						 : SAS3008
  BIOS version							: 8.35.04.00
  Firmware version						: 15.00.02.00
  Channel description					 : 1 Serial Attached SCSI
  Initiator ID							: 0
  Maximum physical devices				: 1023
  Concurrent commands supported		   : 9856
  Slot									: 11
  Segment								 : 0
  Bus									 : 1
  Device								  : 0
  Function								: 0
  RAID Support							: No
------------------------------------------------------------------------
IR Volume information
------------------------------------------------------------------------
------------------------------------------------------------------------
Physical device information
------------------------------------------------------------------------
Initiator at ID #0

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 3
  SAS Address							 : 5003048-0-0036-be8f
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 3815447/7814037167
  Manufacturer							: ATA	 
  Model Number							: HGST HDN724040AL
  Firmware Revision					   : A5E0
  Serial No							   : PK2334PCKD9HLB
  Unit Serial No(VPD)					 : PK2334PCKD9HLB
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 4
  SAS Address							 : 5003048-0-0036-be90
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 3815447/7814037167
  Manufacturer							: ATA	 
  Model Number							: HGST HDN724040AL
  Firmware Revision					   : A5E0
  Serial No							   : PK2334PCKD89RB
  Unit Serial No(VPD)					 : PK2334PCKD89RB
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD

Device is a Hard disk
  Enclosure #							 : 2
  Slot #								  : 5
  SAS Address							 : 5003048-0-0036-be91
  State								   : Ready (RDY)
  Size (in MB)/(in sectors)			   : 3815447/7814037167
  Manufacturer							: ATA	 
  Model Number							: HGST HDN724040AL
  Firmware Revision					   : A5E0
  Serial No							   : PK2334PCJAX5AB
  Unit Serial No(VPD)					 : PK2334PCJAX5AB
  GUID									: N/A
  Protocol								: SATA
  Drive Type							  : SATA_HDD


Screenshot from 2018-04-30 18-50-12.png
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
It looks similar, but maybe I'm not seeing where it's different?...
Well, there's a separate "Unit Serial No" field below "Serial No." That's the only difference that jumps out at me so far, but I don't know if that's what's making the difference.
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
I'll play with it a bit more here shortly, but how do I disable the email notification every time the script runs?
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
OK, so put in a couple drives, named the pool Test, marked a drive offline via the GUI and ran the script from the command line and here's the output...
Code:
Sending email notification of degraded pool Test
Locating failed drives.
Locating:
Avago Technologies SAS3 IR Configuration Utility.
Version 16.00.00.00 (2017.04.26)
Copyright (c) 2009-2017 Avago Technologies. All rights reserved.

  sas3ircu <controller #> LOCATE <Encl:Bay> <Action> [Wait [Time]]
	where <controller #> is:
	  A controller number between 0 and 255.
	where <Encl:Bay> is:
	  A valid Enclosure and Bay pair to identify
	  the drive
	where <Action> is:
	  ON   -  turn ON the drives LED
	  OFF  -  turn OFF the drives LED
	where [Wait [Time]] is:
	  Minimum time location indicator blink for a particular drive
	  optional option, valid only for ON action
	  Time -  Waiting time between 1 to 60 seconds
	 

SAS3IRCU: Error executing command LOCATE.



The modified script replacing sas2ircu with sas3ircu is as such...
Code:
#! /usr/local/bin/bash
if [ ! "$1" ]; then
  echo "Usage: zpscan.sh pool "
  echo "Scan a pool, send email notification and activate leds of failed drives"
  exit
fi
pool="$1"
basedir="/root/.sas3ircu"
drivesfile=$basedir/drives-$pool
locsfile=$basedir/locs-$pool
if [ ! -d $basedir ]; then
  mkdir $basedir
fi
touch $drivesfile
touch $locsfile
if [ "$2" ]; then
  email="$2"
else
  email="root"
fi
condition=$(/sbin/zpool status $pool | egrep -i '(DEGRADED|FAULTED|OFFLINE|UNAVAIL|REMOVED|FAIL|DESTROYED|corrupt|ca$
if [ "${condition}" ]; then
  glabel status | awk '{print "s|"$1"|"$3"\t\t\t	  |g"}' > /tmp/glabel-lookup.sed
  emailSubject="`hostname` - ZFS pool - HEALTH fault"
  mailbody=$(zpool status $pool)
  echo "Sending email notification of degraded pool $pool"
  echo "$mailbody" | mail -s "Degraded pool $pool on `hostname`" $email
  drivelist=$(zpool status $pool | sed -f /tmp/glabel-lookup.sed | sed 's/p[0-9]//' | grep -E "(DEGRADED|FAULTED|OFF$
  echo "Locating failed drives."
  for drive in $drivelist;
  do
	record=$(grep -E "^$drive" $drivesfile)
	location=$(echo $record | cut -f 3 -d " ")
	echo Locating: $record
	sas3ircu 0 locate $location ON
	if [ ! "$(egrep $location $locsfile)" ]; then
	  echo $location >> $locsfile
	fi
  done
  rm /tmp/glabel-lookup.sed
else
  echo "Saving drive list."
  glabel status | awk '{print "s|"$1"|"$3"\t\t\t	  |g"}' > /tmp/glabel-lookup.sed
  drivelist=$(zpool status $pool  | sed -f /tmp/glabel-lookup.sed | sed 's/p[0-9]//' | grep -E $'^\t  ' | grep -vE "$
  saslist=$(sas3ircu 0 display)
  printf "" > $drivesfile
  for drive in $drivelist;
  do
	sasaddr=$(sg_vpd -i -q $drive 2>/dev/null | sed -E '2!d;s/,.*//;s/  0x//;s/([0-9a-f]{7})([0-9a-f])([0-9a-f]{4})($
	encaddr=$(echo "$saslist" | grep $sasaddr -B 2 | sed -E 'N;s/^.*: ([0-9]+)\n.*: ([0-9]+)/\1:\2/')
  echo $drive $sasaddr $encaddr >> $drivesfile
  done

  for loc in $(cat $locsfile);
  do
	sas3ircu 0 locate $loc OFF
  done
  printf "" > $locsfile
  rm /tmp/glabel-lookup.sed
fi[/CODE]
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
Maybe the script sent the email because the pool was in a resilvering state. I just ran it again with the test pool completely online, the only feedback was "Saving drive list."
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
No, I hadn't and where's that file located?
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
Well crap! Maybe I jumped the gun and didn't run the script first so a database of the drives could be built prior to removing a drive from the pool?
I just ran the script with the pool intact and then marked a drive offline and ran the script again and it worked?
Sometimes I feel like a blind man fumbling around trying to figure this stuff out.
So, it is seemingly working!
Going to test some more....
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
So I don't know why it wasn't working at first, what I did or didn't do, but it does seem to be working.
I ran the script on the functioning pool, pulled a drive, ran the script again and within about 20 seconds (or less) the red light comes on.
I put the drive back in the pool and run the script again and it turns the light off within about 20 seconds (or less).
So, sorry for seemingly wasting your time but thank you for responding!
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
Oh, I forgot this resource existed.

The other day, I was reading Advanced ZFS by Allan Jude and Michael W. Lucas and they casually drop a very significant piece of information that eluded the forum for years:

There's a generic (not tied to LSI hardware) way of controlling chassis lights. It's sesutil and it may be considerably simpler than using sas2ircu.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Very interesting. Lets you do sesutil fault da12 on, for example. We'd still need to translate gptid to disk identifier (and strip off the partition information), but this would save the step of translating that to enclosure slot. Should simplify the logic quite a bit, and maybe even make this more broadly applicable.
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
Yea it would danb35!
Good info Ericloewe.
I haven't tried it as of yet, but if the sesutil worked, it could pave the path for the FreeNAS team to put a button in the gui to allow the lighting up of the LED IF available.
That is IF it worked across platforms. That being a BIG IF.
Later when I have a chance I'll play with that utility some and see what it does.
I do believe being able to light up the red LED to be important, though I understand why the FreeNAS team is hesitant to implement it as the commands could likely change from one hardware version to another (sas2ircu and sas3ircu being a example) and from one hardware vendor to another.
But if sesutil bridges that gap, that would be pretty inspiring.
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
Interesting...
I tried "sesutil fault da4 on" and indeed it turned a fault light on but I didn't see if it was the correct one, so I tried da23 and it errored. Again Tried da11, 10 and 9 and confirmed their location with sas3util by matching the serial number and lighting up the fault light.
So sesutil works, kind of. It works on my forward (sas2-846el) plugged into my first sas port but not the rear (sas2-826el1) plugged into the second sas port.
So it seems sesutil kind of works and does accurately point out the drive when it does work. At least in this testing instance it did, though it doesn't see all my sas ports or drives.
I find it interesting that it shows 75 ports even though I currently only have 36, granted some of them are sensors, connectors, fans, ect, but that's still quite a few more ports than are physically in my server.
Here's my sesutil map output...

Code:
ses0:
   Enclosure Name: LSI SAS2X36 0e0b
   Enclosure ID: 500304800036bebf
   Element 0, Type: Array Device Slot
	   Status: Unsupported (0x00 0x00 0x00 0x00)
	   Description: Drive Slots
   Element 1, Type: Array Device Slot
	   Status: Not Installed (0x05 0x00 0x00 0x00)
	   Description: Slot 01
   Element 2, Type: Array Device Slot
	   Status: Not Installed (0x05 0x00 0x00 0x00)
	   Description: Slot 02
   Element 3, Type: Array Device Slot
	   Status: Not Installed (0x05 0x00 0x00 0x00)
	   Description: Slot 03
   Element 4, Type: Array Device Slot
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Slot 04
	   Device Names: da0,pass0
   Element 5, Type: Array Device Slot
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Slot 05
	   Device Names: da1,pass1
   Element 6, Type: Array Device Slot
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Slot 06
	   Device Names: da2,pass2
   Element 7, Type: Array Device Slot
	   Status: Not Installed (0x05 0x00 0x00 0x00)
	   Description: Slot 07
   Element 8, Type: Array Device Slot
	   Status: Not Installed (0x05 0x00 0x00 0x00)
	   Description: Slot 08
   Element 9, Type: Array Device Slot
	   Status: Not Installed (0x05 0x00 0x00 0x00)
	   Description: Slot 09
   Element 10, Type: Array Device Slot
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Slot 10
	   Device Names: da3,pass3
   Element 11, Type: Array Device Slot
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Slot 11
	   Device Names: da4,pass4
   Element 12, Type: Array Device Slot
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Slot 12
	   Device Names: da5,pass5
   Element 13, Type: Array Device Slot
	   Status: Not Installed (0x05 0x00 0x00 0x00)
	   Description: Slot 13
   Element 14, Type: Array Device Slot
	   Status: Not Installed (0x05 0x00 0x00 0x00)
	   Description: Slot 14
   Element 15, Type: Array Device Slot
	   Status: Not Installed (0x05 0x00 0x00 0x00)
	   Description: Slot 15
   Element 16, Type: Array Device Slot
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Slot 16
	   Device Names: da6,pass6
   Element 17, Type: Array Device Slot
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Slot 17
	   Device Names: da7,pass7
   Element 18, Type: Array Device Slot
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Slot 18
	   Device Names: da8,pass8
   Element 19, Type: Array Device Slot
	   Status: Not Installed (0x05 0x00 0x00 0x00)
	   Description: Slot 19
   Element 20, Type: Array Device Slot
	   Status: Not Installed (0x05 0x00 0x00 0x00)
	   Description: Slot 20
   Element 21, Type: Array Device Slot
	   Status: Not Installed (0x15 0x00 0x00 0x00)
	   Description: Slot 21
	   Extra status:
	   - Swapped
   Element 22, Type: Array Device Slot
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Slot 22
	   Device Names: da9,pass9
   Element 23, Type: Array Device Slot
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Slot 23
	   Device Names: da10,pass10
   Element 24, Type: Array Device Slot
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Slot 24
	   Device Names: da11,pass11
   Element 25, Type: Temperature Sensors
	   Status: Unsupported (0x00 0x00 0x00 0x00)
	   Description: Temperature Sensors
	   Extra status:
	   - Temperature: -reserved-
   Element 26, Type: Temperature Sensors
	   Status: OK (0x01 0x00 0x31 0x00)
	   Description: Temperature
	   Extra status:
	   - Temperature: 29 C
   Element 27, Type: Cooling
	   Status: Unsupported (0x00 0x00 0x00 0x00)
	   Description: Fans
	   Extra status:
	   - Speed: 0 rpm
   Element 28, Type: Cooling
	   Status: Not Installed (0x05 0x00 0x00 0x50)
	   Description: Fan1
	   Extra status:
	   - Speed: 0 rpm
   Element 29, Type: Cooling
	   Status: Not Installed (0x05 0x00 0x00 0x50)
	   Description: Fan2
	   Extra status:
	   - Speed: 0 rpm
   Element 30, Type: Cooling
	   Status: Not Installed (0x05 0x00 0x00 0x50)
	   Description: Fan3
	   Extra status:
	   - Speed: 0 rpm
   Element 31, Type: Cooling
	   Status: Not Available (0x07 0x00 0x00 0x10)
	   Description: JBOD_Fan1
	   Extra status:
	   - Speed: 0 rpm
   Element 32, Type: Cooling
	   Status: Not Available (0x07 0x00 0x00 0x10)
	   Description: JBOD_Fan2
	   Extra status:
	   - Speed: 0 rpm
   Element 33, Type: Voltage Sensor
	   Status: Unsupported (0x00 0x00 0x00 0x00)
	   Description: Voltage Sensors
	   Extra status:
	   - Voltage: 0.00 V
   Element 34, Type: Voltage Sensor
	   Status: OK (0x01 0x00 0x01 0xf7)
	   Description: 5V
	   Extra status:
	   - Voltage: 5.03 V
   Element 35, Type: Voltage Sensor
	   Status: OK (0x01 0x00 0x04 0x9a)
	   Description: 12V
	   Extra status:
	   - Voltage: 11.78 V
   Element 36, Type: Power Supply
	   Status: Unsupported (0x00 0x00 0x00 0x00)
	   Description: Power Supplies
   Element 37, Type: Enclosure
	   Status: Unsupported (0x00 0x00 0x00 0x00)
	   Description: Enclosure
   Element 38, Type: Enclosure
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Enclosure
   Element 39, Type: SAS Expander
	   Status: Unsupported (0x00 0x00 0x00 0x00)
	   Description: SAS Expanders
   Element 40, Type: SAS Expander
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Primary Expander
   Element 41, Type: SAS Expander
	   Status: OK (0x01 0x00 0x00 0x00)
	   Description: Secondary Expander
   Element 42, Type: SAS Connector
	   Status: Unsupported (0x00 0x00 0x00 0x00)
	   Description: SAS Connectors
   Element 43, Type: SAS Connector
	   Status: OK (0x01 0x11 0xff 0x00)
	   Description: Upstream Connector (Primary)
   Element 44, Type: SAS Connector
	   Status: OK (0x01 0x11 0xff 0x00)
	   Description: Downstream Connector 1 (Primary)
   Element 45, Type: SAS Connector
	   Status: OK (0x01 0x11 0xff 0x00)
	   Description: Downstream Connector 2 (Primary)
   Element 46, Type: SAS Connector
	   Status: OK (0x01 0x11 0xff 0x00)
	   Description: Upstream Connector (Secondary)
   Element 47, Type: SAS Connector
	   Status: OK (0x01 0x11 0xff 0x00)
	   Description: Downstream Connector 1 (Secondary)
   Element 48, Type: SAS Connector
	   Status: OK (0x01 0x11 0xff 0x00)
	   Description: Downstream Connector 2 (Secondary)
   Element 49, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 00
   Element 50, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 01
   Element 51, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 02
   Element 52, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 03
   Element 53, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 04
   Element 54, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 05
   Element 55, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 06
   Element 56, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 07
   Element 57, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 08
   Element 58, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 09
   Element 59, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 10
   Element 60, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 11
   Element 61, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 12
   Element 62, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 13
   Element 63, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 14
   Element 64, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 15
   Element 65, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 16
   Element 66, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 17
   Element 67, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 18
   Element 68, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 19
   Element 69, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 20
   Element 70, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 21
   Element 71, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 22
   Element 72, Type: SAS Connector
	   Status: OK (0x01 0x20 0x00 0x00)
	   Description: Drive Connector 23
   Element 73, Type: Communication Port
	   Status: Unsupported (0x00 0x00 0x00 0x00)
	   Description: Ethernet ports
   Element 74, Type: Communication Port
	   Status: Unsupported (0x00 0x00 0x00 0x00)
	   Description: Ethernet_port_1
   Element 75, Type: Communication Port
	   Status: Unsupported (0x00 0x00 0x00 0x00)
	   Description: Ethernet_port_2
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
So it seems sesutil kind of works and does accurately point out the drive when it does work. At least in this testing instance it did, though it doesn't see all my sas ports or drives.
I am only just beginning to look into this myself but I wanted to share what I found on my system.

Here is an excerpt from one of my log files:
Code:
Mar 17 16:27:16 Emily-NAS ses0: da17,pass19: SAS Device Slot Element: 1 Phys at Slot 23
Mar 17 16:27:16 Emily-NAS ses1: da20,pass22: SAS Device Slot Element: 1 Phys at Slot 23

When you have two backplanes, they should be ses0 and ses1 as seen above.
The command to light up a drive bay would be: sesutil fault -u /dev/ses1 23 on

In the log you see that da17 is in slot 23 of ses0 while da20 is in slot 23 of ses1

I will do more investigation on how this works, but I thought that might help.
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
Interesting. I didn't think there was more than one path for that command to light up a fault light. Then again, I still feel like a bit of a FreeBSD/Linux noob.

It's interesting that yours gave you the ses# location.
What command did you use to get that output?
I used sesutil map.

I tried sesutil map -u /dev/ses0 and received the same output as listed above but if I try sesutil map -u /dev/ses1 I receive "sesutil: No SES devices found"
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I tried sesutil map -u /dev/ses0 and received the same output as listed above but if I try sesutil map -u /dev/ses1 I receive "sesutil: No SES devices found"
My backplanes are probably different because they are Chenbro instead of Supermicro or it could be that each of them is cabled directly to the SAS HBA. I know that the SAS controller at work lists a separate ses id for each of the external drive shelves in the rack. I also know that Supermicro has had some issues with their backplanes not being properly configured from the factory.
 

Visseroth

Guru
Joined
Nov 4, 2011
Messages
546
ahhh! Now you're just showing off!!! LOL
Never heard of Chenbro!
I took a look at the link for your chassis, not pretty from the front but it looks to be well utilized space! (And better priced!)
Well makes me wonder if there's a firmware update for the backplane. Guess I'll need to look into that and it makes sense that each backplane has it's own ses ID.
Good to know about issues with the backplanes from the factory!
And my backplanes are (as well) plugged directly into the sas controller. I didn't see why I should waste the extra lanes since they currently don't have another use at this time.
Still though, I think the sesutil command brings the FreeNAS team one step closer to being able to put a button in place to light up specific drives for maintenance!
 
Top