HBA LSI SAS 9211-4i で MegaRAID Storage Manager が使えない。

IMG_20180217_175023_815

※写真と本文は関係ありません。


結果

HBA LSI SAS 9211-4iには MegaRAID Storage Manager は使えないけど、sas2ircu コマンドが使える。

経緯

よく使ってたRaidカード(LSI Megaraid 9240-4i)も古くなって、買えない(買えても高い、新しい機種も高い)とオンプレ環境のRaid化、予算的に難しくなった。
安くRaidを構築しようと思って、Host Bus AdapterのIR (Integrated RAID) を使ってみた。ほぼRaid1で構築(小規模ファイルサーバなのでノンホットプラグでOK、たまにHot Spareを追加する)、機能的には十分。

HBA LSI SAS 9211-4i これ。並行輸入品で13,000円くらい。国内の販売店で買うと30,000円くらいする。

Storage ManagerのReadmeを見ると、このアダプタ使えそうだけど使えない。(対応カードに 9211-8i/4i-R specとあるけど R じゃないとダメなのかな)
とりあえず Storage Manager インストールしてコマンド実行。(vivaldiframeworkd Daemonもちゃんと動かしてある)

# /usr/local/MegaRAID\ Storage\ Manager/StorCLI/storcli64 show 
Status Code = 0
Status = Success
Description = None

Number of Controllers = 0
Host Name = aiueo-k18.localdomain
Operating System  = Linux3.10.0-693.21.1.el7.x86_64

こんな感じでコントローラをを認識しない。
OSはインストール済みで、kernelのドライバで普通にインストールできた。(Raid biosでRaid1を設定)
OSからは認識されている。

# lspci | grep -i lsi
03:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS2004 PCI-Express Fusion-MPT SAS-2 [Spitfire] (rev 03)

この結果でググると sas2ircu コマンドというのがある事がわかった。
broadcomのサポートサイトで検索
Search results for ‘sas2ircu

これが新しそう。 [ZIP] SAS2IRCU_P20 DATE: 05/06/2016

このzipには各OSのコマンド(バイナリ)が入ってる。必要なのは
SAS2IRCU_P20/sas2ircu_linux_x86_rel/sas2ircu

/usr/local/sbin にコピーして実行。

# sas2ircu 0  STATUS
LSI Corporation SAS2 IR Configuration Utility.
Version 20.00.00.00 (2014.09.18) 
Copyright (c) 2008-2014 LSI Corporation. All rights reserved. 

Background command progress status for controller 0...
IR Volume 1
  Volume ID                               : 286
  Current operation                       : None
  Volume status                           : Enabled
  Volume state                            : Optimal
  Volume wwid                             : 05586ea77aa97d87
  Physical disk I/Os                      : Not quiesced
SAS2IRCU: Command STATUS Completed Successfully.
SAS2IRCU: Utility Completed Successfully.

こんな感じで IR の Volume state : Optimal が取得できる。

Storage ManagerはGUIがあって便利で高機能(リモートのRaidカードもネットワーク越しに管理出来る)なのでとてもいいけどコマンドラインでも十分。

この辺にLSI Fusion-MPT SAS-2 の情報がある。
LSIFusionMPTSAS2 – HWraid

3. Management and reporting tools
There's no opensource tool for theses new cards. 
However, LSI provides a command line management tool named sas2ircu. Management features are really basic, so it's better to use it as a reporting tool only.

Nagios監視したいのでこれを使った。
check_sas2ircu – Nagios Exchange
GitHub – fasrc/sas2ircu: RPM spec file for sas2ircu : LSI Corporation SAS2 IR (Integrated RAID) Configuration Utility

cronで監視するスクリプトもあったので利用させてもらう。(定期的に実行したコマンドの結果で差分があったらメールするスクリプト、他にも流用できそう)
Linux – RAID Monitor – LSI Fusion-MPT SAS-2


Raid Optimal状態→HDD取り外し→Rebuilding 中のコマンド実行結果を貼っておく。

正常(Raid Optimal)な時のコマンドの結果。(HDD 2台 で Raid1 を構築)

[root@aiue-k18 ~]# sas2ircu 0 status
LSI Corporation SAS2 IR Configuration Utility.
Version 20.00.00.00 (2014.09.18) 
Copyright (c) 2008-2014 LSI Corporation. All rights reserved. 

Background command progress status for controller 0...
IR Volume 1
  Volume ID                               : 286
  Current operation                       : None
  Volume status                           : Enabled
  Volume state                            : Optimal
  Volume wwid                             : 05586ea77aa97d87
  Physical disk I/Os                      : Not quiesced
