各种服务器raid监控


对于 HP ProLiant DL360 G4p 服务器 (ns6.dns-diy)。

RAID控制器是 Smart Array 6i 。 从网站上下载了基于web的HP管理平台。

参考设置: Linux 系统下安装阵列配置工具 http://www.icare.hp.com.cn/TechCenter_StaticArticle/32481/32481.html

Dell 各系列的机器,只要是 PERC 的RAID控制器,都可以用MegaRC 这个命令行工具来检测

MegaRC for Windows
http://www.lsi.com/files/support/rsa/utilities/megaconf/ut_win_megarc_1.10.zip
解压缩后,就是 megarc.exe

MegaRC for Linux
http://www.lsi.com/files/support/rsa/utilities/megaconf/ut_linux_megarc_1.11.zip
用 unzip 解压缩出来后,再chmod 700 megarc*

Windows 和 Linux 下的参数都一样:

megarc -dispcfg -a0
./megarc -dispcfg -a0

输出结果如下:

     Logical Drive : 0( Adapter: 0 ): Status: OPTIMAL
   ---------------------------------------------------
   SpanDepth :01     RaidLevel: 5 RdAhead : Adaptive Cache
   StripSz   :064KB   Stripes : 4 WrPolicy: WriteBack

   Logical Drive 0 : SpanLevel_0 Disks
   Chnl Target StartBlock   Blocks      Physical Target St
   ---- ------ ----------   ------      ------------------
   0      00    0x00000000   0x0887c000   ONLINE
   0      01    0x00000000   0x0887c000   ONLINE
   0      02    0x00000000   0x0887c000   ONLINE
   0      03    0x00000000   0x0887c000   ONLINE


如果想要通过图形界面来查看,必须装那个大家伙了: Dell OpenManage Server Administrator 
Linux下有90多M,Win下的有100多M。


Dell 在 Linux 下还有一个更好的工具:raidmon (for win 的目前还没发现)

目前支持 IDE / EIDE, SCSI RAID: LSI Logic CERC ATA 100, PERC 4/DC, PERC 4/Di, PERC 4/SC, LSI Logic (formerly AMI) PERC3/DC, PERC3/DCL, PERC3/QC, PERC3/SC

perc-cerc-apps-6.03-A06.tar.gz
http://support.dell.com/support/downloads/download.aspx?c=us&l=en&s=gen&releaseid=R71524&formatcnt=2&fileid=92846

解包下来后,有个 Megamon-4.0-0a.i386.rpm

安装结束后 /etc/init.d/raidmon start

# tail -f /var/log/megaserv.log 就可以看到检测报告。有问题的时候,此log中会有体现。

还可以编辑 /etc/megamon.conf ,将管理员的信箱加在文件末尾,这样检测到错误的时候,会自动发送邮件。
(mail.35.cn 好象当成垃圾邮件过滤掉了)

因此建议 megarc(手工) 配合 raidmon(自动) 是个比较好的解决方案。


Dell 1950 的 PERC 5/i SAS RAID 控制器用这个命令行工具:

MegaCLI for Linux
http://www.lsi.com/support/downloads/megaraid/miscellaneous/Linux_MegaCLI_1.01.24.zip

MegaCLI for Windows
http://www.lsi.com/support/downloads/megaraid/miscellaneous/Windows_MegaCLI_1.01.25.zip

# unzip Linux_MegaCLI_1.01.24.zip
# unzip MegaCliLin.zip 
# rpm -ivh MegaCli-1.01.24-0.i386.rpm 

# /opt/MegaCli -CfgDsply -aALL

输出如下:

==============================================================================
Adapter: 0
Product Name: PERC 5/i Integrated
Memory: 256MB
BBU: Present
Serial No: 12345
==============================================================================

RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
Size:285568MB
State: Optimal

Physical Disk: 0
Media Error Count: 0
Other Error Count: 0
Firmware state: Online

Physical Disk: 1
Media Error Count: 0
Other Error Count: 0
Firmware state: Online

Poweredge 2650 采用的是 Perc 3/Di 系统识别为 aacraid

以下命令是针对 redhat 8.0 下使用的,如果是其他操作系统,指令以及程序可能会有不同

# wget http://ftp.us.dell.com/scsi-raid/aacraid-util-rh8.0-i386.tar.gz
# tar zxvf aacraid-util-rh8.0-i386.tar.gz 
# rpm -ivh afaapps-2.7-2.i386.rpm 
(此步骤可能系统需要依赖包: arts-1.0.3-1.i386.rpm 和 arts-devel-1.0.3-1.i386.rpm)

# afacli 这个是控制台命令

FASTCMD> controller list
Executing: controller list

Adapter Name       Adapter Type       Availability       Clustering
------------      ------------       ------------       ------------
afa0                PERC 3/Di         read/write           No

FASTCMD> open afa0

AFA0> container list

