Re: [CentOS] slightly off-topic, RAID program for on-board SAS 2308-4i ?

2016-02-17 Thread John R Pierce

On 2/17/2016 11:49 AM, Zube wrote:

Any further clues appreciated.



I've only ever used 2008/2308 SAS controllers in IT 'hba' mode.

--
john r pierce, recycling bits in santa cruz

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] slightly off-topic, RAID program for on-board SAS 2308-4i ?

2016-02-17 Thread Zube
On Tue Feb 16 03:35:06 PM, John R Pierce wrote:

Thanks to both you and Mark Roth for chiming in and thank you
for the lsi-raidinfo script.

> On 2/16/2016 3:23 PM, Zube wrote:
> >Does anyone know what program can be used to query the RAID status
> >from the OS for an on-board LSI SAS 2308-4i?
> 
> the 2308 isn't actually a megaraid, 

Right, that is in agreement with both the Avago whitepaper and the
bits from the HP web site.

>  its a simple SAS HBA that has an optional raid mode IF its flashed
>  with IR firmware... this only supports raid 0/1/10.

and later ...

> the megaraid management software does support these chips in IR mode

The on-board 2308-4i has a RAID-1 set connected, configured in the BIOS 
before installing the OS.  From dmesg:

**
scsi 0:1:0:0: Direct-Access LSI  Logical Volume   3000 PQ: 0 ANSI: 6
scsi 0:1:0:0: RAID1: handle(0x0143), wwid(0x0dafbe8ecd4f4330), pd_count(2), 
type(SSP)
scsi 0:1:0:0: qdepth(128), tagged(1), simple(1), ordered(0), scsi_level(7), 
cmd_que(1)
**

So, one of these must be true:

1) The machine came from HP with the IR firmware, yet MegaCli64
does not work on the 2308-4i.  For the record, it dies because
/dev/megaraid_sas_ioctl_node is not created when MegaCli64 is run,
as it is on PowerEdge machines.

2) The machine came from HP with the IT firmware, yet there is some
way to create a RAID-1 in the BIOS with it.

3) There's something I'm missing and/or I'm completely barking mad.

Any further clues appreciated.

Cheers,
Zube
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] slightly off-topic, RAID program for on-board SAS 2308-4i ?

