326 lines
9.2 KiB
Markdown
326 lines
9.2 KiB
Markdown
---
|
||
title: RAID Hardware sur serveur DELL avec contrôleur PERC
|
||
---
|
||
|
||
**Cette page a été importée automatiquement de notre ancien wiki mais n'a pas encore été révisée.**
|
||
|
||
|
||
<http://hwraid.le-vert.net/wiki/LSIMegaRAIDSAS>
|
||
|
||
## Remplacement d'un disque HS
|
||
|
||
Vous avez un disque HS, par exemple le disque 0, qui clignote.
|
||
Vous constatez ainsi le `Firmware state: Failed` :
|
||
|
||
~~~
|
||
# /opt/MegaCli -PDList -a0
|
||
|
||
Adapter #0
|
||
|
||
Enclosure Device ID: 32
|
||
Slot Number: 0
|
||
Device Id: 0
|
||
Sequence Number: 2
|
||
Media Error Count: 0
|
||
Other Error Count: 0
|
||
Predictive Failure Count: 0
|
||
Last Predictive Failure Event Seq Number: 0
|
||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||
Firmware state: Failed
|
||
SAS Address(0): 0x5000c5000b0b1c51
|
||
SAS Address(1): 0x0
|
||
Connected Port Number: 0(path0)
|
||
|
||
Enclosure Device ID: 32
|
||
Slot Number: 1
|
||
Device Id: 1
|
||
Sequence Number: 2
|
||
Media Error Count: 0
|
||
Other Error Count: 0
|
||
Predictive Failure Count: 0
|
||
Last Predictive Failure Event Seq Number: 0
|
||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||
Firmware state: Online
|
||
SAS Address(0): 0x5000c5000b0b4355
|
||
SAS Address(1): 0x0
|
||
Connected Port Number: 1(path0)
|
||
~~~
|
||
|
||
Vous le remplacez à chaud… et vous constatez qu'il ne se reconstruit pas tout seul.
|
||
Pas de panique. Notez déjà qu'il est possible que le nouveau disque apparaissent deux fois, une fois en `Firmware state: Unconfigured(bad)` et une autre en `Firmware state: Unconfigured(good)` :
|
||
|
||
~~~
|
||
Enclosure Device ID: 32
|
||
Slot Number: 0
|
||
Device Id: 0
|
||
Sequence Number: 2
|
||
Media Error Count: 0
|
||
Other Error Count: 0
|
||
Predictive Failure Count: 0
|
||
Last Predictive Failure Event Seq Number: 0
|
||
Raw Size: 0MB [0x0 Sectors]
|
||
Non Coerced Size: 9007199254740480MB [0xfffffffffff00000 Sectors]
|
||
Coerced Size: 0MB [0x0 Sectors]
|
||
Firmware state: Unconfigured(bad)
|
||
SAS Address(0): 0x5000c5002c5d18b5
|
||
SAS Address(1): 0x0
|
||
Connected Port Number: 0(path0)
|
||
|
||
Enclosure Device ID: N/A
|
||
Slot Number: 33
|
||
Device Id: 33
|
||
Sequence Number: 1
|
||
Media Error Count: 0
|
||
Other Error Count: 0
|
||
Predictive Failure Count: 0
|
||
Last Predictive Failure Event Seq Number: 0
|
||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||
Firmware state: Unconfigured(good)
|
||
SAS Address(0): 0x5000c5002c5d18b5
|
||
SAS Address(1): 0x0
|
||
Connected Port Number: 0(path0)
|
||
~~~
|
||
|
||
Après un petit reboot, seul `Firmware state: Unconfigured(good)` subsiste. Vous avez ainsi :
|
||
|
||
~~~
|
||
# /opt/MegaCli -PDList -a0
|
||
|
||
Adapter #0
|
||
|
||
Enclosure Device ID: 32
|
||
Slot Number: 0
|
||
Device Id: 0
|
||
Sequence Number: 1
|
||
Media Error Count: 0
|
||
Other Error Count: 0
|
||
Predictive Failure Count: 0
|
||
Last Predictive Failure Event Seq Number: 0
|
||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||
Firmware state: Unconfigured(good)
|
||
SAS Address(0): 0x5000c5002c5d18b5
|
||
SAS Address(1): 0x0
|
||
Connected Port Number: 0(path0)
|
||
|
||
Enclosure Device ID: 32
|
||
Slot Number: 1
|
||
Device Id: 1
|
||
Sequence Number: 2
|
||
Media Error Count: 0
|
||
Other Error Count: 0
|
||
Predictive Failure Count: 0
|
||
Last Predictive Failure Event Seq Number: 0
|
||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||
Firmware state: Online
|
||
SAS Address(0): 0x5000c5000b0b4355
|
||
SAS Address(1): 0x0
|
||
Connected Port Number: 1(path0)
|
||
~~~
|
||
|
||
On s'intéresse ensuite à notre volume RAID1 dans ce cas :
|
||
|
||
~~~
|
||
# /opt/MegaCli -CfgDsply -a0
|
||
|
||
==============================================================================
|
||
Adapter: 0
|
||
Product Name: PERC 6/i Integrated
|
||
Memory: 256MB
|
||
BBU: Present
|
||
==============================================================================
|
||
Number of DISK GROUPS: 1
|
||
|
||
DISK GROUPS: 0
|
||
Number of Spans: 1
|
||
SPAN: 0
|
||
Span Reference: 0x00
|
||
Number of PDs: 2
|
||
Number of VDs: 1
|
||
Number of dedicated Hotspares: 0
|
||
Virtual Disk Information:
|
||
Virtual Disk: 0 (target id: 0)
|
||
Name:
|
||
RAID Level: Primary-1, Secondary-0, RAID Level Qualifier-0
|
||
Size:69376MB
|
||
State: Degraded
|
||
Stripe Size: 64kB
|
||
Number Of Drives:2
|
||
Span Depth:1
|
||
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
|
||
Access Policy: Read/Write
|
||
Disk Cache Policy: Disk's Default
|
||
Physical Disk Information:
|
||
Physical Disk: 0
|
||
Physical Disk: 1
|
||
Enclosure Device ID: 32
|
||
Slot Number: 1
|
||
Device Id: 1
|
||
Sequence Number: 2
|
||
Media Error Count: 0
|
||
Other Error Count: 0
|
||
Predictive Failure Count: 0
|
||
Last Predictive Failure Event Seq Number: 0
|
||
Raw Size: 70007MB [0x88bb93a Sectors]
|
||
Non Coerced Size: 69495MB [0x87bb93a Sectors]
|
||
Coerced Size: 69376MB [0x8780000 Sectors]
|
||
Firmware state: Online
|
||
SAS Address(0): 0x5000c5000b0b4355
|
||
SAS Address(1): 0x0
|
||
Connected Port Number: 1(path0)
|
||
~~~
|
||
|
||
On veut donc remplacer `Physical Disk: 0` (row = 0) dans le `target id: 0` (array = 0) par notre nouveau disque identifié comme étant `[32:0]` ce qui donne :
|
||
|
||
~~~
|
||
# /opt/MegaCli -PdReplaceMissing -PhysDrv [32:0] -array0 -row0 -a0
|
||
Adapter: 0: Missing PD at Array 0, Row 0 is replaced.
|
||
~~~
|
||
|
||
Il devrait donc apparaître en `Firmware state: Offline`.
|
||
On lance enfin la reconstruction :
|
||
|
||
~~~
|
||
# /opt/MegaCli -PDRbld -Start -PhysDrv[32:0] -a0
|
||
Started rebuild progress on device(Encl-32 Slot-0)
|
||
~~~
|
||
|
||
Il passe donc en `Firmware state: Rebuild`.
|
||
On peut suivre sa reconstruction via :
|
||
|
||
~~~
|
||
# /opt/MegaCli -PDRbld -ShowProg -PhysDrv [32:0] -aALL
|
||
Rebuild Progress on Device at Enclosure 32, Slot 0 Completed 28% in 3 Minutes.
|
||
~~~
|
||
|
||
Une fois terminé, il apparaît en `Firmware state: Online` et les opérations sont terminées.
|
||
|
||
**!!! ATTENTION !!! ATTENTION !!! ATTENTION !!!**
|
||
|
||
L'erreur fatale à ne pas commettre lorsque vous constatez un disque en état `Firmware state: Failed` est de le forcer à revenir `Online`.
|
||
En effet, cela force à repasser en mode RAID sans reconstruction et vous pouvez dire adieu à votre système de fichiers. NE FAITES DONC *PAS* :
|
||
|
||
~~~
|
||
# /opt/MegaCli_ATTENTION -PDOnline -PhysDrv [32:0] -a0
|
||
EnclId-32 SlotId-0 state changed to OnLine.
|
||
~~~
|
||
|
||
Identifier un disque physiquement (faire clinoter la LED) :
|
||
|
||
~~~
|
||
/opt/MegaCli -PdLocate start -physdrv[<Enclosure Device ID>:<Slot Number>] -a0
|
||
~~~
|
||
|
||
## Ajout d'un disque dans un volume RAID5
|
||
|
||
Avoir un système avec la commande `omconfig`, par exemple, booter sur un Live-CD DELL OMSA (rappel, par défaut: login=root password=calvin) téléchargeable sur <http://linux.dell.com/files/openmanage-contributions/>
|
||
|
||
Pour connaître l'état des disques/volumes on utilisera `omreport` :
|
||
|
||
~~~
|
||
# omreport storage vdisk controller=0
|
||
# omreport storage pdisk controller=0
|
||
~~~
|
||
|
||
Et voilà un exemple qui ajoute un disque (ici `1:0:5`) sur un volume existant.
|
||
|
||
~~~
|
||
# omconfig storage vdisk action=reconfigure controller=0 vdisk=0 raid=r5 pdisk=0:0:0,0:0:1,0:0:2,0:0:3,1:0:5
|
||
Command successful!
|
||
~~~
|
||
|
||
Suite à cela, une loooongue phase de reconstruction du volume RAID.
|
||
|
||
## Performances
|
||
|
||
Si les performances lors d'un benchmark avec le cache FS désactivé sont ridicules (voir HowtoBenchmarks), il est possible que le cache du controlleur ne soit pas activé.
|
||
Dans ce cas, si le controlleur dispose d'une mémoire cache ET d'une batterie, on peut l'activer :
|
||
|
||
~~~
|
||
# /opt/MegaCli -AdpBbuCmd -GetBbuStatus -a0 | grep -e '^isSOHGood' -e '^Charger Status' -e '^Remaining Capacity'
|
||
Charger Status: Complete
|
||
Remaining Capacity: 1640 mAh
|
||
isSOHGood: Yes
|
||
~~~
|
||
|
||
La batterie est bonne, on peut l'activer :
|
||
|
||
~~~
|
||
# /opt/MegaCli -LDSetProp -Cached -LAll -aAll
|
||
|
||
Set Cache Policy to Cached on Adapter 0, VD 0 (target id: 0) success
|
||
Set Cache Policy to Cached on Adapter 0, VD 1 (target id: 1) success
|
||
|
||
Exit Code: 0x00
|
||
|
||
# /opt/MegaCli -LDSetProp EnDskCache -LAll -aAll
|
||
|
||
Set Disk Cache Policy to Enabled on Adapter 0, VD 0 (target id: 0) success
|
||
Set Disk Cache Policy to Enabled on Adapter 0, VD 1 (target id: 1) success
|
||
|
||
Exit Code: 0x00
|
||
|
||
# /opt/MegaCli -LDSetProp WB -LALL -aALL
|
||
|
||
Set Write Policy to WriteBack on Adapter 0, VD 0 (target id: 0) success
|
||
Set Write Policy to WriteBack on Adapter 0, VD 1 (target id: 1) success
|
||
|
||
Exit Code: 0x00
|
||
~~~
|
||
|
||
Et dans le cas ou la batterie subisse une defaillance, on demande à ce que le cache soit désactivé :
|
||
|
||
~~~
|
||
# /opt/MegaCli -LDSetProp NoCachedBadBBU -LALL -aALL
|
||
|
||
Set No Write Cache if bad BBU on Adapter 0, VD 0 (target id: 0) success
|
||
Set No Write Cache if bad BBU on Adapter 0, VD 1 (target id: 1) success
|
||
|
||
Exit Code: 0x00
|
||
~~~
|
||
|
||
Les débits en lecture/écriture devraient faire un bond !
|
||
|
||
## Ajout d'un nouveau volume RAID
|
||
|
||
Exemple avec l'ajout d'un volume RAID1 sur 2 nouveaux disques :
|
||
|
||
~~~
|
||
# /opt/MegaCli -CfgLdAdd -r1 [32:2,32:3] -a0
|
||
|
||
Adapter 0: Created VD 1
|
||
|
||
Adapter 0: Configured the Adapter!!
|
||
|
||
Exit Code: 0x00
|
||
~~~
|
||
|
||
Ou un disque simple :
|
||
|
||
~~~
|
||
# /opt/MegaCli -CfgLdAdd -r0 [252:3] -a0
|
||
|
||
Adapter 0: Created VD 2
|
||
|
||
Adapter 0: Configured the Adapter!!
|
||
|
||
Exit Code: 0x00
|
||
~~~
|
||
|
||
## Sauvegarde/restauration de la configuration
|
||
|
||
~~~
|
||
# megacli -CfgSave -f /home/backup/megacli_conf.dump -a0
|
||
|
||
# megacli -CfgRestore -f /home/backup/megacli_conf.dump -a0
|
||
~~~ |