Rebuilding software RAID without mdadm.conf

Austing PowersRebuilding software RAID array is very easy when you have your mdadm.conf file at hand, but when you find yourself in a situation without backup of that little config file, e.g. after reinstalling the system or when your migrate disks to the new server, it can be a bit daunting.

Recently I had to reassemble two software RAID1 arrays one small Debian server after OS reinstall. So, there were four hard drives in total and to avoid mix-up and data loss, I had to find out which disk belonged which RAID array. Examining each drive with mdamd provided me with the necessary information.