====== RAID ======
===== Copy Partition Scheme =====
Save to file
sfdisk -d /dev/sda > partitions
Restore from File and force
sfdisk --force /dev/sda < partitions
=== In one step ===
sfdisk -d /dev/sda | sfdisk /dev/sdb
==== Get Disk Serial ====
Using smartctl
smartctl -i /dev/sda
===== Check RAID Status =====
cat /proc/mdstat
==== Remove a Malfunctioning Disk ====
Do the Folloing for all partitions of the malfunctioning disk. Note that mark as faill is not necessary or even possible in case the disk is not detected anymore from the OS.
Mark partition as failed
mdadm --manage /dev/md0 --fail /dev/sda1
Remove Partition
mdadm --manage /dev/md0 --remove /dev/sda1
==== Add New Disk in Array ====
Repeat for all required partitions
mdadm --manage /dev/md0 --add /dev/sda1
===== Destroy Metadata =====
Warning: select the correct physical disk (/dev/sda in example)