为了保证服务器上的数据安全,一般阵列卡会做raid5,或者raid6等等。但是这避免不了可能存在某个磁盘损坏的情况。

ESXI 6以前的版本可以用 MegaCli监控raid状态

[root@CTAPACVM2:~] esxcli software vib install -v /tmp/vmware-esx-MegaCli-8.07.07.vib --no-live-install (安装发现有冲突)
[DependencyError]
File path of '/opt/lsi/MegaCLI/MegaCli' is claimed by multiple non-overlay VIBs: set(['LSI_bootbank_vmware-esx-MegaCli-8.04.07_8.04.07-01', 'LSI_bootbank_vmware-esx-MegaCli-8.07.07_8.07.07-01'])
File path of '/opt/lsi/MegaCLI/libstorelib.so' is claimed by multiple non-overlay VIBs: set(['LSI_bootbank_vmware-esx-MegaCli-8.04.07_8.04.07-01', 'LSI_bootbank_vmware-esx-MegaCli-8.07.07_8.07.07-01'])
Please refer to the log file for more details.

[root@CTAPACVM2:~] esxcli software vib list | grep MegaCli (查看以前的MegaCli)
vmware-esx-MegaCli-8.04.07 8.04.07-01 LSI PartnerSupported 2019-08-18

[root@CTAPACVM2:~] esxcli software vib remove -n vmware-esx-MegaCli-8.04.07 (删除以前的MegaCli)
Removal Result
Message: Operation finished successfully.
Reboot Required: false
VIBs Installed:
VIBs Removed: LSI_bootbank_vmware-esx-MegaCli-8.04.07_8.04.07-01
VIBs Skipped:

[root@CTAPACVM2:~] esxcli software vib install -v /tmp/vmware-esx-MegaCli-8.07.07.vib --no-sig-check (再次安装)
Installation Result
Message: Operation finished successfully.
Reboot Required: false
VIBs Installed: LSI_bootbank_vmware-esx-MegaCli-8.07.07_8.07.07-01
VIBs Removed:
VIBs Skipped:

cd /opt/lsi/MegaCLI/
./MegaCli -LdPdInfo -aALL (可以得到raid状态)

但是从ESXI 6开始不能再使用MegaCLI监控raid状态
对于LSI的阵列卡官方有远程监控工具 MSM(MegaRAID Storage Manager) 和 VMW-ESX-LSIProvider.
下载 https://my.vmware.com/web/vmware/details?downloadGroup=DT-ESXI60-LSI-LSI-MR3-66101700-1OEM&productId=491#product_downloads

[root@CTAPACVM2:~] vmware -vl
VMware ESXi 6.0.0 build-3620759
VMware ESXi 6.0.0 Update 2

[root@CTAPACVM2:~] esxcli storage core device list (可以查到raid信息)
Drive Type: logical
RAID Level: RAID5
Number of Physical Drives: 5

安装
[root@CTAPACVM2:~] esxcli software vib install -v /tmp/vmware-esx-provider-lsiprovider.vib --no-sig-check

Installation Result

Message: The update completed successfully, but the system needs to be rebooted for the changes to be effective.

Reboot Required: true

VIBs Installed: LSI_bootbank_lsiprovider_500.04.V0.70-0004

VIBs Removed:

VIBs Skipped:

可以看到组成raid5的5个硬盘的状态了

ESXI 监控raid状态
ESXI 监控raid状态_第1张图片

[root@CTAPACVM2:~] esxtop (出现乱码)

ESXI 监控raid状态_第2张图片
[root@CTAPACVM2:~] echo $TERM
[root@CTAPACVM2:~] export TERM=xterm
[root@CTAPACVM2:~] echo $TERM

[root@CTAPACVM2:~] esxtop (再次执行)

ESXI 监控raid状态_第3张图片