Another crash disk in the Wall

NethServer Version: 7.9

Hello All & Happy New safe Year,

Does’t start really good as i got a crash disk on one Netserver 7.9.
On 2 disks, Raid1, the second 3To sata drive /dev/sdb is dead, the first one /dev/sda have errors.

So before doing the work on the real server i did it on a VM.

I install & update a new Netserver 7.9 on two 32Gb disks. All good.
I boot with centos 7.2009, Troubleshooting, Rescue a cent OS mode, and I :

chroot /mnt/sysimage

cat /proc/mdstat : got [UU]

I suppose that my /dev/sdb drive is dead (as on real server) so I :
mdadm --manage /dev/md1 --fail /dev/sdb1
mdadm --manage /dev/md1 --remove /dev/sdb1
mdadm --manage /dev/md2 --fail /dev/sdb2
mdadm --manage /dev/md2 --remove /dev/sdb2

cat /proc/mdstat : got [U_]

Poweroff the server, change /dev/sdb for a new disk
and I boot with centos 7.2009, Troubleshooting, Rescue a cent OS mode, and :

sfdisk -d /dev/sda | sfdisk /dev/sdb → got the partitions sdb1&2 created, nice.

mdadm --manage /dev/md1 --add /dev/sdb1
mdadm --manage /dev/md2 --add /dev/sdb2

After a while, cat /proc/mdstat → OK! got [UU], cool (the disks are empty, 1.68Go data only)

I install grub on /dev/sdb to make it bootable :
grub2-install /dev/sdb

I poweroff, take off /dev/sda as it got errors i do not want it no more and boot on /dev/sdb to check if it’s ok.
Yay ! it’s boot !

I poweroff again, I change /dev/sda for a new drive.
I boot with centos 7.2009, Troubleshooting, Rescue a cent OS mode, and :

This time copy via sfdisk sdb to sda :
sfdisk -d /dev/sdb | sfdisk /dev/sda

Add the newly created partitions to the raid :
mdadm --manage /dev/md2 --add /dev/sda2 → ok, cat /proc/mdstat see it recovering and [UU].
mdadm --manage /dev/md1 --add /dev/sda1 → But no success here, it doesn’t find /dev/md1 (even after chroot) ??? “No such file or directory”.
I must boot Netserver and use the Menu Systeme/Stockage to add /dev/sda (and not /dev/sda1) to the /dev/md1 raid partition.

Do not forget to make the disk bootable :
grub2-install /dev/sda → I got errors to, 'Duplicate PV"…

Any help for grub and /dev/md1 ? Thanks guys.