Remove-failed-disk » История » Редакция 3
Редакция 2 (Рамиль Абдулбяров, 2015-04-29 18:20) → Редакция 3/4 (Рамиль Абдулбяров, 2015-04-29 18:22)
h1. Изъятие сбойного диска из массива
h1. Собираем информацию о диске
http://serverfault.com/questions/381177/megacli-get-the-dev-sd-device-name-for-a-logical-drive
Нас интересует 'Target Id' из вывода
*megacli -ldinfo -Lall -aall*
<pre>
Virtual Drive: 5 (Target Id: 5)
Name :r0-2-ssd
</pre>
Поставил lshw, сравниваем 'Target Id' и 'bus info':
<pre>
bus info: scsi@0:2.5.0
logical name: /dev/sdf
</pre>
Смотрим какой раздел находится на этом диске:
*lvs -o +seg_pe_ranges |grep /dev/sdf*
<pre>
ssd-kvm321-chi-slave-db ssd -wi-ao-- 400.00g /dev/sdf:2560-104959
</pre>
Собираем информацию по "Other Error Count: 1".
*megacli AdpEventLog -GetEvents -f megacli.log -a0*
Из файла megacli.log:
<pre>
===========
Device ID: 15
Enclosure Index: 32
Slot Number: 15
Error: 3
seqNum: 0x00000f9a
Time: Sun Sep 7 15:54:17 2014
Code: 0x00000071
Class: 0
Locale: 0x02
Event Description: Unexpected sense: PD 0f(e0x20/s15) Path 500056b36789abdc, CDB: 2a 00 17 6e 08 00 00 00 80 00, Sense: 6/29/00
Event Data:
===========
</pre>
<pre>
Slot Number: 15
Серийный номер: OCZ-6R12G0UG3MU5KHK2OCZ-VERTEX460
SCSI WWN: 5e83a970e3f8ae05
</pre>
h3. Смотрим какому виртуальному устройству соответствует сбойный физический диск
*megacli -LdPdInfo -a0 -nolog*
<pre>
Virtual Drive: 5 (Target Id: 5)
Name :r0-2-ssd
RAID Level : Primary-0, Secondary-0, RAID Level Qualifier-0
Size : 446.625 GB
Sector Size : 512
Parity Size : 0
State : Optimal
Strip Size : 64 KB
Number Of Drives : 1
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: No
LD has drives that support T10 power conditions: No
LD's IO profile supports MAX power savings with cached writes: No
Bad Blocks Exist: No
Is VD Cached: No
Number of Spans: 1
Span: 0 - Number of PDs: 1
PD: 0 Information
Enclosure Device ID: 32
Slot Number: 15
Drive's position: DiskGroup: 5, Span: 0, Arm: 0
Enclosure position: 1
Device Id: 15
WWN: 5e83a970e3f8ae05
Sequence Number: 2
Media Error Count: 0
Other Error Count: 3
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.625 GB [0x37d40000 Sectors]
Sector Size: 0
Firmware state: Online, Spun Up
Device Firmware Level: 1.0
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x500056b36789abdc
Connected Port Number: 0(path0)
Inquiry Data: OCZ-6R12G0UG3MU5KHK2OCZ-VERTEX460 1.0
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: Not Certified
Drive Temperature : N/A
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
</pre>
h3. Смотрим массив
*megacli -LDGetProp -Name -L5 -a0 -nolog*
<pre>
Adapter 0-VD 5(target id: 5): Name: r0-2-ssd
Exit Code: 0x00
</pre>
h1. Выводим диск
h2. Разбираем массив
*megacli -CfgLdDel -L5 -a0 -nolog*
<pre>
Adapter 0: Deleted Virtual Drive-5(target id-5)
Exit Code: 0x00
</pre>
h2. Смотрим физический диск по его Enclosure Device ID и Slot Number - [E:S]
*megacli -pdInfo -PhysDrv [32:15] -a0 -nolog*
<pre>
Enclosure Device ID: 32
Slot Number: 15
Enclosure position: 1
Device Id: 15
WWN: 5e83a970e3f8ae05
Sequence Number: 3
Media Error Count: 0
Other Error Count: 3
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.625 GB [0x37d40000 Sectors]
Sector Size: 0
Firmware state: Unconfigured(good), Spun Up
Device Firmware Level: 1.0
Shield Counter: 0
Successful diagnostics completion on : N/A
SAS Address(0): 0x500056b36789abdc
Connected Port Number: 0(path0)
Inquiry Data: OCZ-6R12G0UG3MU5KHK2OCZ-VERTEX460 1.0
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: Not Certified
Drive Temperature : N/A
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
Exit Code: 0x00
</pre>