SAS2IRCU: Command STATUS Completed Successfully.
SAS2IRCU: Utility Completed Successfully.

[root@aiue-k18 ~]# sas2ircu 0 display
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                         : SAS2004
  BIOS version                            : 7.21.00.00
  Firmware version                        : 11.00.00.00
  Channel description                     : 1 Serial Attached SCSI
  Initiator ID                            : 0
  Maximum physical devices                : 255
  Concurrent commands supported           : 2000
  Slot                                    : 4
  Segment                                 : 0
  Bus                                     : 3
  Device                                  : 0
  Function                                : 0
  RAID Support                            : Yes
------------------------------------------------------------------------
IR Volume information
------------------------------------------------------------------------
IR volume 1
  Volume ID                               : 286
  Status of volume                        : Okay (OKY)
  Volume wwid                             : 05586ea77aa97d87
  RAID level                              : RAID1
  Size (in MB)                            : 1906394
  Physical hard disks                     :
  PHY[0] Enclosure#/Slot#                 : 1:2
  PHY[1] Enclosure#/Slot#                 : 1:3
------------------------------------------------------------------------
Physical device information
------------------------------------------------------------------------
Initiator at ID #0

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 2
  SAS Address                             : 4433221-1-0200-0000
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 1907729/3907029167
  Manufacturer                            : ATA     
  Model Number                            : ST2000DM006-2DM1
  Firmware Revision                       : CC26
  Serial No                               : Z4ZALGHH
  GUID                                    : 5000c500b03b76b3
  Protocol                                : SATA
  Drive Type                              : SATA_HDD

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 3
  SAS Address                             : 4433221-1-0300-0000
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 1907729/3907029167
  Manufacturer                            : ATA     
  Model Number                            : ST2000DM006-2DM1
  Firmware Revision                       : CC26
  Serial No                               : Z4ZAGXFE
  GUID                                    : 5000c500b0064422
  Protocol                                : SATA
  Drive Type                              : SATA_HDD
------------------------------------------------------------------------
Enclosure information
------------------------------------------------------------------------
  Enclosure#                              : 1
  Logical ID                              : 500062b0:00290ca8
  Numslots                                : 8
  StartSlot                               : 0
------------------------------------------------------------------------
SAS2IRCU: Command DISPLAY Completed Successfully.
SAS2IRCU: Utility Completed Successfully.

Slot # : 3 のHDD取り外し後

[root@aiue-k18 ~]# sas2ircu 0 status
LSI Corporation SAS2 IR Configuration Utility.
Version 20.00.00.00 (2014.09.18) 
Copyright (c) 2008-2014 LSI Corporation. All rights reserved. 

Background command progress status for controller 0...
IR Volume 1
  Volume ID                               : 286
  Current operation                       : None
  Volume status                           : Enabled
  Volume state                            : Degraded
  Volume wwid                             : 05586ea77aa97d87
  Physical disk I/Os                      : Not quiesced
SAS2IRCU: Command STATUS Completed Successfully.
SAS2IRCU: Utility Completed Successfully.

[root@aiue-k18 ~]# sas2ircu 0 display
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                         : SAS2004
  BIOS version                            : 7.21.00.00
  Firmware version                        : 11.00.00.00
  Channel description                     : 1 Serial Attached SCSI
  Initiator ID                            : 0
  Maximum physical devices                : 255
  Concurrent commands supported           : 2000
  Slot                                    : 4
  Segment                                 : 0
  Bus                                     : 3
  Device                                  : 0
  Function                                : 0
  RAID Support                            : Yes
------------------------------------------------------------------------
IR Volume information
------------------------------------------------------------------------
IR volume 1
  Volume ID                               : 286
  Status of volume                        : Degraded (DGD)
  Volume wwid                             : 05586ea77aa97d87
  RAID level                              : RAID1
  Size (in MB)                            : 1906394
  Physical hard disks                     :
  PHY[0] Enclosure#/Slot#                 : 1:2
  PHY[1] Enclosure#/Slot#                 : 0:0
------------------------------------------------------------------------
Physical device information
------------------------------------------------------------------------
Initiator at ID #0

