I'm about to replace a single SSD in a 4 SSD RAID 1 & RAID10 system. My webhoster will only do the drive replacement, but not help with adding it back to the array after. I've not done this before, so I'm researching and making a plan to execute after the drive is replaced.
There seem to be 3 arrays in the system, md0 (raid 1), md1 (raid 1) and md2 (raid 10)
[root@w1 ~]# cat /proc/mdstat
Personalities : [raid1] [raid10]
md1 : active raid1 sdd2[3] sdc2[2] sda2[0] sdb2[1]
523264 blocks super 1.2 [4/4] [UUUU]
md2 : active raid10 sdb3[1] sda3[0] sdd3[3] sdc3[2]
927996928 blocks super 1.2 512K chunks 2 near-copies [4/4] [UUUU]
bitmap: 6/7 pages [24KB], 65536KB chunk
md0 : active raid1 sdd1[3] sda1[0] sdb1[1] sdc1[2]
4189184 blocks super 1.2 [4/4] [UUUU]
unused devices: <none>
/dev/sdd
is the drive that is about to fail, and needs to be replaced.
Below is my plan. Do you see any errors, or things wrong with this?
1. MARK /dev/sdd AS FAULTY
mdadm /dev/md0 -f /dev/sdd1
mdadm /dev/md1 -f /dev/sdd2
mdadm /dev/md2 -f /dev/sdd3
2. REMOVE /dev/sdd FROM ARRAYS
mdadm /dev/md0 -r /dev/sdd1
mdadm /dev/md1 -r /dev/sdd2
mdadm /dev/md2 -r /dev/sdd3
3. TAKE SYSTEM OFFLINE, REPLACE DRIVE, BOOT BACK INTO CENTOS ---
4. CHECK STATUS OF ARRAYS AFTER DISK REPLACEMENT
cat /proc/mdstat
mdadm --detail /dev/md0
mdadm --detail /dev/md1
mdadm --detail /dev/md2
5. COPY PARTITION TABLE
sfdisk -d /dev/sdc | sfdisk /dev/sdd
6. ADD NEW DISC BACK TO ARRAYS
mdadm --manage /dev/md0 --add /dev/sdd1
mdadm --manage /dev/md1 --add /dev/sdd2
mdadm --manage /dev/md2 --add /dev/sdd3
7. CHECK STATUS, see if it's resyncing
cat /proc/mdstat
My question:
Does it matter that md0 and md1 are RAID 1 and md2 is RAID 10?
Am I'm forgetting anything or making any mistakes