MegaRAID Unconfigured Bad(UBad) 원인과 해결 방법

storcli64 명령어를 이용하여 이상증상 확인

1) storcli64 /cx/ex/sall show 명령으로 하드디스크 상태를 확인한다.
    – 62:1 하드디스크의 State가 UBad이고, DG(Drive Group)에서 제외되었다.

# storcli64 /c0/e62/sall show CLI Version =007.0504.0000.0000 Nov 22,2017 Operating system = Linux 3.8.0 Controller =0 Status = Success Description = Show Drive Information Succeeded. Drive Information :=================———————————————————————————-EID:Slt DID State DG Size Intf Med SEDPI SeSz Model Sp Type ———————————————————————————-62:05 Onln 01.818TBSATAHDDNN 512B WDCWD2005FBYZ-01YCBB2 U-62:14 UBad -1.818TBSATAHDDNN 512B WDCWD2005FBYZ-01YCBB2 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/PowerSave|T-Transition|F-Foreign UGUnsp-Unsupported|UGShld-UnConfigured shielded|HSPShld-Hotspare shielded CFShld-Configured shielded|Cpybck-CopyBack|CBShld-Copyback Shielded #

2) storcli64 /cx/vx show all 명령으로 VD(Virtual Drive)의 상태를 확인한다.
    – /c0/v0 항목의 표에서 State가 Dgrd이다.
    – PDs for VD 0 항목의 표에서 RAID를 이루는 하드디스크가 62:0만 존재하다.

# storcli64 /c0/v0 show all CLI Version =007.0504.0000.0000 Nov 22,2017 Operating system = Linux 3.8.0 Controller =0 Status = Success Description = None /c0/v0 :======————————————————————-DG/VDTYPE State Access Consist Cache Cac sCC Size Name ————————————————————-0/0RAID1 Dgrd RW Yes NRWTD-ON1.818TB————————————————————- Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded Optl=Optimal|RO=Read Only|RW=Read Write|HD=Hidden|TRANS=TransportReady|B=Blocked| Consist=Consistent|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 forVD0:============———————————————————————————-EID:Slt DID State DG Size Intf Med SEDPI SeSz Model Sp Type ———————————————————————————-62:05 Onln 01.818TBSATAHDDNN 512B WDCWD2005FBYZ-01YCBB2 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/PowerSave|T-Transition|F-Foreign UGUnsp-Unsupported|UGShld-UnConfigured shielded|HSPShld-Hotspare shielded CFShld-Configured shielded|Cpybck-CopyBack|CBShld-Copyback Shielded VD0Properties:============== Strip Size =64KB Number of Blocks =3905945600VD has Emulated PD= No Span Depth =1 Number of Drives Per Span =2 Write Cache(initial setting)= WriteThrough Disk Cache Policy = Disk’s Default Encryption = None Data Protection = Disabled Active Operations = None Exposed to OS= Yes Creation Date =19-04-2018 Creation Time =02:36:25PM Emulation type =default Is LD Ready forOS Requests = Yes SCSINAA Id = 600605b00cebea80226b65e91f5f2356 SCSI Unmap = No #

위의 명령 결과를 종합하면 RAID1의 구성이었던 62:1 하드디스크는 UBad 상태가 되면서 RAID1의 구성요소에서 제거되었다.

UBad 원인과 해결 방법

아래의 URL에서 2.13 Incorporating an improperly removed device 항목을 참조하면 원인과 해결 방법이 나온다.
https://www.thomas-krenn.com/en/wiki/StorCLI#Incorporating_an_improperly_removed_device

StorCLI – Thomas-Krenn-Wiki

StorCLI Unchecked Main Page > Server Hardware > RAID Controllers > LSI StorCLI is the successor of the MegaCLI and allows Command Line Tools to manage and control LSI MegaRAID controllers . In this article you will find a collection of useful commands to administer your MegaRAID controller.

www.thomas-krenn.com

If an improperly removed device is reconnected to the RAID controller it will be recognized as UBAD (Unconfigured Bad).

