やりたいこと
- アマゾンで新品で手に入るLSI 9211-8I互換RAIDカードを使う
- レガシーBIOS非対応、UEFIオンリーのマザーボードで使う
- ハードウェアRAIDモードで使う
- SSD2枚でRAID1を組む
- その上にProxmoxを乗せる
デバイスの入手
・10GtekのMiniSASタイプのボードを買った
10Gtek Internal PCI Express SAS/SATA HBA RAID Controller Card、8ポート6Gb /s、LSI SAS2008ボード(チップ)実装、LSI 9211-8I相当
オプションブートROMからの設定
結論から言えば、UEFIのみのマザーボードでは設定できなかった。
ファームやBIOS書き換えも試したが、結局無理という結論。
ネット上には、IRファームというRAID機能を殺したファームが存在し、それを入れる記事などもあったが、今回は関係ないので省略。
結局のところ、RAID領域にOSを入れるには適当なOSを入れて設定したあとに入れなおすしかないっぽい。
sas2ircu
のZIPファイルを見たらsas2ircu.efi
というファイルが見えたので、OSを入れなくともefi shell
みたいな環境で構成できるかも(未検証)
管理ソフトウェア
このボードは、sas2ircu
という管理ツールを使う。
以下からダウンロードできる
-
https://www.broadcom.com/support/download-search
検索条件は
Product Group:Legacy Products
Product Family: Legacy Host Bus Adapters
Product Name:9211
そうするとManagement Software and Toolsの欄にSAS2IRCUというのがあるのでダウンロードする
このツールについて日本語での解説記事があまりないのだけれど、以下を発見
また、それほど難しくはないのでコマンドヘルプでも代用可能
sas2ircu
について
長いので各見出しを展開して表示してください。
HELP
root@pve:~# sas2ircu
LSI Corporation SAS2 IR Configuration Utility.
Version 20.00.00.00 (2014.09.18)
Copyright (c) 2008-2014 LSI Corporation. All rights reserved.
SAS2IRCU: No command specified.
sas2ircu <controller #> <command> <parameters> ...
where <controller #> is:
Number between 0 and 255
where <command> is:
DISPLAY - display controller, volume and physical device info
LIST - Lists all available LSI adapters (does not need ctlr #>
CREATE - create an IR volume
DELETE - Delete entire RAID configuration on the selected controller
DELETEVOLUME - Delete a specific RAID Volume on the selected controller
HOTSPARE - make drive a hot spare
STATUS - display current volume status info
SETOFFLINE - set the physical disk to OFFLINE state
SETONLINE - set the physical disk to ONLINE state
CONSTCHK - Start Consistency Check operation on the specified IR Volume
ACTIVATE - Activate an Inactive IR volume
LOCATE - Locate a disk drive on an enclosure
LOGIR - Upload or Clear IR Log data
BOOTIR - Select an IR Boot Volume as primary boot device
BOOTENCL - Select an Enclosure/Bay as primary boot device
ALTBOOTIR - Select an IR Boot Volume as alternate boot device
ALTBOOTENCL - Select an Enclosure/Bay as alternate boot device
HELP - Display help information
where <parameters> are:
Command specific values; enter "sas2ircu <controller #> <command>"
to get command specific help
ディスク情報の表示
root@pve:~# 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 : SAS2008
BIOS version : 7.39.02.00
Firmware version : 20.00.06.00
Channel description : 1 Serial Attached SCSI
Initiator ID : 0
Maximum physical devices : 255
Concurrent commands supported : 1720
Slot : 1
Segment : 0
Bus : 1
Device : 0
Function : 0
RAID Support : Yes
------------------------------------------------------------------------
IR Volume information
------------------------------------------------------------------------
IR volume 1
Volume ID : 286
Status of volume : Okay (OKY)
Volume wwid : 0aeb29e1653736bd
RAID level : RAID1
Size (in MB) : 1951000
Physical hard disks :
PHY[0] Enclosure#/Slot# : 1:0
PHY[1] Enclosure#/Slot# : 1:1
------------------------------------------------------------------------
Physical device information
------------------------------------------------------------------------
Initiator at ID #0
Device is a Hard disk
Enclosure # : 1
Slot # : 0
SAS Address : 4433221-1-0300-0000
State : Optimal (OPT)
Size (in MB)/(in sectors) : 1953514/4000797359
Manufacturer : ATA
Model Number : Patriot P220 204
Firmware Revision : 404
Serial No : ---------------
GUID : 5000000000000001
Protocol : SATA
Drive Type : SATA_SSD
Device is a Hard disk
Enclosure # : 1
Slot # : 1
SAS Address : 4433221-1-0200-0000
State : Optimal (OPT)
Size (in MB)/(in sectors) : 1953514/4000797359
Manufacturer : ATA
Model Number : Patriot P220 204
Firmware Revision : 404
Serial No : ------------------
GUID : 5000000000000001
Protocol : SATA
Drive Type : SATA_SSD
------------------------------------------------------------------------
Enclosure information
------------------------------------------------------------------------
Enclosure# : 1
Logical ID : 56c92bf0:000390f0
Numslots : 8
StartSlot : 0
------------------------------------------------------------------------
SAS2IRCU: Command DISPLAY Completed Successfully.
SAS2IRCU: Utility Completed Successfully.
RAID1アレイの作成
もう作ってしまったのでコマンドだけ。
sas2ircu 0 create raid1 max 1:0 1:1
1:0とか1:1というのは、sas2ircu 0 display
コマンドで表示されたEnclosure
とSlot
のことです。
詳細は、sas2ircu 0 create
などコマンドを途中まで入れて実行するとヘルプが表示されます。
個人的にですが、後々ディスクが故障して他メーカーの同容量にしたとき、微妙に容量が足りずにリビルドできないのを防ぐために1GBぐらい小さく構築しました。
構築できる最大容量はsas2ircu 0 display
コマンドでSize (in MB)/(in sectors)
のところに書いてあります。
max
の代わりにここ表示されたMB-1000ぐらいの容量にしました。
root@pve:~# sas2ircu 0 create
LSI Corporation SAS2 IR Configuration Utility.
Version 20.00.00.00 (2014.09.18)
Copyright (c) 2008-2014 LSI Corporation. All rights reserved.
SAS2IRCU: Incorrect number of command line parameters for 'CREATE' command!
The format of the CREATE command is
sas2ircu <controller #> create <volume type> <size>
<Encl:Bay> [Volume Name] [EnablePI][noprompt]
where <controller #> is:
A controller number between 0 and 255.
where <volume type> is:
The type of the volume to create and is either RAID1 (or)
RAID1E (or) RAID0 (or) RAID10.
where <size> is:
The size of the RAID volume in Mbytes or 'MAX' for the maximum size available.
where <Encl:Bay> is:
A list of Encl:Bay pairs identifying the disk drives you
wish to include in the volume being created. If the volume type is
'RAID1', the first drive will be selected as the primary and the
second as the secondary drive.
For a type 'RAID1' volume exactly 2 disks must be specified.
For a type 'RAID1E' volume min of 3 disks must be specified.
For a type 'RAID0' volume min of 2 disks must be specified.
For a type 'RAID10' volume min of 4 disks must be specified.
where [Volume Name] is an optional argument that can be used
to identify a Volume with a user specified Alpha-numeric string
where [EnablePI] is an optional argument that can be used
to create a PI enabled volume
where noprompt is an optional argument that eliminates
warnings and prompts
SAS2IRCU: Error executing command CREATE.
ディスク異常でメール通知したい
ディスクに異常が発生したとき、何らかの通知が欲しいです
それについては以下に参考があったので、これをcronに登録して使わせてもらうことにします。
https://www.adminsehow.com/2014/08/send-email-alerts-if-perc-h200-raid-fails-in-linux/
#!/bin/bash
MAIL=mail@domain.com
RESULT=`sas2ircu 0 STATUS | grep Optimal`
if [ -z "$RESULT" ]; then
echo "RAID ERROR ON SERVER" | mail -s 'Raid Error' "$MAIL"
else echo "Raid is OK"
fi
※適切なメール送信サーバーを設定しないと外部へ送られないので注意