2

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?

royco
  • 573
  • 3
  • 8
  • 17

3 Answers3

2

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

royco
  • 573
  • 3
  • 8
  • 17
1
./storcli /c0/e32/s8 set good force
./storcli /c0/e32/s8 add hotsparedrive
Sven
  • 98,649
  • 14
  • 180
  • 226
wmann
  • 11
  • 2
0

I have no idea how it works with storcli64, but I just had to replace a raid1 failed drive (slot 0) with megacli64 :

 ./MegaCli64 -PDMakeGood -PhysDrv \[252:0\] -aALL
 ./MegaCli64 -CfgForeign -Clear -aALL
 ./MegaCli64 -PdReplaceMissing -PhysDrv[252:0] -Array0 -row0 -a0
 ./MegaCli64 -PDRbld -Start -PhysDrv[252:0] -a0
 ./MegaCli64 -PDRbld -ShowProg -PhysDrv[252:0] -a0
bgtvfr
  • 1,262
  • 10
  • 20