RAID 컨트롤러에 부적절하게 제거된 하드디스크를 다시 장착하였을 때, UBAD 상태를 만든다고 한다.

해당 장비의 하드디스크 베이(Bay)가 메인보드에 완벽하게 결합되지 않은 상태였다.
이 상태에서 장비를 운영하면 진동이나 다른 외부요인으로 하드디스크가 제거/결합이 되었을 가능성이 높다.
그러면서 62:1 하드디스크가 UBad로 되었다고 추측한다.

UBad 상태가 된 하드디스크는 RAID의 구성요소에서도 제외되었다.
해결 방법은 UBad를 UGood(Unconfigured Good)로 변경하고, 다시 RAID의 구성요소로 포함하면 된다.

1) storcli64 /cx/ex/sx set good force 명령을 이용하여 UBad를 UGood으로 변경한다.
    – 명령 실행 후 State는 UGood이 되었고, DG는 F(Foreign)가 된다.

# storcli64 /c0/e62/s1 set good force CLI Version =007.0504.0000.0000 Nov 22,2017 Operating system = Linux 3.8.0 Controller =0 Status = Success Description = Set Drive Good Succeeded. # # storcli64 /c0/e62/s1 show CLI Version =007.0504.0000.0000 Nov 22,2017 Operating system = Linux 3.8.0 Controller =0 Status = Success Description = Show Drive Information Succeeded. Drive Information :=================———————————————————————————-EID:Slt DID State DG Size Intf Med SEDPI SeSz Model Sp Type ———————————————————————————-62:14 UGood F1.818TBSATAHDDNN 512B WDCWD2005FBYZ-01YCBB2 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/PowerSave|T-Transition|F-Foreign UGUnsp-Unsupported|UGShld-UnConfigured shielded|HSPShld-Hotspare shielded CFShld-Configured shielded|Cpybck-CopyBack|CBShld-Copyback Shielded #

2) storcli64 /cx/fall show 명령으로 Foreign 상태의 설정을 확인한다.
    – 1개의 foreign 설정을 확인할 수 있다.

# storcli64 /c0/fall show CLI Version =007.0504.0000.0000 Nov 22,2017 Operating system = Linux 3.8.0 Controller =0 Status = Success Description = Operation on foreign configuration Succeeded FOREIGNCONFIGURATION:=====================—————————————DGEID:Slot Type State Size NoVDs —————————————0-RAID1 Frgn 1.818TB1————————————— NoVDs – Number of VDs in disk group|DG- Diskgroup Total foreign drive groups =1 #

3) storcli64 /cx/fall import 명령으로 foreign 설정을 RAID 설정에 포함한다.

# storcli64 /c0/fall importCLI Version =007.0504.0000.0000 Nov 22,2017 Operating system = Linux 3.8.0 Controller =0 Status = Success Description = Successfully imported foreign configuration # [11756.511746] megaraid_sas 0000:04:00.0: scanning for scsi0… #

4) storcli64 /cx/ex/sall show rebuild 명령으로 62:1 하드디스크가 RAID에 포함되어 rebuild를 수행하는지 확인한다.

# storcli64 /c0/e62/sall show rebuild CLI Version =007.0504.0000.0000 Nov 22,2017 Operating system = Linux 3.8.0 Controller =0 Status = Success Description = Show Drive Rebuild Status Succeeded.——————————————————— Drive-ID Progress% Status Estimated Time Left ———————————————————/c0/e62/s0 – Not in progress -/c0/e62/s1 0 In progress 2 Hours 56 Minutes ——————————————————— #

MegaRAID를 사용하여 장비를 운영할 때, 하드디스크와 RAID 컨트롤러의 결합 상태가 불량하면 하드디스크가 UBad 상태가 되며, RAID의 구성요소에서 제거가 될 수 있다.
이와 같은 경우 하드디스크의 UBad 상태를 UGood 상태로 변경하고, RAID의 구성 하드디스크로 포함을 시켜 복구할 수 있다.
복구과 완료되면 rebuild를 진행하는 것을 확인할 수 있다.