我有一台 IBM x3620 M3 服务器,
root@web26:~# lshw -short
/0/100/9/0 scsi4 storage LSI MegaSAS 9260
/0/100/9/0/2.0.0 /dev/sda disk 1990GB ServeRAID M5015
硬件突袭控制器。
如何从 Ubuntu 查看 RAID 阵列状态、SMART 状态并为其发出重建命令?
附言:
root@web26:~# modinfo mptctl
filename: /lib/modules/2.6.32-28-server/kernel/drivers/message/fusion/mptctl.ko
version: 3.04.12
license: GPL
description: Fusion MPT misc device (ioctl) driver
author: LSI Corporation
srcversion: 9052501D1B37F5BF2F73C49
depends: mptbase
vermagic: 2.6.32-28-server SMP mod_unload modversions
答案1
您需要安装MegaCLI 软件包来自 LSI。用户界面相当复杂;您最好在网上查找备忘单和摘要。
答案2
就这样了,谢谢@justarobert。以下是未来的详细说明:
# cat /etc/issue
Ubuntu 10.04.2 LTS
安装两个包:
#apt-get install unzip rpm2cpio
解压所有内容
#unzip 8.00.46_Linux_MegaCLI.zip
#unzip -d MegaCliLin MegaCliLin.zip
#unzip -d 8.00.46_Linux_MegaCLI 8.00.46_Linux_MegaCLI.zip
解压 RPM(确保您在正确的目录中)
#rpm2cpio MegaCli-8.00.46-1.i386.rpm | cpio -idmv
#rpm2cpio Lib_Utils-1.00-08.noarch.rpm | cpio -idmv
(libsysfs.so.2.0.2 是必需的库,它来自 Lib_Utils-1.00-08.noarch.rpm 中的 LSI,apt-get install libsysfs 没有为我完成此操作):
#cp opt/lsi/3rdpartylibs/x86_64/libsysfs.so.2.0.2 /usr/lib64/
#cp ./opt/MegaRAID/MegaCli/MegaCli64 /usr/local/sbin/
#ln -s /usr/local/sbin/MegaCli64 /usr/local/sbin/MegaCli
瞧,检查 RAID!
# MegaCli -LDInfo -Lall -aALL
Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name :
RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0
Size : 1.809 TB
**State : Optimal**
Strip Size : 128 KB
Number Of Drives : 2
Span Depth : 1
Default Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
Access Policy : Read/Write
Disk Cache Policy : Disabled
Encryption Type : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: Yes
LD has drives that support T10 power conditions: No
LD's IO profile supports MAX power savings with cached writes: No
答案3
最新 MegaCLI 的更新:
获取您的软件包。例如,MegaRAID SAS9280-16i4e:
http://www.lsi.com/products/storagecomponents/Pages/MegaRAIDSAS9280-16i4e.aspx -> 支持和下载 -> 管理工具
安装两个包:
#sudo apt-get 安装解压缩 rpm2cpio 或者 #sudo apt-get install unzip alien #...有点过头了,不过也有一些不错的工具
解压所有内容:
#cd 到/你的/目录/包含/8.02.16_MegaCLI #解压缩 -d 8.02.16_Linux_MegaCLI 8.02.16_Linux_MegaCLI.zip #cd 8.02.16_Linux_MegaCLI/LINUX #解压缩 -d MegaCliLin MegaCliLin.zip
解压 RPM:
#cd MegaCliLin #rpm2cpio MegaCli-8.02.16-1.i386.rpm | cpio -idmv
库 libsysfs.so.2.0.2 是“必需的”。但是,您也可以使用带有软链接的原生 Ubuntu 版本来伪造 MegaCli:
#rpm2cpio Lib_Utils-1.00-09.noarch.rpm | cpio-idmv 命令 #sudo cp opt/lsi/3rdpartylibs/x86_64/libsysfs.so.2.0.2 /usr/lib64/ 或者 #sudo apt-get 安装 libsysfs #locate libsysfs #...获取正确的文件名 #sudo ln -s /lib/libsysfs.so.2.0.1 /usr/lib64/libsysfs.so.2.0.2 #sudo cp opt/MegaRAID/MegaCli/MegaCli64 /usr/local/sbin/ #sudo ln -s /usr/local/sbin/MegaCli64 /usr/local/sbin/MegaCli
检查一下,哟!
#sudo MegaCli -AdpAllInfo -aALL #sudo MegaCli -LDInfo -Lall -aALL #sudo MegaCli -PDList -aALL