Esta web utiliza cookies, puedes ver nuestra política de cookies, aquí Si continuas navegando estás aceptándola

Gestión básica controladoras LSI


LSI es un fabricante de controladoras de disco muy común, para administrar dichas controladoras es necesario utilizar sus herramientas propietarias, megacli y storcli. Este artículo es una guía rápida sobre dichas herramientas ya que su uso no es todo lo intuitivo que debería.

Primero identificamos nuestra controladora de discos:

emerge sys-apps/lshw sys-apps/hwinfo
lshw -c storage

  *-storage                 
       description: RAID bus controller
       product: MegaRAID SAS 2208 [Thunderbolt]
       vendor: LSI Logic / Symbios Logic
       physical id: 0
       bus info: pci@0000:05:00.0
       logical name: scsi0
       version: 05
       width: 64 bits
       clock: 33MHz
       capabilities: storage pm pciexpress vpd msi msix bus_master cap_list rom
       configuration: driver=megaraid_sas latency=0
       resources: irq:26 ioport:e000(size=256) memory:fb660000-fb663fff memory:fb600000-fb63ffff memory:fb640000-fb65ffff

Podemos ver el disco virtual que la controladora le presenta al SO:

lshw -c disk

  *-disk                   
       description: SCSI Disk
       product: MR9271-4i
       vendor: LSI
       physical id: 2.0.0
       bus info: scsi@0:2.0.0
       logical name: /dev/sda
       version: 3.46
       serial: 0073116a08df6cf522e042a000b00506
       size: 1489GiB (1599GB)
       capabilities: gpt-1.00 partitioned partitioned:gpt
       configuration: ansiversion=5 guid=c79be1ec-7872-48b5-99da-5d11ce5e4f2f logicalsectorsize=512 sectorsize=4096

Otros comandos útiles son:

lshw -c volume
hwinfo --disk
hwinfo --partition
hwinfo --scsi
hwinfo --storage-ctrl

Nos bajamos el binario de la utilidad megacli desde la web de Broadcom:

https://www.broadcom.com/site-search?q=megacli

Consultamos el estado del RAID/Controladora:

megacli -LDInfo -Lall -aALL

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 1.454 TB
Sector Size         : 512
Is VD emulated      : Yes
Mirror Data         : 1.454 TB
State               : Optimal
Strip Size          : 256 KB
Number Of Drives per span:2
Span Depth          : 2
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
Bad Blocks Exist: No
PI type: No PI

Is VD Cached: No
Exit Code: 0x00

NOTA: El RAID Level siempre mostrará dos cifras incluso teniendo un RAID1 saldrá Primary-1, Secondary-0, cuando consultamos los discos vemos que si hay dos se trata de un raid 1 si son mas discos es un raid 10.

Consultamos los discos disponibles:

megacli -PDList -aALL

