服務器有部分硬盤報警 須要更換 剛接手服務器不知道具體狀況 百度了一些教程 都不盡人意 查詢結果都沒有想要的 html
後找到一篇文章 地址 http://blog.csdn.net/msdnchina/article/details/52475383 我這裏只寫與我實際操做有出入的地方 以備複習
cat /proc/scsi/scsi
dmesg | grep -i raid
lsi MegaRAID raid卡管理工具能查以下信息:
raid的level,
raid是幾塊物理硬盤構成的,
物理硬盤的製造商.bash
軟件raid:查看raid級別,狀態等信息
#cat /proc/mdstat
硬件raid:查看raid的廠商,型號,級別
#cat /proc/scsi/scsi
dmesg | grep -i raid服務器
dracut: rd_NO_MD: removing MD RAID activation
megaraid_sas 0000:03:00.0: PCI INT A -> GSI 42 (level, low) -> IRQ 42
megaraid_sas 0000:03:00.0: setting latency timer to 64
megaraid_sas 0000:03:00.0: FW now in Ready state
megaraid_sas 0000:03:00.0: irq 107 for MSI/MSI-X
megaraid_sas 0000:03:00.0: irq 108 for MSI/MSI-X
megaraid_sas 0000:03:00.0: irq 109 for MSI/MSI-X
megaraid_sas 0000:03:00.0: irq 110 for MSI/MSI-X
megaraid_sas 0000:03:00.0: irq 111 for MSI/MSI-X
megaraid_sas 0000:03:00.0: irq 112 for MSI/MSI-X
megaraid_sas 0000:03:00.0: irq 113 for MSI/MSI-X
megaraid_sas 0000:03:00.0: irq 114 for MSI/MSI-X
megaraid_sas 0000:03:00.0: firmware supports msix : (16)
megaraid_sas 0000:03:00.0: current msix/online cpus : (8/8)
megaraid_sas 0000:03:00.0: RDPQ mode : (disabled)
megaraid_sas 0000:03:00.0: Current firmware maximum commands: 1008 LDIO threshold: 0
megaraid_sas 0000:03:00.0: Init cmd success
megaraid_sas 0000:03:00.0: firmware type : Legacy(64 VD) firmware
megaraid_sas 0000:03:00.0: controller type : MR(512MB)
megaraid_sas 0000:03:00.0: Online Controller Reset(OCR) : Enabled
megaraid_sas 0000:03:00.0: Secure JBOD support : No
megaraid_sas 0000:03:00.0: INIT adapter done
megaraid_sas 0000:03:00.0: Jbod map is not supported megasas_setup_jbod_map 4967
megaraid_sas 0000:03:00.0: pci id : (0x1000)/(0x005b)/(0x1028)/(0x1f38)
megaraid_sas 0000:03:00.0: unevenspan support : no
megaraid_sas 0000:03:00.0: firmware crash dump : no
megaraid_sas 0000:03:00.0: jbod sync map : no
scsi0 : Avago SAS based MegaRAID driver
megaraid_sas 0000:03:00.0: scanning for scsi0...
megaraid_sas 0000:03:00.0: 4145 (529973269s/0x0001/CRIT) - VD 00/0 is now DEGRADED
megaraid_sas 0000:03:00.0: scanning for scsi0...
軟件下載地址http://www.avagotech.com/support/download-search工具
在搜索框裏搜索"megacli",點擊肯定,找到Management Software and Tools (22) 下的 MegaCLI 5.5 P2 (這是命令行工具),另:lsi已經被avago收購了.ui
[root@F11 ~]# mv 8-07-14_MegaCLI.zip 123/
[root@F11 ~]# cd 123/
[root@F11 123]# unzip 8-07-14_MegaCLI.zip
Archive: 8-07-14_MegaCLI.zip
inflating: 8.07.14_MegaCLI.txt
inflating: DOS/MegaCLI.exe
extracting: FreeBSD/MegaCLI.zip
extracting: FreeBSD/MegaCli64.zip
inflating: Linux/MegaCli-8.07.14-1.noarch.rpm
inflating: Solaris/MegaCli.pkg
inflating: Windows/MegaCli.exe
inflating: Windows/MegaCli64.exe
[root@F11 123]# ls -lrt
total 7824
-rw-r--r-- 1 root root 48298 Jan 19 2014 8.07.14_MegaCLI.txt
-rw-r--r-- 1 root root 7939395 Dec 8 10:34 8-07-14_MegaCLI.zip
drwxr-xr-x 2 root root 4096 Dec 8 10:36 DOS
drwxr-xr-x 2 root root 4096 Dec 8 10:36 FreeBSD
drwxr-xr-x 2 root root 4096 Dec 8 10:36 Linux
drwxr-xr-x 2 root root 4096 Dec 8 10:36 Solaris
drwxr-xr-x 2 root root 4096 Dec 8 10:36 Windows
[root@F11 123]# cd Linux/
[root@F11 Linux]# LS -L
-bash: LS: command not found
[root@F11 Linux]# ls -l
total 1516
-rw-r--r-- 1 root root 1549650 Dec 16 2013 MegaCli-8.07.14-1.noarch.rpm
[root@F11 Linux]# rpm -ivh MegaCli-8.07.14-1.noarch.rpm
Preparing... ########################################### [100%]
1:MegaCli ########################################### [100%]
[root@F11 Linux]# cd /opt/MegaRAID/MegaCli/
[root@F11 MegaCli]# ls -l
total 3188
-rw-r--r-- 1 root root 0 Dec 8 10:37 install.log
lrwxrwxrwx 1 root root 48 Dec 8 10:37 libstorelibir-2.so -> /opt/MegaRAID/MegaCli/libstorelibir-2.so.14.07-0
-rwx------ 1 root root 540512 Dec 16 2013 libstorelibir-2.so.14.07-0
-rwxr-xr-x 1 root root 2720320 Dec 16 2013 MegaCli64spa
如下是MegaCli使用命令.net
[root@F11 MegaCli]# ./MegaCli64 -PDList -aALL
Adapter #0命令行
Enclosure Device ID: 32
Slot Number: 0
Enclosure position: 1
Device Id: 0
WWN: 5000CCA03EC7F6AB
Sequence Number: 4
Media Error Count: 4
Other Error Count: 9設計
這兩個數值來肯定陣列中磁盤是否有問題;Medai Error Count 表示磁盤可能錯誤,多是磁盤有壞道,這個值不爲0值得注意,數值越大,危險係數越高,Other Error Count 表示磁盤可能存在鬆動,可能須要從新再插入。MegaCli 能夠對陣列中全部的磁盤進行檢測,咱們能夠經過腳本的方式來檢測相關參數,從而通知管理人員。
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SASunix
Raw Size: 2.728 TB [0x15d50a3b0 Sectors]
Non Coerced Size: 2.728 TB [0x15d40a3b0 Sectors]
Coerced Size: 2.728 TB [0x15d400000 Sectors]
Sector Size: 0
Firmware state: Unconfigured(bad)
Device Firmware Level: M440
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000cca03ec7f6a9
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: HITACHI HUS723030ALS640 M440YVKJZ4YK
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :38C (100.40 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 1
Drive's position: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: 1
Device Id: 1
WWN: 5000CCA03EC56C53
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 2.728 TB [0x15d50a3b0 Sectors]
Non Coerced Size: 2.728 TB [0x15d40a3b0 Sectors]
Coerced Size: 2.728 TB [0x15d400000 Sectors]
Sector Size: 0
Firmware state: Online, Spun Up
Device Firmware Level: M440
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000cca03ec56c51
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: HITACHI HUS723030ALS640 M440YVKHKV9K
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :38C (100.40 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 2
Drive's position: DiskGroup: 0, Span: 0, Arm: 2
Enclosure position: 1
Device Id: 2
WWN: 5000CCA03EC7659B
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 2.728 TB [0x15d50a3b0 Sectors]
Non Coerced Size: 2.728 TB [0x15d40a3b0 Sectors]
Coerced Size: 2.728 TB [0x15d400000 Sectors]
Sector Size: 0
Firmware state: Online, Spun Up
Device Firmware Level: M440
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000cca03ec76599
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: HITACHI HUS723030ALS640 M440YVKJNHGK
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :36C (96.80 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 3
Drive's position: DiskGroup: 0, Span: 0, Arm: 3
Enclosure position: 1
Device Id: 3
WWN: 5000CCA03EC8035F
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 2.728 TB [0x15d50a3b0 Sectors]
Non Coerced Size: 2.728 TB [0x15d40a3b0 Sectors]
Coerced Size: 2.728 TB [0x15d400000 Sectors]
Sector Size: 0
Firmware state: Online, Spun Up
Device Firmware Level: M440
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000cca03ec8035d
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: HITACHI HUS723030ALS640 M440YVKK005K
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :34C (93.20 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No
Enclosure Device ID: 32
Slot Number: 4
Drive's position: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: 1
Device Id: 4
WWN: 5000CCA03EC7FFC7
Sequence Number: 4
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 2.728 TB [0x15d50a3b0 Sectors]
Non Coerced Size: 2.728 TB [0x15d40a3b0 Sectors]
Coerced Size: 2.728 TB [0x15d400000 Sectors]
Sector Size: 0
Firmware state: Online, Spun Up
Device Firmware Level: M440
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x5000cca03ec7ffc5
SAS Address(1): 0x0
Connected Port Number: 0(path0)
Inquiry Data: HITACHI HUS723030ALS640 M440YVKJZSSK
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: 6.0Gb/s
Link Speed: 6.0Gb/s
Media Type: Hard Disk Device
Drive Temperature :33C (91.40 F)
PI Eligibility: No
Drive is formatted for PI information: No
PI: No PI
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Port-1 :
Port status: Active
Port's Linkspeed: Unknown
Drive has flagged a S.M.A.R.T alert : No
硬盤過多 內容重複 已省略
[root@F11 MegaCli]# ./MegaCli64 -LDInfo -Lall -aALL
Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name :
RAID Level : Primary-5, Secondary-0, RAID Level Qualifier-3
Size : 8.185 TB
Sector Size : 512
Parity Size : 2.728 TB
State : Optimal
Strip Size : 64 KB
Number Of Drives : 4
Span Depth : 1
Default Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Disk's Default
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: Yes
LD's IO profile supports MAX power savings with cached writes: No
Bad Blocks Exist: No
Is VD Cached: Yes
Cache Cade Type : Read Only
另外有價值的參考網址:
http://blog.chinaunix.net/uid-25135004-id-3139293.html
http://blog.csdn.net/smithereensman/article/details/51320499