Delete previous raid config from harddisk

Sometimes when you try to install a new OS, previous raid informations from harddrives will prevent you to partition/install properly. To fix this, we need  to zero the drive to clear the raid configuration.

1. The DD way, replace /dev/sda to other drives to if is needed:

dd if=/dev/zero of=/dev/sda bs=512 seek=$(( $(blockdev --getsz /dev/sda) - 1024 )) count=1024

2. To the drive out of raid you need to find first the drive with a cat /dev/mdstat
After that:

mdadm –remove /dev/md##

mdadm –zero-superblock /dev/sda or which drive you want to zero