Adapter #0
Enclosure Device ID: 252
Slot Number: 0
Drive's position: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: N/A
Device Id: 5
WWN: 55cd2e404b79f459
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: 745.211 GB [0x5d26ceb0 Sectors]
Non Coerced Size: 744.711 GB [0x5d16ceb0 Sectors]
Coerced Size: 744.687 GB [0x5d160000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  4096
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: 0380
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x4433221103000000
Connected Port Number: 3(path0)
Inquiry Data: BTWH509601KE800CGN  INTEL SSDSC2BB800H4                     D2010380
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 :20C (68.00 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : Enabled
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No

Enclosure Device ID: 252
Slot Number: 1
Drive's position: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: N/A
Device Id: 7
WWN: 55cd2e404b79e517
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: 745.211 GB [0x5d26ceb0 Sectors]
Non Coerced Size: 744.711 GB [0x5d16ceb0 Sectors]
Coerced Size: 744.687 GB [0x5d160000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  4096
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: 0380
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x4433221102000000
Connected Port Number: 2(path0)
Inquiry Data: BTWH509503N7800CGN  INTEL SSDSC2BB800H4                     D2010380
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 :22C (71.60 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : Enabled
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No

Enclosure Device ID: 252
Slot Number: 2
Drive's position: DiskGroup: 0, Span: 1, Arm: 0
Enclosure position: N/A
Device Id: 6
WWN: 55cd2e404b78e1c7
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: 745.211 GB [0x5d26ceb0 Sectors]
Non Coerced Size: 744.711 GB [0x5d16ceb0 Sectors]
Coerced Size: 744.687 GB [0x5d160000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  4096
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: 0380
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x4433221101000000
Connected Port Number: 1(path0)
Inquiry Data: BTWH50710063800CGN  INTEL SSDSC2BB800H4                     D2010380
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 :22C (71.60 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : Enabled
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No

Enclosure Device ID: 252
Slot Number: 3
Drive's position: DiskGroup: 0, Span: 1, Arm: 1
Enclosure position: N/A
Device Id: 4
WWN: 55cd2e404b79f164
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: 745.211 GB [0x5d26ceb0 Sectors]
Non Coerced Size: 744.711 GB [0x5d16ceb0 Sectors]
Coerced Size: 744.687 GB [0x5d160000 Sectors]
Sector Size:  512
Logical Sector Size:  512
Physical Sector Size:  4096
Firmware state: Online, Spun Up
Commissioned Spare : No
Emergency Spare : No
Device Firmware Level: 0380
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x4433221100000000
Connected Port Number: 0(path0)
Inquiry Data: BTWH5096013E800CGN  INTEL SSDSC2BB800H4                     D2010380
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 :22C (71.60 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive's NCQ setting : Enabled
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

También podemos consultar toda la información con un solo comando:

megacli -LdPdInfo -aAll

StorCLI es la evolución de MegaCLI, nos bajamos el binario de la web de Broadcom:

https://www.broadcom.com/site-search?q=storcli

Nos habremos descargado un rpm, lo convertimos a tgz:

emerge -av app-arch/alien

mkdir storcli
mv 1-03-11_StorCLI.zip storcli
unzip 1-03-11_StorCLI.zip
cd StorCli_All_OS/Linux/
alien --to-tgz storcli-1.03.11-1.noarch.rpm
tar xvzf storcli-1.03.11.tgz
cp ./opt/MegaRAID/storcli/storcli64 /usr/bin/storcli

Obtenemos la información general:

storcli /c0 /vall show all
Controller = 0
Status = Success
Description = None

/c0/v0 :
======

----------------------------------------------------------
DG/VD TYPE   State Access Consist Cache sCC     Size Name
----------------------------------------------------------
0/0   RAID10 Optl  RW     Yes     RWTD  -   1.454 TB      
----------------------------------------------------------

Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|dgrd=Degraded
Optl=Optimal|RO=Read Only|RW=Read Write|B=Blocked|Consist=Consistent|
Ra=Read Ahead Adaptive|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack|
AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=Scheduled
Check Consistency

PDs for VD 0 :
============

----------------------------------------------------------------------------
EID:Slt DID State DG       Size Intf Med SED PI SeSz Model               Sp
----------------------------------------------------------------------------
252:0     5 Onln   0 744.687 GB SATA SSD N   N  512B INTEL SSDSC2BB800H4 U  
252:1     7 Onln   0 744.687 GB SATA SSD N   N  512B INTEL SSDSC2BB800H4 U  
252:2     6 Onln   0 744.687 GB SATA SSD N   N  512B INTEL SSDSC2BB800H4 U  
252:3     4 Onln   0 744.687 GB SATA SSD N   N  512B INTEL SSDSC2BB800H4 U  
----------------------------------------------------------------------------

EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup
DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare
UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface
Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info
SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign

VD0 Properties :
==============
Strip Size = 256 KB
Is VD emulated = Yes
Span Depth = 2
Number of Drives Per Span = 2
Disk Cache Policy = Enabled
Encryption = None
Data Protection = Disabled
Active Operations = None
Exposed to OS = Yes
Creation Date = 02-08-2018
Creation Time = 07:18:55 AM
Emulation type = 512E

Consultamos la información detallada de los discos:

storcli /c0 /eall /sall show all

Controller = 0
Status = Success
Description = Show Drive Information Succeeded.

Drive /c0/e252/s0 :
=================

----------------------------------------------------------------------------
EID:Slt DID State DG       Size Intf Med SED PI SeSz Model               Sp
----------------------------------------------------------------------------
252:0     5 Onln   0 744.687 GB SATA SSD N   N  512B INTEL SSDSC2BB800H4 U  
----------------------------------------------------------------------------

EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup
DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare
UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface
Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info
SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign

Drive /c0/e252/s0 - Detailed Information :
========================================

Drive /c0/e252/s0 State :
=======================
Shield Counter = 0
Media Error Count = 0
Other Error Count = 0
BBM Error Count = 0
Drive Temperature =  20C (68.00 F)
Predictive Failure Count = 0
S.M.A.R.T alert flagged by drive = No

Drive /c0/e252/s0 Device attributes :
===================================
SN = BTWH509601KE800CGN  
WWN = 55cd2e404b79f459
Firmware Revision = 0380
Raw size = 745.211 GB [0x5d26ceb0 Sectors]
Coerced size = 744.687 GB [0x5d160000 Sectors]
Non Coerced size = 744.711 GB [0x5d16ceb0 Sectors]
Device Speed = 6.0Gb/s
Link Speed = 6.0Gb/s
Drive write cache = Enabled
Logical Sector Size = 512B
Physical Sector Size = 4 KB

Drive /c0/e252/s0 Policies/Settings :
===================================
Drive position = DriveGroup:0, Span:0, Row:0
Enclosure position = 0
Connected Port Number = 3(path0)
Sequence Number = 2
Commissioned Spare = No
Emergency Spare = No
Last Predictive Failure Event Sequence Number = 0
Successful diagnostics completion on = N/A
SED Capable = No
SED Enabled = No
Secured = No
Locked = No
Needs EKM Attention = No
PI Eligible = No
Wide Port Capable = No

Port Information :
================

-----------------------------------------
Port Status Linkspeed SAS address        
-----------------------------------------
   0 Active 6.0Gb/s   0x4433221103000000
-----------------------------------------

Inquiry Data =
40 00 ff 3f 37 c8 10 00 00 00 00 00 3f 00 00 00
00 00 00 00 54 42 48 57 30 35 36 39 31 30 45 4b
30 38 43 30 4e 47 20 20 00 00 00 00 00 00 32 44
31 30 33 30 30 38 4e 49 45 54 20 4c 53 53 53 44
32 43 42 42 30 38 48 30 20 34 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 01 80
00 40 00 2f 00 40 00 00 00 00 07 00 ff 3f 10 00
3f 00 10 fc fb 00 01 b1 ff ff ff 0f 00 00 07 00

Drive /c0/e252/s1 :
=================

----------------------------------------------------------------------------
EID:Slt DID State DG       Size Intf Med SED PI SeSz Model               Sp
----------------------------------------------------------------------------
252:1     7 Onln   0 744.687 GB SATA SSD N   N  512B INTEL SSDSC2BB800H4 U  
----------------------------------------------------------------------------

EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup
DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare
UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface
Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info
SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign

Drive /c0/e252/s1 - Detailed Information :
========================================

Drive /c0/e252/s1 State :
=======================
Shield Counter = 0
Media Error Count = 0
Other Error Count = 0
BBM Error Count = 0
Drive Temperature =  21C (69.80 F)
Predictive Failure Count = 0
S.M.A.R.T alert flagged by drive = No

Drive /c0/e252/s1 Device attributes :
===================================
SN = BTWH509503N7800CGN  
WWN = 55cd2e404b79e517
Firmware Revision = 0380
Raw size = 745.211 GB [0x5d26ceb0 Sectors]
Coerced size = 744.687 GB [0x5d160000 Sectors]
Non Coerced size = 744.711 GB [0x5d16ceb0 Sectors]
Device Speed = 6.0Gb/s
Link Speed = 6.0Gb/s
Drive write cache = Enabled
Logical Sector Size = 512B
Physical Sector Size = 4 KB

Drive /c0/e252/s1 Policies/Settings :
===================================
Drive position = DriveGroup:0, Span:0, Row:1
Enclosure position = 0
Connected Port Number = 2(path0)
Sequence Number = 2
Commissioned Spare = No
Emergency Spare = No
Last Predictive Failure Event Sequence Number = 0
Successful diagnostics completion on = N/A
SED Capable = No
SED Enabled = No
Secured = No
Locked = No
Needs EKM Attention = No
PI Eligible = No
Wide Port Capable = No

Port Information :
================

-----------------------------------------
Port Status Linkspeed SAS address        
-----------------------------------------
   0 Active 6.0Gb/s   0x4433221102000000
-----------------------------------------

Inquiry Data =
40 00 ff 3f 37 c8 10 00 00 00 00 00 3f 00 00 00
00 00 00 00 54 42 48 57 30 35 35 39 33 30 37 4e
30 38 43 30 4e 47 20 20 00 00 00 00 00 00 32 44
31 30 33 30 30 38 4e 49 45 54 20 4c 53 53 53 44
32 43 42 42 30 38 48 30 20 34 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 01 80
00 40 00 2f 00 40 00 00 00 00 07 00 ff 3f 10 00
3f 00 10 fc fb 00 01 b1 ff ff ff 0f 00 00 07 00

Drive /c0/e252/s2 :
=================

----------------------------------------------------------------------------
EID:Slt DID State DG       Size Intf Med SED PI SeSz Model               Sp
----------------------------------------------------------------------------
252:2     6 Onln   0 744.687 GB SATA SSD N   N  512B INTEL SSDSC2BB800H4 U  
----------------------------------------------------------------------------

EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup
DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare
UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface
Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info
SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign

Drive /c0/e252/s2 - Detailed Information :
========================================

Drive /c0/e252/s2 State :
=======================
Shield Counter = 0
Media Error Count = 0
Other Error Count = 0
BBM Error Count = 0
Drive Temperature =  22C (71.60 F)
Predictive Failure Count = 0
S.M.A.R.T alert flagged by drive = No

Drive /c0/e252/s2 Device attributes :
===================================
SN = BTWH50710063800CGN  
WWN = 55cd2e404b78e1c7
Firmware Revision = 0380
Raw size = 745.211 GB [0x5d26ceb0 Sectors]
Coerced size = 744.687 GB [0x5d160000 Sectors]
Non Coerced size = 744.711 GB [0x5d16ceb0 Sectors]
Device Speed = 6.0Gb/s
Link Speed = 6.0Gb/s
Drive write cache = Enabled
Logical Sector Size = 512B
Physical Sector Size = 4 KB

Drive /c0/e252/s2 Policies/Settings :
===================================
Drive position = DriveGroup:0, Span:1, Row:0
Enclosure position = 0
Connected Port Number = 1(path0)
Sequence Number = 2
Commissioned Spare = No
Emergency Spare = No
Last Predictive Failure Event Sequence Number = 0
Successful diagnostics completion on = N/A
SED Capable = No
SED Enabled = No
Secured = No
Locked = No
Needs EKM Attention = No
PI Eligible = No
Wide Port Capable = No

Port Information :
================

-----------------------------------------
Port Status Linkspeed SAS address        
-----------------------------------------
   0 Active 6.0Gb/s   0x4433221101000000
-----------------------------------------

Inquiry Data =
40 00 ff 3f 37 c8 10 00 00 00 00 00 3f 00 00 00
00 00 00 00 54 42 48 57 30 35 31 37 30 30 33 36
30 38 43 30 4e 47 20 20 00 00 00 00 00 00 32 44
31 30 33 30 30 38 4e 49 45 54 20 4c 53 53 53 44
32 43 42 42 30 38 48 30 20 34 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 01 80
00 40 00 2f 00 40 00 00 00 00 07 00 ff 3f 10 00
3f 00 10 fc fb 00 01 b1 ff ff ff 0f 00 00 07 00

Drive /c0/e252/s3 :
=================

----------------------------------------------------------------------------
EID:Slt DID State DG       Size Intf Med SED PI SeSz Model               Sp
----------------------------------------------------------------------------
252:3     4 Onln   0 744.687 GB SATA SSD N   N  512B INTEL SSDSC2BB800H4 U  
----------------------------------------------------------------------------

EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup
DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare
UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface
Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info
SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign

Drive /c0/e252/s3 - Detailed Information :
========================================

Drive /c0/e252/s3 State :
=======================
Shield Counter = 0
Media Error Count = 0
Other Error Count = 0
BBM Error Count = 0
Drive Temperature =  22C (71.60 F)
Predictive Failure Count = 0
S.M.A.R.T alert flagged by drive = No

Drive /c0/e252/s3 Device attributes :
===================================
SN = BTWH5096013E800CGN  
WWN = 55cd2e404b79f164
Firmware Revision = 0380
Raw size = 745.211 GB [0x5d26ceb0 Sectors]
Coerced size = 744.687 GB [0x5d160000 Sectors]
Non Coerced size = 744.711 GB [0x5d16ceb0 Sectors]
Device Speed = 6.0Gb/s
Link Speed = 6.0Gb/s
Drive write cache = Enabled
Logical Sector Size = 512B
Physical Sector Size = 4 KB

Drive /c0/e252/s3 Policies/Settings :
===================================
Drive position = DriveGroup:0, Span:1, Row:1
Enclosure position = 0
Connected Port Number = 0(path0)
Sequence Number = 2
Commissioned Spare = No
Emergency Spare = No
Last Predictive Failure Event Sequence Number = 0
Successful diagnostics completion on = N/A
SED Capable = No
SED Enabled = No
Secured = No
Locked = No
Needs EKM Attention = No
PI Eligible = No
Wide Port Capable = No

Port Information :
================

-----------------------------------------
Port Status Linkspeed SAS address        
-----------------------------------------
   0 Active 6.0Gb/s   0x4433221100000000
-----------------------------------------

Inquiry Data =
40 00 ff 3f 37 c8 10 00 00 00 00 00 3f 00 00 00
00 00 00 00 54 42 48 57 30 35 36 39 31 30 45 33
30 38 43 30 4e 47 20 20 00 00 00 00 00 00 32 44
31 30 33 30 30 38 4e 49 45 54 20 4c 53 53 53 44
32 43 42 42 30 38 48 30 20 34 20 20 20 20 20 20
20 20 20 20 20 20 20 20 20 20 20 20 20 20 01 80
00 40 00 2f 00 40 00 00 00 00 07 00 ff 3f 10 00
3f 00 10 fc fb 00 01 b1 ff ff ff 0f 00 00 07 00

Hay veces en las que nos será útil iluminar el led de un disco en concreto, por ejemplo para que un manos remotas nos cambie dicho disco.
Localizamos el disco y anotamos los datos:

megacli -PDList -aALL
Adapter #0
Enclosure Device ID: 252
Slot Number: 1

Iluminamos el led del disco:

megacli -PdLocate -start -physdrv[252:1]  -aALL
Adapter: 0: Device at EnclId-252 SlotId-1  -- PD Locate Start Command was successfully sent to Firmware

Apagamos el led:

megacli -PdLocate -stop  -physdrv[252:1]  -aALL
Adapter: 0: Device at EnclId-252 SlotId-1  -- PD Locate Stop Command was successfully sent to Firmware

Marcamos como offline el disco:

megacli -pdoffline -physdrv[252:1] -a0  
Adapter: 0: EnclId-252 SlotId-1 state changed to OffLine.
Exit Code: 0x00

Marcamos el disco como missing:

megacli -pdmarkmissing -physdrv[252:1] -aAll
EnclId-252 SlotId-1 is marked Missing.
Exit Code: 0x00

Preparamos el disco para ser extraido:

megacli  -pdprprmv -physdrv[252:1] -a0
Prepare for removal Success
Exit Code: 0x00

Cambiamos el disco físicamente.

Consultamos el estado de los discos, normalmente se suele iniciar la reconstrucción de datos de forma automática:

storcli /c0 /eall /sall show
Drive Information :
=================

-------------------------------------------------------------------------
EID:Slt DID State DG       Size Intf Med SED PI SeSz Model            Sp
-------------------------------------------------------------------------
252:0     1 Onln   0 110.827 GB SATA SSD N   N  512B OCZ-TRION100     U  
252:1     0 Rbld   0 110.827 GB SATA SSD N   N  512B Corsair Force GT U  
-------------------------------------------------------------------------

Si la reconstrucción no se inició de forma automática, añadimos el disco al array:

megacli -PdReplaceMissing -PhysDrv[252:1] -Array0 -row1 -a0

Los datos necesarios para el comando anterior se han obtenido mediante diversos comandos:

252:1 --> storcli64 /c0 /eall /sall show
Array0 --> megacli -CfgDsply -aALL --> Span Reference: 0x00 hay que quitar 0x0 quedando 0
row0 --> 252:1 --> 1

El modo de obtener dichos datos se ha obtenido de la documentación:

The number N of the Array parameter is from the "Span Reference:" line you get using MegaCli -CfgDsply -aALL, minus the 0x0 part.
For VSM systems it's normally 0.  The number N of the row parameter is the Physical Disk in that span or array starting with zero (it can be but is not always the physical disk’s slot!).

Iniciamos la reconstrucción:

megacli -PDRbld -Start -PhysDrv[252:1] -a0

Podemos consultar el progreso de la recostrucción:

megacli -PDRbld -ShowProg -PhysDrv[252:1] -a0
Rebuild Progress on Device at Enclosure 252, Slot 1 Completed 14% in 3 Minutes.
Exit Code: 0x00

Si algún disco se reconfigura de forma automática como parte de un raid pero no debería, lo mejor es meter el disco correcto como sparse y marcar como inválido el disco incorrecto.

Supongamos que el disco correcto es 252:2, lo metemos como sparse:

megacli -PDHSP -Set -PhysDrv [252:2] -aALL

Marcamos como inválido el disco incorrecto:

megacli -pdoffline -physdrv[252:1] -a0

En este momento debería reconstruirse el raid con el disco 252:2.

Si necesitamos realizar alguna operación mas compleja siempre podemos consultar la documentación de Broadcom:

MegaRAIDSAS_VMware_UserGuide_RevB_51530-00.pdf
StorCLI_RefMan_revf.pdf


Autor: Kr0m -- 26/11/2018 22:49:35