MegaCLI Clear Foreign Configuration
Foreign configuration indicates that the controller has detected an external array configuration; it does not mean the disks themselves have failed. The following applies to controllers supporting MegaCLI; example -a0 refers only to ID 0; verify the controller ID on-site.
First, view the configuration
MegaCli64 -PDList -a0
MegaCli64 -CfgForeign -Scan -a0
MegaCli64 -CfgForeign -Dsply -a0
Record the slot numbers, member disks, and original array purpose. If these disks need to restore their original data, refer to the import procedure instead; do not execute the clear operation.
Confirm and then clear the discarded foreign configuration
Execute only after confirming that all external configurations detected by the controller can be discarded and the disks will be repurposed:
MegaCli64 -CfgForeign -Clear -a0
MegaCli64 -CfgForeign -Scan -a0
The second scan is used to verify whether any foreign configuration still exists. Do not confuse -Clear with the command to clear all configurations on the controller, -CfgClr .
Subsequent operations
Clearing a foreign configuration does not confirm disk health, nor does it indicate that array recovery is complete. Forcing MakeGood and setting up hot spares must be evaluated separately based on disk status, compatibility, and array plans; they cannot be treated as a fixed workflow immediately after detecting Foreign.
Refer to WebBIOS Preview and Import Foreign Configuration.