Executing: container list
Num          Total Oth Chunk          Scsi  Partition
Label Type   Size   Ctr Size   Usage   B:ID:L Offset:Size
----- ------ ------ --- ------ ------- ------ -------------
0    RAID-5 135GB       32KB Open    0:00:0 64.0KB:33.8GB 
/dev/sda                              0:01:0 64.0KB:33.8GB 
                                       0:02:0 64.0KB:33.8GB 
                                       0:03:0 64.0KB:33.8GB 
                                       0:04:0 64.0KB:33.8GB 

AFA0> enclosure show slot

Enclosure
ID (B:ID:L) Slot scsiId Insert Status
----------- ---- ------ ------- ------------------------------------------
0 0:06:0   0   0:00:0     1   OK ACTIVATE 
0 0:06:0   1   0:01:0     1   OK ACTIVATE 
0 0:06:0   2   0:02:0     1   OK ACTIVATE 
0 0:06:0   3   0:03:0     1   OK ACTIVATE 
0 0:06:0   4   0:04:0     1   OK ACTIVATE 

AFA0> disk list
Executing: disk list

B:ID:L Device Type     Blocks    Bytes/Block Usage            Shared Rate
------ -------------- --------- ----------- ---------------- ------ ----
0:00:0   Disk            71132959 512         Initialized      NO     160 
0:01:0   Disk            71132959 512         Initialized      NO     160 
0:02:0   Disk            71132959 512         Initialized      NO     160 
0:03:0   Disk            71132959 512         Initialized      NO     160 
0:04:0   Disk            71132959 512         Initialized      NO     160 


由于 Dell 的产品系列过于复杂,对各种控制器寻找各自官方的 RAID 状态检测软件是不太实际的。

最好的方法还是安装 Dell OpenManage Server Administrator

目前最新的版本是 5.1 默认只能装在 RHEL 4 版本上。

其他版本 Linux 如果要安装,必须修改/etc/redhat-release 字串 ,这个在有遇到实际情况再说。

安装步骤:
# wget http://ftp1.us.dell.com/sysman/OM_5.1_ManNode_LIN_A00.tar.gz
# tar zxvf OM_5.1_ManNode_LIN_A00.tar.gz
# ./setup.sh 

    [x] 1. Server Administrator CLI
    [x] 2. Server Administrator Web Server
    [x] 3. Storage Management
    [ ] 4. Remote Access Core Components
    [ ] 5. Remote Access SA Plugin Components
    [ ] 6. All

   Do you want the Server Administrator services started?
   Press ('y' for yes | 'Enter' to exit): y


https://222.76.218.17:1311/ (输入系统管理员帐号和密码)





命令行:
# cd /opt/dell/srvadmin/oma/bin
# omreport storage pdisk controller=0

Status                    : Ok
Name                      : Physical Disk 0:0:0
State                     : Online

Status                    : Ok
Name                      : Physical Disk 0:0:1
State                     : Online


windows 版本的 Dell OpenManage Server Administrator 5.1:
http://ftp1.us.dell.com/sysman/OM_5.1_ManNode_WIN_A00.exe



最新的 Dell 1950 / 2950 都用了 SAS 硬盘。
控制器有两种 PERC 5/i (有RAID) 和 SAS 5/iR (无硬RAID)

这两种控制器除了可以使用 Dell OpenManage Server Administrator 外,还可以用 Dell SAS RAID Storage Manager:

http://ftp1.us.dell.com/sysman/SSM_Linux_1.18-00.tar.gz(for linux)
http://ftp1.us.dell.com/sysman/SSM_Win_A01.exe (for windows)

这个工具相对于 OMSA 来说,要小一些,只有前者的1/3大小。

但使用界面都是基于 JAVA 图形接口的,因此对于没有X11的Linux是无法使用的,只能安装在 Windows 机器上。

另外,该软件有监控和弹出窗口功能,也会在系统中添加特定服务。

(前面的邮件中也有提到:PERC 5/i 的控制器还可以使用 MegaCli 命令行工具,但 SAS 5/i 不行)


由于大部分刺猬主机服务器是 Dell SC1425 ,采用了Adaptec 的 SATA HostRAID 控制卡(CERC SATA 1.5/2s)。

经过测试,OMSA 无法管理到。

从 Dell 站上找到 Adaptec RAID Storage Manager 这个工具。 可以对 RAID 情况做检测

http://ftp.us.dell.com/sysman/RSM_2.12_Win_B928.exe(for windows)
http://ftp.us.dell.com/sysman/RSM-2.12_B928_Linux.tar.gz(for linux)




这三台采用的是 TYAN B2882 主板,采用的是 silicon images 的raid 控制芯片 sil3114 sata raid

RAID 状态检测工具可以使用这个:
http://www.siliconimage.com/docs/Java_SATARaid_GUI_v1.22.zip

由于使用了 Java 技术,因此必须要先安装JRE 的运行环境才行。

运行软件后,就可以运行 Java SATARaid 管理软件了:

下面这两个截图是在 bj03 上的运行结果,从图上可以看出,第二块硬盘正在同步。