Device is a Hard disk
  Enclosure #                             : 0
  Slot #                                  : 0
  SAS Address                             : 0000000-0-0000-0000
  State                                   : Missing (MIS)
  Manufacturer                            : 
  Model Number                            : 
  Firmware Revision                       : 
  Serial No                               : Z4ZAGXFE
  GUID                                    : N/A
  Drive Type                              : Undetermined

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 2
  SAS Address                             : 4433221-1-0200-0000
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 1907729/3907029167
  Manufacturer                            : ATA     
  Model Number                            : ST2000DM006-2DM1
  Firmware Revision                       : CC26
  Serial No                               : Z4ZALGHH
  GUID                                    : 5000c500b03b76b3
  Protocol                                : SATA
  Drive Type                              : SATA_HDD
------------------------------------------------------------------------
Enclosure information
------------------------------------------------------------------------
  Enclosure#                              : 1
  Logical ID                              : 500062b0:00290ca8
  Numslots                                : 8
  StartSlot                               : 0
------------------------------------------------------------------------
SAS2IRCU: Command DISPLAY Completed Successfully.
SAS2IRCU: Utility Completed Successfully.

Slot # : 3 のHDD取り付け
Rebuild 中は『sas2ircu 0 status』コマンドで進捗(Percentage complete)を確認できる。

[root@aiue-k18 ~]# sas2ircu 0 status
IR Volume 1
  Volume state                            : Degraded
  Percentage complete                     : 2.79%

[root@aiue-k18 ~]# sas2ircu 0 status
LSI Corporation SAS2 IR Configuration Utility.
Version 20.00.00.00 (2014.09.18) 
Copyright (c) 2008-2014 LSI Corporation. All rights reserved. 

Background command progress status for controller 0...
IR Volume 1
  Volume ID                               : 286
  Current operation                       : Synchronize
  Volume status                           : Enabled
  Volume state                            : Degraded
  Volume wwid                             : 05586ea77aa97d87
  Physical disk I/Os                      : Not quiesced
  Volume size (in sectors)                : 3904294912
  Number of remaining sectors             : 3795360768
  Percentage complete                     : 2.79%
SAS2IRCU: Command STATUS Completed Successfully.
SAS2IRCU: Utility Completed Successfully.
[root@aiue-k18 ~]# sas2ircu 0 display
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                         : SAS2004
  BIOS version                            : 7.21.00.00
  Firmware version                        : 11.00.00.00
  Channel description                     : 1 Serial Attached SCSI
  Initiator ID                            : 0
  Maximum physical devices                : 255
  Concurrent commands supported           : 2000
  Slot                                    : 4
  Segment                                 : 0
  Bus                                     : 3
  Device                                  : 0
  Function                                : 0
  RAID Support                            : Yes
------------------------------------------------------------------------
IR Volume information
------------------------------------------------------------------------
IR volume 1
  Volume ID                               : 286
  Status of volume                        : Degraded (DGD)
  Volume wwid                             : 05586ea77aa97d87
  RAID level                              : RAID1
  Size (in MB)                            : 1906394
  Physical hard disks                     :
  PHY[0] Enclosure#/Slot#                 : 1:2
  PHY[1] Enclosure#/Slot#                 : 1:3
------------------------------------------------------------------------
Physical device information
------------------------------------------------------------------------
Initiator at ID #0

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 2
  SAS Address                             : 4433221-1-0200-0000
  State                                   : Optimal (OPT)
  Size (in MB)/(in sectors)               : 1907729/3907029167
  Manufacturer                            : ATA     
  Model Number                            : ST2000DM006-2DM1
  Firmware Revision                       : CC26
  Serial No                               : Z4ZALGHH
  GUID                                    : 5000c500b03b76b3
  Protocol                                : SATA
  Drive Type                              : SATA_HDD

Device is a Hard disk
  Enclosure #                             : 1
  Slot #                                  : 3
  SAS Address                             : 4433221-1-0300-0000
  State                                   : Rebuilding (RBLD)
  Size (in MB)/(in sectors)               : 1907729/3907029167
  Manufacturer                            : ATA     
  Model Number                            : ST2000DM006-2DM1
  Firmware Revision                       : CC26
  Serial No                               : Z4ZAGXFE
  GUID                                    : 5000c500b0064422
  Protocol                                : SATA
  Drive Type                              : SATA_HDD
------------------------------------------------------------------------
Enclosure information
------------------------------------------------------------------------
  Enclosure#                              : 1
  Logical ID                              : 500062b0:00290ca8
  Numslots                                : 8
  StartSlot                               : 0
------------------------------------------------------------------------
SAS2IRCU: Command DISPLAY Completed Successfully.
SAS2IRCU: Utility Completed Successfully.

サーバ電源切ってHDDつなぎなおすと、勝手にRebuildが始まる。コマンドでは特に操作不要でした。
2TBでだいたい10時間くらいかかる。