When working with Dell PowerEdge R610 servers equipped with PERC controllers, MegaCLI is often the go-to tool for RAID management. The specific error Exit Code: 0x26
during RAID0 creation typically indicates a disk state conflict, particularly when disks are marked as Foreign state.
The key indicator in your PDList
output shows:
Foreign State: Foreign
Foreign Secure: Drive is not secured by a foreign lock key
This occurs when disks contain previous RAID configuration metadata. To clear this state:
# Clear foreign configuration (CAUTION: destroys existing metadata)
/opt/MegaRAID/MegaCli/MegaCli64 -CfgForeign -Clear -a0
# Alternative safe preview first
/opt/MegaRAID/MegaCli/MegaCli64 -CfgForeign -Scan -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgForeign -Preview -a0
After clearing foreign state, use this precise command structure:
# For SAS disks (note the absence of spaces in enclosure:slot notation)
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[32:2,32:3] -a0
# Verification commands
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -a0
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0 | grep -iE 'state|slot'
If issues persist, consider these diagnostic measures:
# Check controller logs
/opt/MegaRAID/MegaCli/MegaCli64 -AdpEventLog -GetEvents -f events.log -a0
# Validate disk health
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0 | grep -iE 'error|fail'
# Reset disk state (if stuck)
/opt/MegaRAID/MegaCli/MegaCli64 -PDOffline -PhysDrv[32:3] -a0
/opt/MegaRAID/MegaCli/MegaCli64 -PDOnline -PhysDrv[32:3] -a0
Your setup shows Fujitsu and Seagate drives. While possible in RAID0, ensure compatible sector sizes:
# Check sector alignment
/opt/MegaRAID/MegaCli/MegaCli64 -PDGetProp -DskCache -PhysDrv[32:2] -a0
/opt/MegaRAID/MegaCli/MegaCli64 -PDGetProp -DskCache -PhysDrv[32:3] -a0
# Compare drive capabilities
/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -a0 | grep -i 'supported'
When attempting to configure a new RAID0 array on freshly hotplugged drives in a Dell R610 server running RHEL 5.4 64-bit, many administrators encounter this specific MegaCli 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
The key detail appears in the PDList output where the foreign state is marked as "Foreign" for the new drives:
Foreign State: Foreign
Foreign Secure: Drive is not secured by a foreign lock key
This indicates the drives contain residual RAID configuration metadata from previous usage. The MegaRAID controller is preventing operations until this foreign configuration is cleared.
First, verify the foreign configuration status:
/opt/MegaRAID/MegaCli/MegaCli64 -CfgForeign -Scan -a0
Then clear the foreign configuration (WARNING: This will destroy any existing data):
/opt/MegaRAID/MegaCli/MegaCli64 -CfgForeign -Clear -a0
After clearing, confirm the drives now show:
Firmware state: Unconfigured(good)
Foreign State: None
If the standard clear doesn't work, try marking as missing first:
/opt/MegaRAID/MegaCli/MegaCli64 -PDMarkMissing -physdrv[32:2] -a0
/opt/MegaRAID/MegaCli/MegaCli64 -PDMarkMissing -physdrv[32:3] -a0
Then prepare for removal:
/opt/MegaRAID/MegaCli/MegaCli64 -PDPrpRmv -physdrv[32:2] -a0
/opt/MegaRAID/MegaCli/MegaCli64 -PDPrpRmv -physdrv[32:3] -a0
Once cleared, the original RAID0 creation command should work:
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r0[32:2,32:3] WB Direct -a0
Adding the cache policy parameters (WB = Write Back, Direct = No Read Ahead) often helps prevent additional errors.
After successful creation, verify the new array:
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -a0
Monitor rebuild progress if applicable:
/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ShowProg -physdrv[32:2] -a0