Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
operations:raid [2017/12/22 15:28] eServices Greece |
operations:raid [2020/04/29 15:25] (current) eServices Greece |
||
---|---|---|---|
Line 10: | Line 10: | ||
<sxh bash> | <sxh bash> | ||
sfdisk --force /dev/sda < partitions | sfdisk --force /dev/sda < partitions | ||
+ | </ | ||
+ | |||
+ | === In one step === | ||
+ | <sxh bash> | ||
+ | sfdisk -d /dev/sda | sfdisk /dev/sdb | ||
</ | </ | ||
Line 18: | Line 23: | ||
</ | </ | ||
- | ==== Check RAID Status ==== | + | ===== Check RAID Status |
<sxh bash> | <sxh bash> | ||
cat / | cat / | ||
Line 24: | Line 29: | ||
==== Remove a Malfunctioning Disk ==== | ==== 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 | ||
<sxh bash> | <sxh bash> | ||
+ | mdadm --manage /dev/md0 --fail /dev/sda1 | ||
</ | </ | ||
+ | Remove Partition | ||
+ | <sxh bash> | ||
+ | mdadm --manage /dev/md0 --remove /dev/sda1 | ||
+ | </ | ||
+ | ==== Add New Disk in Array ==== | ||
+ | Repeat for all required partitions | ||
<sxh bash> | <sxh bash> | ||
+ | mdadm --manage /dev/md0 --add /dev/sda1 | ||
</ | </ | ||
+ | ===== Destroy Metadata ===== | ||
+ | Warning: select the correct physical disk (/dev/sda in example) | ||
+ | <sxh bashdd if=/ | ||
+ | dd bs=512 if=/ |