How to add a hotspare with storcli to a LSI MegaRAID controller?

7,893

Solution 1

The problem is that the drive was labeled foreign, probably because it had once belonged to another RAID system. I don't know the history of the drive, so that's plausible.

The letter F in the status indicates that it's foreign.

You can clear the foreign config with: storcli /c0/fall delete

Solution 2

./storcli /c0/e32/s8 set good force
./storcli /c0/e32/s8 add hotsparedrive
Share:
7,893

Related videos on Youtube

royco
Author by

royco

Updated on September 18, 2022

Comments

  • royco
    royco almost 2 years

    I have a LSI MegaRAID controller. I pulled out a failed drive and replaced it with a good one. I didn't run any special storcli commands before this, I just swapped the drives. Unsure if that was a mistake.

    It shows up as UGood:

    32:8    26 UGood  F 1.818 TB SATA HDD N   N  512B ST32000645NS U  - 
    

    I want to add it as a hotspare, but the command fails:

    # ./storcli64 /c0/e32/s8 add hotsparedrive
    Controller = 0
    Status = Failure
    Description = Add Hot Spare Failed.
    
    Detailed Status :
    ===============
    
    ------------------------------------------------
    Drive       Status  ErrCd ErrMsg                
    ------------------------------------------------
    /c0/e32/s8 Failure   255 Device state invalid. 
    ------------------------------------------------
    

    What should I set the drive state to first? Should I also initialize the drive?