Score:1

Replacing a single SSD in 4 disk mixed software RAID 1 & RAID10 system

ca flag

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:

  1. Does it matter that md0 and md1 are RAID 1 and md2 is RAID 10?

  2. Am I'm forgetting anything or making any mistakes

Score:1
cn flag

1, In your case no.

2, The plan is sound from md perspective. But think about booting. What is your current boot drive? Are all the drives are bootable? A grub-install /dev/sdX, on every drive before shutdown, and a grub-install /dev/sdd after is a good idea.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.