raid卡
raid主要有LSI、Adaptec、Highpoint、Promise四家提供,其中前兩家提供的最多。LSI如今屬於博通公司。不一樣廠家使用命令工具不一樣。html
能夠經過lspci查看陣列卡信息:
# lspci | grep LSI 17:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS3008 PCI-Express Fusion-MPT SAS-3 (rev 02) 68:00.0 Serial Attached SCSI controller: LSI Logic / Symbios Logic SAS3008 PCI-Express Fusion-MPT SAS-3 (rev 02)
磁盤狀態
經過命令查看物理磁盤megacli -PDList -aALL
返回的字段中Firmware state
有多個狀態:linux
- Online 爲某個虛擬磁盤的成員盤,可正常使用,處於在線狀態。
- Unconfigured Good 磁盤狀態正常,但不是虛擬磁盤的成員盤或熱備盤。
- Hot Spare 被設置爲熱備盤。
- Failed 當「Online」狀態或「Hot Spare」狀態的磁盤出現不可恢復的 錯誤時,會體現爲此狀態。
- Rebuild 硬盤正在進行數據重建,以保證虛擬磁盤的數據冗餘性和完 整性。
- Unconfigured Bad 「Unconfigured Good」狀態磁盤或未初始化的磁盤,出現無 法恢復的錯誤時,會體現爲此狀態。
- Missing 「Online」狀態的磁盤被拔出後,體現爲此狀態。
- Offline 爲某個虛擬磁盤的成員盤,不可正常使用,處於離線狀態。
- Shield State 物理磁盤在作診斷操做時的臨時狀態。
- Copyback 新盤正在替換故障成員盤
SAS3IRCU工具
-
下載安裝sas3ircuios
不一樣操做系統下,SAS3IRCU工具的安裝方法不一樣,此處僅以Windows、Linux、VMware爲例進行說明,其餘操做系統下的安裝方法請參考軟件包中的「Readme」文件。- 登陸BROADCOM網站上RAID卡的頁面。
- 在「DOWNLOADS」頁籤中單擊「Management Software and Tools」。打開管理軟件和工具列表。
- 下載最新版本的「SAS3IRCU」工具。
- 解壓後獲得適用於不一樣操做系統的工具包。
- 安裝sas3ircu
Windows系統下安裝SAS3IRCU工具。
a. 將適用Windows的工具包上傳到服務器操做系統。服務器
b. 打開命令行工具。使用命令行工具進入SAS3IRCU工具包所在目錄。工具
c. Windows下的SAS3IRCU工具不需安裝,此時可執行RAID卡命令。
Linux系統下安裝SAS3IRCU工具。網站
a. 使用文件傳輸工具(例如Putty)將適用Linux的工具包上傳到服務器操做系統。ui
b. 在Shell界面中進入SAS3IRCU工具所在目錄。url
c. Linux下的SAS3IRCU工具不需安裝,此時可執行RAID卡命令。spa
VMware系統下安裝SAS3IRCU工具。操作系統
a. 使用文件傳輸工具(例如Putty)將適用VMware的工具包上傳到服務器操做系統。
b. 執行esxcli software vib install -v=vmware-xxx-sas3ircu.vib 命令安裝StorCLI工具。
c. 安裝完畢後,便可執行RAID卡命
- 3. 查看全部控制器
#./sas3ircu list Avago Technologies SAS3 IR Configuration Utility. Version 16.00.00.00 (2017.04.26) Copyright (c) 2009-2017 Avago Technologies. All rights reserved. Adapter Vendor Device SubSys SubSys Index Type ID ID Pci Address Ven ID Dev ID ----- ------------ ------ ------ ----------------- ------ ------ 0 SAS3008 1000h 97h 00h:17h:00h:00h 1000h 0097h Adapter Vendor Device SubSys SubSys Index Type ID ID Pci Address Ven ID Dev ID ----- ------------ ------ ------ ----------------- ------ ------ 1 SAS3008 1000h 97h 00h:68h:00h:00h 1000h 0097h SAS3IRCU: Utility Completed Successfully.
4. 根據序列號查詢磁盤所在槽位 (磁盤序列號能夠根據disk/by-id查看,也能夠經過後邊smartctl查看)
# ll /dev/disk/by-id/ | grep sdm lrwxrwxrwx 1 root root 9 8月 1 14:14 ata-ST8000NM0055-1RM112_ZA1CNVDK -> ../../sdm lrwxrwxrwx 1 root root 9 8月 1 14:14 lvm-pv-uuid-J1WyJ6-4VkN-BPwC-Qcab-eUwZ-RfY1-Cq8x66 -> ../../sdm lrwxrwxrwx 1 root root 9 8月 1 14:14 wwn-0x5000c500b2268d39 -> ../../sdm
# ./sas3ircu 0 display | grep ZA1CNVDK -A 3 -B 8 Enclosure # : 2 Slot # : 15 SAS Address : 5001c45-0-023d-bd8f State : Ready (RDY) Size (in MB)/(in sectors) : 7630885/15628053167 Manufacturer : ATA Model Number : ST8000NM0055-1RM Firmware Revision : SN05 Serial No : ZA1CNVDK Unit Serial No(VPD) : ZA1CNVDK GUID : 5000c500b2268d39 Protocol : SATA Drive Type : SATA_HDD
5. 根據槽位點亮物理磁盤燈
./sas3ircu 0 locate 2:15 on ./sas3ircu 0 locate 2:15 off
6. sas3ircu命令
sas3ircu <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 Avago 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 "sas3ircu <controller #> <command>" to get command specific help
smartmontools安裝
smartmontools經過使用自我監控(Self-Monitoring)、分析(Analysis)和報告(Reporting)三種技術(縮寫爲S.M.A.R.T或SMART)來管理和監控存儲硬件。現在大部分的ATA/SATA、SCSI/SAS和固態硬盤都搭載內置的SMART系統。SMART的目的是監控硬盤的可靠性、預測磁盤故障和執行各類類型的磁盤自檢。smartmontools由smartctl和smartd兩部分工具程序組成,它們一塊兒爲Linux平臺提供對磁盤退化和故障的高級警告
https://linux.cn/article-4461-1.html
1. 查看磁盤信息
# smartctl -i /dev/sdm
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-957.el7.x86_64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: ST8000NM0055-1RM112
Serial Number: ZA1CNVDK
LU WWN Device Id: 5 000c50 0b2268d39
Firmware Version: SN05
User Capacity: 8,001,563,222,016 bytes [8.00 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: ACS-3 T13/2161-D revision 5
SATA Version is: SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is: Thu Aug 1 15:05:07 2019 CST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
2. 磁盤檢測
#後臺檢測硬盤,消耗時間短 smartctl -t short <device> #後臺檢測硬盤,消耗時間長 smartctl -t long <device> #前臺檢測硬盤,消耗時間短 smartctl -C -t short <device> #前臺檢測硬盤,消耗時間長 smartctl -C -t long <device>
MegaCli工具
lspci |grep LSI 02:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2108 [Liberator] (rev 05
1. MegaCli安裝
wget http://mirror.hep.wisc.edu/stable/extras/6/x86_64/Lib_Utils-1.00-09.noarch.rpm wget http://mirror.hep.wisc.edu/stable/extras/6/x86_64/MegaCli-8.02.21-1.noarch.rpm rpm -ivh Lib_Utils-1.00-09.noarch.rpm rpm -ivh MegaCli-8.02.21-1.noarch.rpm #64位操做系統 ln -sf /opt/MegaRAID/MegaCli/MegaCli64 /usr/sbin/megacli