2016-02-16 Thread m . roth
John R Pierce wrote:
> On 2/16/2016 3:23 PM, Zube wrote:
>> Does anyone know what program can be used to query the RAID status
>> from the OS for an on-board LSI SAS 2308-4i?
>
> the 2308 isn't actually a megaraid, its a simple SAS HBA that has an
> optional raid mode IF its flashed with IR firmware... this only supports
> raid 0/1/10.  I always(!) flash these with the IT firmware that
> turns them back into a plain SAS HBA, and then use operating system
> native raid (mdraid for centos).
>
> the megaraid management software does support these chips in IR mode,
> but megacli is an awful thing to use.   i found it so awful that I
> located and tweaked a couple python scripts to make it easier to use on
> a LSI MegaRAID 9261-8i (which doesn't /have/ any IT mode)

Yes - he's *absolutely* right. This software is user-surly, except when
it's outright user-hostile. I found the same script, and use it.

   mark
>
> # lsi-raidinfo
> -- Controllers --
> -- ID | Model
> c0 | LSI MegaRAID SAS 9261-8i
>
> -- Volumes --
> -- ID | Type | Size | Status | InProgress
> volume c0u0 | RAID10 1x2 | 2727G | Optimal | None
> volume c0u1 | RAID60 1x8 | 16370G | Optimal | None
> volume c0u2 | RAID60 1x8 | 16370G | Optimal | None
>
> -- Disks --
> -- Encl:Slot | vol-span-unit | Model | Status
> disk 8:0 | 0-0-0 | Z291VTS5ST33000650NS 0003 | Online, Spun Up
> disk 8:1 | 0-0-1 | Z291VTRPST33000650NS 0003 | Online, Spun Up
> disk 8:2 | 1-0-0 | Z291VTKWST33000650NS 0003 | Online, Spun Up
> disk 8:3 | 1-0-1 | Z291VT9YST33000650NS 0003 | Online, Spun Up
> disk 8:4 | 1-0-2 | Z291VTT6ST33000650NS 0003 | Online, Spun Up
> disk 8:5 | 1-0-3 | Z291VT6CST33000650NS 0003 | Online, Spun Up
> disk 8:6 | 1-0-4 | Z291VTLAST33000650NS 0003 | Online, Spun Up
> disk 8:7 | 1-0-5 | Z291VTK1ST33000650NS 0003 | Online, Spun Up
> disk 8:8 | 1-0-6 | Z291VTNGST33000650NS 0003 | Online, Spun Up
> disk 8:9 | 1-0-7 | Z291VTRAST33000650NS 0003 | Online, Spun Up
> disk 8:10 | 2-0-0 | Z291VV05ST33000650NS 0003 | Online, Spun Up
> disk 8:11 | 2-0-1 | Z291VTW1ST33000650NS 0003 | Online, Spun Up
> disk 8:12 | 2-0-2 | Z291VTRLST33000650NS 0003 | Online, Spun Up
> disk 8:13 | 2-0-3 | Z291VTRXST33000650NS 0003 | Online, Spun Up
> disk 8:14 | 2-0-4 | Z291VSZGST33000650NS 0003 | Online, Spun Up
> disk 8:15 | 2-0-5 | Z291VSW1ST33000650NS 0003 | Online, Spun Up
> disk 8:16 | 2-0-6 | Z291VTB5ST33000650NS 0003 | Online, Spun Up
> disk 8:17 | 2-0-7 | Z291VSX8ST33000650NS 0003 | Online, Spun Up
> disk 8:18 | x-x-x | Z291VTS7ST33000650NS 0003 | Hotspare, Spun down
> disk 8:19 | x-x-x | Z291VT3HST33000650NS 0003 | Hotspare, Spun down
>
> the script that does this is here...
>
>
> # more bin/lsi-raidinfo
> #!/usr/bin/python
>
> # megaclisas-status 0.6
> # renamed lsi-raidinfo
> #
> # This program is free software; you can redistribute it and/or modify
> # it under the terms of the GNU General Public License as published by
> # the Free Software Foundation; either version 2 of the License, or
> # (at your option) any later version.
> #
> # This program is distributed in the hope that it will be useful,
> # but WITHOUT ANY WARRANTY; without even the implied warranty of
> # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> # GNU General Public License for more details.
> #
> # You should have received a copy of the GNU General Public License
> # along with Pulse 2; if not, write to the Free Software
> # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
> # MA 02110-1301, USA.
> #
> # Copyright (C) 2007-2009 Adam Cecile (Le_Vert)
>
> ## modified by johnpus...@gmail.com 08/14/11
> # fixed for LSI 9285-8e on Openfiler
>
> ## modified by pie...@hogranch.com 2012-01-05
> # fixed for newer version of megacli output on RHEL6/CentOS6
> # output format extended to show raid span-unit and rebuild % complete
>
> import os
> import re
> import sys
>
> if len(sys.argv) > 2:
>  print 'Usage: lsi-raidinfo [-d]'
>  sys.exit(1)
>
> # if argument -d, only print disk info
> printarray = True
> printcontroller = True
> if len(sys.argv) > 1:
>  if sys.argv[1] == '-d':
>  printarray = False
>  printcontroller = False
>  else:
>  print 'Usage: lsi-raidinfo [-d]'
>  sys.exit(1)
>
> # Get command output
> def getOutput(cmd):
>  output = os.popen(cmd)
>  lines = []
>  for line in output:
>  if not re.match(r'^$',line.strip()):
>  lines.append(line.strip())
>  return lines
>
> def returnControllerNumber(output):
>  for line in output:
>  if re.match(r'^Controller Count.*$',line.strip()):
>  return int(line.split(':')[1].strip().strip('.'))
>
> def returnControllerModel(output):
>  for line in output:
>  if re.match(r'^Product Name.*$',line.strip()):
>  return line.split(':')[1].strip()
>
> def returnArrayNumber(output):
>  i = 0
>  for line in output:
>  if re.match(r'^Virtual (Drive|Disk).*$',line.strip()):
>  i += 1
>   

Re: [CentOS] slightly off-topic, RAID program for on-board SAS 2308-4i ?

2016-02-16 Thread John R Pierce

On 2/16/2016 3:23 PM, Zube wrote:

Does anyone know what program can be used to query the RAID status
from the OS for an on-board LSI SAS 2308-4i?


the 2308 isn't actually a megaraid, its a simple SAS HBA that has an 
optional raid mode IF its flashed with IR firmware... this only supports 
raid 0/1/10.  I always(!) flash these with the IT firmware that 
turns them back into a plain SAS HBA, and then use operating system 
native raid (mdraid for centos).


the megaraid management software does support these chips in IR mode, 
but megacli is an awful thing to use.   i found it so awful that I 
located and tweaked a couple python scripts to make it easier to use on 
a LSI MegaRAID 9261-8i (which doesn't /have/ any IT mode)


# lsi-raidinfo
-- Controllers --
-- ID | Model
c0 | LSI MegaRAID SAS 9261-8i

-- Volumes --
-- ID | Type | Size | Status | InProgress
volume c0u0 | RAID10 1x2 | 2727G | Optimal | None
volume c0u1 | RAID60 1x8 | 16370G | Optimal | None
volume c0u2 | RAID60 1x8 | 16370G | Optimal | None

-- Disks --
-- Encl:Slot | vol-span-unit | Model | Status
disk 8:0 | 0-0-0 | Z291VTS5ST33000650NS 0003 | Online, Spun Up
disk 8:1 | 0-0-1 | Z291VTRPST33000650NS 0003 | Online, Spun Up
disk 8:2 | 1-0-0 | Z291VTKWST33000650NS 0003 | Online, Spun Up
disk 8:3 | 1-0-1 | Z291VT9YST33000650NS 0003 | Online, Spun Up
disk 8:4 | 1-0-2 | Z291VTT6ST33000650NS 0003 | Online, Spun Up
disk 8:5 | 1-0-3 | Z291VT6CST33000650NS 0003 | Online, Spun Up
disk 8:6 | 1-0-4 | Z291VTLAST33000650NS 0003 | Online, Spun Up
disk 8:7 | 1-0-5 | Z291VTK1ST33000650NS 0003 | Online, Spun Up
disk 8:8 | 1-0-6 | Z291VTNGST33000650NS 0003 | Online, Spun Up
disk 8:9 | 1-0-7 | Z291VTRAST33000650NS 0003 | Online, Spun Up
disk 8:10 | 2-0-0 | Z291VV05ST33000650NS 0003 | Online, Spun Up
disk 8:11 | 2-0-1 | Z291VTW1ST33000650NS 0003 | Online, Spun Up
disk 8:12 | 2-0-2 | Z291VTRLST33000650NS 0003 | Online, Spun Up
disk 8:13 | 2-0-3 | Z291VTRXST33000650NS 0003 | Online, Spun Up
disk 8:14 | 2-0-4 | Z291VSZGST33000650NS 0003 | Online, Spun Up
disk 8:15 | 2-0-5 | Z291VSW1ST33000650NS 0003 | Online, Spun Up
disk 8:16 | 2-0-6 | Z291VTB5ST33000650NS 0003 | Online, Spun Up
disk 8:17 | 2-0-7 | Z291VSX8ST33000650NS 0003 | Online, Spun Up
disk 8:18 | x-x-x | Z291VTS7ST33000650NS 0003 | Hotspare, Spun down
disk 8:19 | x-x-x | Z291VT3HST33000650NS 0003 | Hotspare, Spun down

the script that does this is here...


# more bin/lsi-raidinfo
#!/usr/bin/python

# megaclisas-status 0.6
# renamed lsi-raidinfo
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Pulse 2; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301, USA.
#
# Copyright (C) 2007-2009 Adam Cecile (Le_Vert)

## modified by johnpus...@gmail.com 08/14/11
# fixed for LSI 9285-8e on Openfiler

## modified by pie...@hogranch.com 2012-01-05
# fixed for newer version of megacli output on RHEL6/CentOS6
# output format extended to show raid span-unit and rebuild % complete

import os
import re
import sys

if len(sys.argv) > 2:
print 'Usage: lsi-raidinfo [-d]'
sys.exit(1)

# if argument -d, only print disk info
printarray = True
printcontroller = True
if len(sys.argv) > 1:
if sys.argv[1] == '-d':
printarray = False
printcontroller = False
else:
print 'Usage: lsi-raidinfo [-d]'
sys.exit(1)

# Get command output
def getOutput(cmd):
output = os.popen(cmd)
lines = []
for line in output:
if not re.match(r'^$',line.strip()):
lines.append(line.strip())
return lines

def returnControllerNumber(output):
for line in output:
if re.match(r'^Controller Count.*$',line.strip()):
return int(line.split(':')[1].strip().strip('.'))

def returnControllerModel(output):
for line in output:
if re.match(r'^Product Name.*$',line.strip()):
return line.split(':')[1].strip()

def returnArrayNumber(output):
i = 0
for line in output:
if re.match(r'^Virtual (Drive|Disk).*$',line.strip()):
i += 1
return i

def returnArrayInfo(output,controllerid,arrayid):
id = 'c'+str(controllerid)+'u'+str(arrayid)
# print 'DEBUG: id = '+str(id)
operationlinennumber = False
linenumber = 0
units = 1
type = 'JBOD'
span = 0
size = 0
for line in output:
if re.match(r'^RAID Level.*$',line.strip()):
type = line.strip().split(':')[1].strip()
type = 'RAID' + 

[CentOS] slightly off-topic, RAID program for on-board SAS 2308-4i ?

2016-02-16 Thread Zube
Does anyone know what program can be used to query the RAID status
from the OS for an on-board LSI SAS 2308-4i?

On this page:

http://docs.avagotech.com/docs/12351997

there is a curious note on the left that reads:

"Integrated MegaRAID support available upon request"

After one mostly fruitless round of chatting with LSI/Avago/Broadcom
and one completely fruitless round of chatting with HP, I found 
confirmation under the storage section here:

http://www8.hp.com/us/en/mpc/workstations/product-detail.html?oid=5225041#!tab=specs

It looks like HP didn't "request" MegaRAID support, so MegaCli and
StorCli don't see anything and neither does lsiutils (nor hpacucli,
tried just for a laugh).

Any clues appreciated. Thanks for your time.

Cheers,
Zube
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos