I am currently working on a bash script to create raid5 with 3 disks and one hotspare.
I am confused of how to create a script which first check if mdadm exist, if not it will install it and name it md5. (Raid voulme)
Hopefully someone can help me.
From the wiki I got this
If your system has RAID support, you should have a file called /proc/mdstat. Remember it, that file is your friend. If you do not have that file, maybe your kernel does not have RAID support.
Issue this command and see the result:
cat /proc/mdstat
It should tell you that you have the right RAID personality (eg. RAID mode) registered, and that no RAID devices are currently active.