wiki/HowtoPerccli.md

373 lines
12 KiB
Markdown
Raw Normal View History

2023-12-13 13:38:44 +01:00
- Documentation : [https://www.dell.com/support/kbdoc/en-uk/000177280/how-to-use-the-poweredge-raid-controller-perc-command-line-interface-cli-utility-to-manage-your-raid-controller]()
- Status de cette page : unstable / bullseye
2024-01-05 17:35:53 +01:00
[PERCCLI](https://www.dell.com/support/kbdoc/en-uk/000177280/how-to-use-the-poweredge-raid-controller-perc-command-line-interface-cli-utility-to-manage-your-raid-controller) est un utilitaire en ligne de commande permettant de gérer les contrôleurs RAID de Dell.
2023-12-13 13:38:44 +01:00
2024-01-05 17:35:53 +01:00
Dans notre usage PERCCLI remplace [MegaCLI](InfosMegaCLI). PERCCLI est en réalité un rebranding du logiciel [StorCLI](https://docs.broadcom.com/doc/12352476) édité par Broadcom.
2023-12-13 13:38:44 +01:00
# Installation
2024-01-08 11:43:20 +01:00
## PERCCLI
Version à installer par défaut.
2023-12-13 13:38:44 +01:00
On télécharge `perccli` et on l'installe dans `/usr/local/sbin/perccli` :
~~~(sh)
# curl -A notcurl -OL https://dl.dell.com/FOLDER09770976M/1/PERCCLI_7.2313.0_A14_Linux.tar.gz
# bsdtar -xOf PERCCLI_7.2313.0_A14_Linux.tar.gz PERCCLI_7.2313.0_A14_Linux/perccli-007.2313.0000.0000-1.noarch.rpm |
bsdtar -C /usr/local/sbin/ -'s|\./opt/MegaRAID/perccli/perccli64|perccli|' -xf- ./opt/MegaRAID/perccli/perccli64
~~~
2024-01-08 11:43:20 +01:00
## PERCLLI2
Version à installer uniquement pour les adaptateurs Dell PERC H965i.
On télécharge `perccli2` et on l'installe dans `/usr/local/sbin/perccli2` :
~~~(sh)
# curl -A notcurl -OL https://dl.dell.com/FOLDER09970165M/1/perccli2_8.4.0.22_linux.tar.gz
# bsdtar -xOf perccli2_8.4.0.22_linux.tar.gz perccli2_8.4.0.22_linux/perccli2-008.0004.0000.0022-1.x86_64.rpm | bsdtar -C /usr/local/sbin/ -'s|\./opt/MegaRAID/perccli2/perccli2|perccli2|' -xf- ./opt/MegaRAID/perccli2/perccli2
~~~
2023-12-28 11:45:07 +01:00
# Pierre de rosette
| PERCCLI | MegaCLI | Description |
|------------------------------------+-----------------------------------------+-------------------|
| `perccli /call show all` | `megacli -adpallinfo -aALL` | Adaptateurs |
| `perccli /call/eall/sall show all` | `megacli -pdlist -aALL` | Disques physiques |
| `perccli /call/vall show all` | `megacli -LDInfo -Lall -aALL` | Disques virtuels |
| `perccli /call show events` | `megacli -AdpEventLog -GetEvents -aALL` | Logs |
| `perccli /call show alilog` | `megacli -AdpAlILog -aALL` | NVRAM logs |
[Documentation de Broadcom](https://www.broadcom.com/support/knowledgebase/1211161499760/lsi-command-line-interface-cross-reference-megacli-vs-twcli-vs-s) traduisant les commandes `MegaCLI` en equivalant
`StorCLI` (équivalant à `PERCCLI`).
2023-12-13 13:38:44 +01:00
# Explications
## Syntaxe de la ligne de commande
2024-01-05 17:35:53 +01:00
La commande `perccli` permet d'agir sur différents éléments des cartes RAID. Ci-dessous se trouve la liste des premiers arguments supporté par la commande associée à leurs éléments, `X` correspond à l'index (commençant à 0) de cet élément :
2023-12-13 13:38:44 +01:00
2024-01-05 17:35:53 +01:00
- `/cX` : un contrôleur
2023-12-13 13:38:44 +01:00
- `/eX` : un ¿berceau? (*enclosure*)
- `/sX` : un emplacement (*slot*)
- `/vX` : un disque virtuel
- `/dX` : un groupe de disques
- `/fall` : la configuration externe (*foreign configuration*)
- `/pX` : un disque physique
- `/lnX` : une ligne (*Lane*)
- `/bbu` : la batterie (*battery backup unit*)
- `/cv` : le cache (*cache vault*)
Par exemple pour avoir l'état du premier controleur (son index est donc 0) il faut faire `perccli /c0 show`.
2024-01-05 17:35:53 +01:00
Pour avoir une sortie en JSON d'une commande il suffit de la suffixer avec l'argument `J`. Par exemple pour avoir l'état du la batterie du premier contrôleur en JSON il faut exécuter `perccli /c0/bbu show J`.
2023-12-13 13:38:44 +01:00
2023-12-28 11:45:07 +01:00
## Exemple de sortie de la commande
```
# perccli show
CLI Version = 007.2313.0000.0000 Mar 07, 2023
Operating system = Linux 6.1.0-16-amd64
Status Code = 0
Status = Success
Description = None
Number of Controllers = 1
Host Name = parbackup4bis
Operating System = Linux 6.1.0-16-amd64
System Overview :
===============
-------------------------------------------------------------------------
Ctl Model Ports PDs DGs DNOpt VDs VNOpt BBU sPR DS EHS ASOs Hlth
-------------------------------------------------------------------------
0 PERCH755Front 16 4 1 0 1 0 Opt On - N 0 Opt
-------------------------------------------------------------------------
Ctl=Controller Index|DGs=Drive groups|VDs=Virtual drives|Fld=Failed
PDs=Physical drives|DNOpt=Array NotOptimal|VNOpt=VD NotOptimal|Opt=Optimal
Msng=Missing|Dgd=Degraded|NdAtn=Need Attention|Unkwn=Unknown
sPR=Scheduled Patrol Read|DS=DimmerSwitch|EHS=Emergency Spare Drive
Y=Yes|N=No|ASOs=Advanced Software Options|BBU=Battery backup unit/CV
Hlth=Health|Safe=Safe-mode boot|CertProv-Certificate Provision mode
Chrg=Charging | MsngCbl=Cable Failure
```
2023-12-13 13:38:44 +01:00
## Abréviations de la sortie standard
De nombreuses abréviations sont utilisées dans la sortie standard, en voici une **liste non exhaustive** :
- ASOs : Advanced Software Options
- AWB : Always WriteBack
- AftrLD : Identify Freespace After LD
- AftrVD : Identify Freespace After VD
- Alms : Alarm count
- Arr : Array Index
- B : Blocked
- BBU : Battery backup unit/CV
- BT : Background Task Active
- C : Cached IO
- CBShld : Copyback Shielded
- CFShld : Configured shielded
- CO : Cache Offload
- CR : CacheCade(Read)
- CW : CacheCade(Read/Write)
- Cac : CacheCade
- CertProv : Certificate Provision mode
- Chrg : Charging
- Cl : Cluster
- Cmp : Compatible Profile
- Consist : Consistent
- Cpybck : CopyBack
- Ctl : Controller Index
- Curr : Current Profile
- DG : Drive Group
- DGs : Drive groups
- DHS : Dedicated Hot Spare
- DID : Device ID
- DNOpt : Array NotOptimal
- DS3 : Dimmer Switch 3
- DS : DimmerSwitch
- Dflt : Default Profile
- Dgd : Degraded
- Dgrd : Degraded
- EHS : Emergency Spare Drive
- EID : Enclosure Device ID
- F : Foreign
- FC : Flush Commands
- FP : Fast Path
- FSpace : Free Space Present
- FUA : Force Unit Access
- Fld : Failed
- FreSpc : Freespace available before expansion
- Frgn : Foreign
- GHS : Global Hotspare
- HA : High Availability
- HD : Hidden
- HSPShld : Hotspare shielded
- Hlth : Health
- IOPs : IO per second
- InDwdCnt : Invalid Dword Count
- Intf : Interface
- InvalDwdCnt : Invalid Dword count
- LosOfDwrdSynCnt : Loss of Dword synchronization count
- LsDwSyCnt : Loss of Dword system Count
- MD : Max Disks
- MaxAHCIDev : Maximum AHCI Devices
- MaxLD : Maximum Logical Drives
- MaxPCIeDev : Maximum PCIe Devices
- MaxPhyDrv : Maximum Physical Drives
- Med : Media Type
- Msng : Missing
- MsngCbl : Cable Failure
- MsngCbl : Missing Cable
- N : No
- NR : No Read Ahead
- NdAtn : Need Attention
- NoArrExp : Without Array Expansion
- OCE : Online Capacity Expansion
- OfLn : OffLine
- Offln : Offline
- Onln : Online
- Opt : Optimal
- Optl : Optimal
- Optm : Optimal Profile
- PD : Physical drive count
- PDC : Drive Cache
- PDC : PD Cache
- PDs : Physical drives
- PI : Protection Info
- PNO : Phy Number
- PS : Power Supply Count
- Pdgd : Partially degraded
- Pend : Pending Profile
- PhyNo : Phy Number
- PhyResetPrbCnt : Phy reset problem count
- ProdID : Product ID
- ProfID : Profile ID
- R : Read Ahead Always
- RC : Read Commands
- RF : Reduced Feature Set
- RO : Read Only
- RW : Read Write
- Rbld : Rebuild
- Re : Recovery
- Read RT : Average Read Response Time
- Rec : Recovery
- RepInProg : Repair in progress
- RnDiErCnt : Running Disparity Error Count
- Row : Row Index
- RungDispartyErrCnt : Running Disparity error count
- SED : Self Encrypting Drive
- SIM : SIM Count
- SR : Sectors Read
- SS : Safe Store
- SSHA : Single server High Availability
- SW-FUA : Sectors written with FUA
- SW : Sectors written
- Safe : Safe-mode boot
- SeSz : Sector Size
- SlotBP : Bays On Port
- Sntze : Sanitize
- Sp : Spun
- Span : Span Index
- T : TransitioTRANS=TransportReady
- TSs : Temperature Sensor count
- Temperature : Temperature in Degree Celsius
- Total RT : Average Total Response Time
- Type : Drive Type
- UBUnsp : UBad Unsupported
- UBad : Unconfigured Bad
- UGShld : UGood shielded
- UGUnsp : UGood Unsupported
- UGood : Unconfigured Good
- Unkwn : Unknown
- VD : Virtual Drive
- VDs : Virtual drives
- WB : WriteBack
- WBSup : Write Back Support
- WC-FUA : Write Commands with FUA
- WT : WriteThrough
- Write RT : Average Write Response Time
- X : Not Available/Not Installed
- Xfer Rate : Transfer Rate
- Y : Yes
- dflt : Default
- sCC : Scheduled
- sPR : Scheduled Patrol Read
- us : micro seconds
# Utilisation
2024-01-05 17:35:53 +01:00
## Avoir un aperçu des contrôleurs RAID d'un système
2023-12-13 13:38:44 +01:00
~~~
# perccli /c0/bbu show all
CLI Version = 007.2313.0000.0000 Mar 07, 2023
Operating system = Linux 5.10.0-24-amd64
Status Code = 0
Status = Success
Description = None
Number of Controllers = 1
Host Name = foo
Operating System = Linux 5.10.0-24-amd64
System Overview :
===============
---------------------------------------------------------------------------
Ctl Model Ports PDs DGs DNOpt VDs VNOpt BBU sPR DS EHS ASOs Hlth
---------------------------------------------------------------------------
0 PERCH750Adapter 8 10 4 0 4 0 Opt On - N 0 Opt
---------------------------------------------------------------------------
Ctl=Controller Index|DGs=Drive groups|VDs=Virtual drives|Fld=Failed
PDs=Physical drives|DNOpt=Array NotOptimal|VNOpt=VD NotOptimal|Opt=Optimal
Msng=Missing|Dgd=Degraded|NdAtn=Need Attention|Unkwn=Unknown
sPR=Scheduled Patrol Read|DS=DimmerSwitch|EHS=Emergency Spare Drive
Y=Yes|N=No|ASOs=Advanced Software Options|BBU=Battery backup unit/CV
Hlth=Health|Safe=Safe-mode boot|CertProv-Certificate Provision mode
Chrg=Charging | MsngCbl=Cable Failure
~~~
2023-12-28 11:45:07 +01:00
# Mode d'emploi
## Actions sur les disques physiques
### Localiser un disque
Faire clignoter un disque :
controler=0 ; enclosure=252 ; slot=0
perccli "/c${controler}/e${enclosure}/s${slot}" start locate
Arrêter le clignotement d’un disque :
controler=0 ; enclosure=252 ; slot=0
perccli "/c${controler}/e${enclosure}/s${slot}" stop locate
### Passer un disque en OFFLINE
controler=0 ; enclosure=252 ; slot=0
perccli "/c${controler}/e${enclosure}/s${slot}" set offline
### Passer un disque en ONLINE
**!!! ATTENTION !!! ATTENTION !!! ATTENTION !!!**
Lerreur 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 :
controler=0 ; enclosure=252 ; slot=0
perccli "/c${controler}/e${enclosure}/s${slot}" set online
### Passer un disque en missing
controler=0 ; enclosure=252 ; slot=0
perccli "/c${controler}/e${enclosure}/s${slot}" set online
Ça le sort du RAID.
2024-01-05 17:35:53 +01:00
### Contrôler la rotation d'un disque rotatif
2023-12-28 11:45:07 +01:00
Stopper la rotation dun disque, dans le but de le retirer :
controler=0 ; enclosure=252 ; slot=0
perccli "/c${controler}/e${enclosure}/s${slot}" spindown
Activer la rotation dun disque :
controler=0 ; enclosure=252 ; slot=0
perccli "/c${controler}/e${enclosure}/s${slot}" spinup
### Lancer la reconstruction d’un disque
controler=0 ; enclosure=252 ; slot=0
perccli "/c${controler}/e${enclosure}/s${slot}" start rebuild
### Contrôler la reconstruction d’un disque
controler=0 ; enclosure=252 ; slot=0
perccli "/c${controler}/e${enclosure}/s${slot}" show rebuild
## Actions sur les disques virtuels
### Extensions à chaud d’un disque virtuel
controler=0 ; virtual=239 ; size=1337
perccli "/c${controler}/v${virtual}" expand "Size=$size"
2024-01-05 17:35:53 +01:00
### Suivre l'extension d'un disque virtuel
2023-12-28 11:45:07 +01:00
controler=0 ; virtual=239
perccli "/c${controler}/v${virtual}" show expansion
## Actions sur les controleurs disques
### Accéder aux logs d’un controller
controler=0
perccli "/c${controler}" show alilog