Fix Raid on LSI controllers when a disk is shown as ubad

This can be done with both megacli and storcli.

Since the way forward is storcli this how to will be based on that.

 

storcli /c0 show all

 

Drive Information :
=================
 
-------------------------------------------------------------------------------
EID:Slt DID State DG       Size Intf Med SED PI SeSz Model                  Sp 
-------------------------------------------------------------------------------
8:1       7 Onln   0  465.25 GB SATA HDD N   N  512B WDC WD5003ABYX-01WERA1 U  
8:2       6 Onln   0  465.25 GB SATA HDD N   N  512B WDC WD5003ABYX-01WERA1 U  
8:3       5 Onln   0  465.25 GB SATA HDD N   N  512B WDC WD5003ABYX-01WERA1 U
.
.
8:14      4 UBad   - 223.062 GB SATA SSD N   N  512B INTEL SSDSC2CW240A3    U  
-------------------------------------------------------------------------------

 

Say 8:14 is marked a Ubad. (Unconfigured bad)

storcli /c0 /e8 /s14 set good

storcli /c0 show all

It should now have the disk marked as Ugood ( Unconfigured Good)

-------------------------------------------------------------------------------
EID:Slt DID State DG       Size Intf Med SED PI SeSz Model                  Sp 
-------------------------------------------------------------------------------
8:1       7 Onln   0  465.25 GB SATA HDD N   N  512B WDC WD5003ABYX-01WERA1 U  
8:2       6 Onln   0  465.25 GB SATA HDD N   N  512B WDC WD5003ABYX-01WERA1 U  
8:3       5 Onln   0  465.25 GB SATA HDD N   N  512B WDC WD5003ABYX-01WERA1 U
.
.
8:14      4 uGood  F 223.062 GB SATA SSD N   N  512B INTEL SSDSC2CW240A3    U  
-------------------------------------------------------------------------------

storcli /c0 -/fall show

 

Controller = 0
Status = Success
Description = Operation on foreign configuration Succeeded
 
 
FOREIGN CONFIGURATION :
=====================
 
----------------------------------------
DG EID:Slot Type State       Size NoVDs 
----------------------------------------
 F -        Cac0 Frgn  223.062 GB     1 
----------------------------------------
 
NoVDs - Number of VDs in disk group|DG - Diskgroup
Total foreign drive groups = 1

 

This would show an external configuration which needs clearing.

Now we need to clear the config data from the previous RAID conf cached on the disk.

 

storcli /cx /fall import

 

This will clear the foreign config and start the rebuild.

 

To follow the rebuild :

 

storcli /c0 /e8 /sall show rebuild 
Controller = 0
Status = Success
Description = Show Drive Rebuild Status Succeeded.
———————————————————
Drive-ID Progress% Status Estimated Time Left
———————————————————
/c0/e8/s0 – Not in progress –
/c0/e8/s1 – Not in progress –
/c0/e8/s2 – Not in progress –
/c0/e8/s3 – Not in progress –
/c0/e8/s4 – Not in progress –
/c0/e8/s5 – Not in progress –
/c0/e8/s6 – Not in progress –
/c0/e8/s7 – Not in progress –
/c0/e8/s8 – Not in progress –
/c0/e8/s9 – Not in progress –
/c0/e8/s10 – Not in progress –
/c0/e8/s11 – Not in progress –
/c0/e8/s12 – Not in progress –
/c0/e8/s13 – Not in progress –
/c0/e8/s14 93 In progress –
/c0/e8/s15 – Not in progress –
———————————————————

 

Or for one drive in particular:

 

storcli /c0 /e8 /s14 show rebuild

Controller = 0
Status = Success
Description = Show Drive Rebuild Status Succeeded.
———————————————————————————————————-
Drive-ID          Progress% Status            Estimated Time Left
———————————————————————————————————-
/c0/e8/s14       93               In progress –
———————————————————————————————————-

 

That’s it.

 

[ NOTE : ]   Rebuild might take more than 1 day in default mode…. Just saying be patient.

 

nJoy 😉

9 Replies to “Fix Raid on LSI controllers when a disk is shown as ubad”

  1. You make it look easy! If a drive is marked as ubad what does that mean? I just had a drive failed a consistency check before posting a PD Reset and then it was marked as ubad. I want to just set it to ugood and rebuild but I’m afraid at what that might do if the disk is faulty. What should I do?

    1. Well basically if an improperly removed device is re-attached to the RAID controller it will be recognised as UBAD (Unconfigured Bad). This does not mean the drive is bad but means the configuration state is (or both) trying to re-attach it if the disk you are re-connecting is new or was working should have no negative effect but before using it you need to change it to good saying “yeah I know but this is good go ahead and work with it !”

      If you try to set it to good and the disk controller fails (disk controller not the LSI itself) then it will mark as failed or bad.

  2. Hi,
    I have a drive marked Ubad after replacement, I have tried “storcli /c0 /e18 /s4 set good” all other whichpossibily I can use but unable to change the status to Ugood, any idea/? Thanks.

    1. It is not the first time I got refurbished or old stock (even brand spanking new) disks marking as bad.
      The Raid controller usually runs a SATA init procedure this in turn checks the disk on-board controller to run some self diags.
      These Disks would possible be
      1) DOA ( dead on arrival)
      2) have an incompatible firmware ( some storage subsystems such as dot hill and SUN / ORacle storage) have firmware patches for disks that can render them incompatible with other RAID controllers so refurbished disks might carry “BAD” Flags from previous failures in other Storage units.
      3) Your back plane might be busted. The last failure could be in the backplane subsystem ( rare but seem those as well), especially with ESD-less technicians chips or lines on the backplanes can fry and cause the slot useless
      switching out the banks would reveal this but with a preconfigured raid system .. not much luck.

      Hope this points you in the right direction.

      🙂

  3. I used this method to get a drive recognized as UBAD to now read ONLIN, but the rebuild never starts and the drive fails it’s consistency check. Is there another step to getting that started, or is that an altogether different question/problem?

    Thanks

    1. It’s just a bad drive and the controller must be realizing it early on. Better that one of those drives that “fly under the radar” then fail after all the volumes have just finished synching.. It’s a massive waste of time.

  4. storcli /cx /fall import

    Won’t this command import any configuration on the foreign disk to a degraded RAID array?

    1. Fair question. AFAIK what it does is spot the odd ball config on the new disk as opposed to the consistent others and synchronizes the meta data in the odd disk out.
      This kind of works when you have one disk playing up not more.. I do not know the internals though I am pretty sure that all the disks will have a metadata checksum and the failing disk will have its meta data re-imported. point is this procedure worked for me when I needed it.

      Thanks
      Good luck

Leave a Reply

Your email address will not be published. Required fields are marked *