What to do if your replacement drive already has metadata on it.
You will want to have the drives in a 'Unconfigured Good' state so that you can right click on them and mark them as hot spare to be used for the rebuild operation.
If you insert these drives and they appear to the LSI controller as having a foreign configuration or 'Unconfigured Good Foreign', you will need to use the LSI controller BIOS or MegaCLI command utility to remove the foreign configuration metadata from the disks.
We do provide a "qs-util megaclearforeign" command that runs the megacli command line utility to clear the foreign configuration information from all disks in the controller that may have that foreign controller metadata.
If you are unsure about doing this on a live system, one option would be to plug the disks into a lab system and use the LSI BIOS or MegaCLI utitlity to clear the foreign configuration from the disks.
Please review this link for additional information:
There are other methods to remove a RAID signature from a drive:
1- PERC controller in a Dell server not seeing Intel SSD drives. Drives show up in perccli64 /c0 show as "F" or foreign and when attempting to setup RAID0 passthrough via the QuantaStor GUI it errors with "DELL_PERCCLI [perccli] command error using (/c0 add vd raid0 drives=32:6 wt direct): Failure: 'physical disk does not have appropriate attributes' [err=507]"
Drives were pulled from the Dell, connected to a LSI HBA running linux, found via "fdisk -l | grep ^Disk" (only 400G drives in linux host), then cleared via "wipefs --all --force /dev/sdX" where X is the drive letter fdisk returned. Use extreme care because this operation is not recoverable. (man wipefs for options to save / restore the signature)
2- storcli has an option to resignature drives. See google.