在運(yùn)維過(guò)程中惜论,服務(wù)器硬盤故障與更換可能是比較頻繁的一個(gè)工作≈古纾或自己動(dòng)手更換馆类、或指導(dǎo)更換、或提供更換方案弹谁。不同的服務(wù)器廠商有著各自不同的硬件管理標(biāo)準(zhǔn)乾巧,可能導(dǎo)致更換的新硬盤無(wú)法被操作系統(tǒng)識(shí)別。而廠商或許給的建議是预愤,重啟機(jī)器在開(kāi)機(jī)的Raid卡管理界面配置一下就好了...就好了..就好了....沟于。業(yè)務(wù)在運(yùn)行,不能因?yàn)橐粔K磁盤故障就關(guān)機(jī)停業(yè)務(wù)啊植康。
在系統(tǒng)中是可以對(duì)硬盤管理的旷太。但這需要運(yùn)維人員有一定的技術(shù)積累,和能否找到這篇文章(嘿嘿销睁。供璧。俏皮一下)
首先在各大廠商中,HP的服務(wù)器還是不錯(cuò)的冻记,有自己的管理工具睡毒。本文主要介紹的是除HP外,其他使用 LSI 的廠商冗栗。
新更換的硬盤不能被識(shí)別演顾,常見(jiàn)的有兩種情況,一種是需要做JBOD隅居、另一種是需要做單盤Raid0钠至。做JBOD的方法請(qǐng)參考另一篇文章【服務(wù)器新盤無(wú)法識(shí)別(JBOD)】
查看磁盤信息
這里主要關(guān)注Number of Virtual Disks這個(gè)值,12塊磁盤正常情況看到的應(yīng)該 有12個(gè)邏輯盤胎源,我這里故障一個(gè)所以看到了11個(gè) 棕洋。反正能看到很多個(gè),而且是一個(gè)磁盤一個(gè)raid乒融,這就是所謂的單盤raid0掰盘。
#/opt/MegaRAID/MegaCli/MegaCli64 -ldpdinfo-aAll
Adapter #0
Number of Virtual Disks: 11
Virtual Drive: 0 (Target Id: 0)
Name :
RAID Level : Primary-0, Secondary-0, RAID Level Qualifier-0
Size : 446.102 GB
Is VD emulated : Yes
Parity Size : 0
State : Optimal
Strip Size : 256 KB
Number Of Drives : 1
Span Depth : 1
Default Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy : Enabled
Encryption Type : None
PI type: No PI
Is VD Cached: No
Number of Spans: 1
Span: 0 - Number of PDs: 1
PD: 0 Information
Enclosure Device ID: 0
Slot Number: 0
Drive's postion: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: 1
Device Id: 3
WWN: 5001173100f9605c
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 447.130 GB [0x37e436b0 Sectors]
Non Coerced Size: 446.630 GB [0x37d436b0 Sectors]
Coerced Size: 446.102 GB [0x37c34800 Sectors]
Emulated Drive: Yes
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: RP41
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x500e004aaaaaaa00
Connected Port Number: 0(path0)
Inquiry Data: A01CD572SDLF1DAR480G-1HHS ZR04RP41
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: Solid State Device
Drive Temperature :28C (82.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
Drive has flagged a S.M.A.R.T alert : No
查看物理磁盤信息
新更換的硬盤使用這條命令可以看到,但是系統(tǒng)里面看不到赞季。這是就可以判斷你的系統(tǒng)需要做單盤raid0才能識(shí)別硬盤了愧捕。
/opt/MegaRAID/MegaCli/MegaCli64 -pdlist -aAll
查看是否有原邏輯盤的數(shù)據(jù)在cache中
MegaCli64 -GetPreservedCacheList -a0
根據(jù)提示清理
MegaCli64 -DiscardPreservedCache -L{根據(jù)上文提示的L邏輯盤數(shù)字編號(hào)} -a0
制作單盤raid0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[8:5] WB RA Direct CachedBadBBU -a0