Megacli is killing me, any help appreciated
I run a server with 2 drives in raid0 configured through BIOS. I just added 2 more drives using hotplug (the server is dell r610 with RHEL 5.4 64bit) and I would like to configure a separate raid0 partition on these drives. I am getting the following error:
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd r0[32:2, 32:3] -a0
The specified physical disk does not have the appropriate attributes to complete the requested command.
Exit Code: 0x26
All the parameters are correct and there is just no reason why this command could not work, see this (fujitsu is current raid, seagate is the new one I want to create):
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL | egrep 'Adapter|Enclosure|Slot|Inquiry'
Adapter #0
Enclosure Device ID: 32
Slot Number: 0
Enclosure position: 0
Inquiry Data: FUJITSU MBD2147RC D807D0A4PA101174
Enclosure Device ID: 32
Slot Number: 1
Enclosure position: 0
Inquiry Data: FUJITSU MBD2147RC D807D0A4PA10115T
Enclosure Device ID: 32
Slot Number: 2
Enclosure position: 0
Inquiry Data: SEAGATE ST9300603SS FS033SE0TF5K
Enclosure Device ID: 32
Slot Number: 3
Enclosure position: 0
Inquiry Data: SEAGATE ST9300603SS FS023SE070FK
I also tried to set up the drive as hotspare, also some strange error:
/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Set -physdrv[32:3] -a0
Adapter: 0: Set Physical Drive at EnclId-32 SlotId-3 as Hot Spare Failed.
FW error description: The specified device is in a state that doesn't support the requested command.
Exit Code: 0x32
As you can see the disk is in Unconfigured, Good state:
Enclosure Device ID: 32
Slot Number: 3
Enclosure position: 0
Device Id: 3
Sequence Number: 1
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 279.396 GB [0x22ecb25c Sectors]
Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
Coerced Size: 278.875 GB [0x22dc0000 Sectors]
Firmware state: Unconfigured(good), Spun Up
SAS Address(0): 0x5000c50005cd20b1
SAS Address(1): 0x0
Connected Port Number: 3(path0)
Inquiry Data: SEAGATE ST9300603SS FS023SE070FK
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: Foreign
Foreign Secure: Drive is not secured by a foreign lock key
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature :30C (86.00 F)
Solution 1:
The drive is marked as "Foreign", it probably comes from some other RAID controller. I guess you may need to clear it first :
MegaCli64 -CfgForeign -Scan -Clear
Solution 2:
I'm embarrased to say that I had this problem today and lost about 2 hours of my life for not looking at the drives before trying to replace them.
The key to the issue here is Exit Code: 0x26, which means "Unable to use SATA(SAS) drive to replace SAS(SATA)".
The FUJITSU MBD2147RC are SAS drives and the SEAGATE ST9300603SS are SATA drives. You cannot make a hardware RAID with drives that use different protocols. It's either all SAS or all SATA. If you need to mix them you can make a software RAID.
https://www.thomas-krenn.com/de/wiki/MegaCLI_Error_Messages has a list of the error codes of MegaCli.
Solution 3:
I had a similar issue and for me it required to do:
megacli -PDMakeGood -PhysDrv '[64:6]' -Force -a0
After that I could create the raid with the CfgLdAdd command.