I have 2 disk sda and sdb with several partition. I have to make a raid1 of the running system. I managed to setup raid1 with md0 on root but there are 2 more partition which are mounted on /home and /var which i cannot add to raid. Below are the configuration....can someone guide what is wrong and how i can bring these md127 and md2
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 9.3G 0 part
│ └─md0 9:0 0 9.3G 0 raid1 /
├─sda2 8:2 0 7.5G 0 part [SWAP]
├─sda3 8:3 0 1K 0 part
├─sda5 8:5 0 20.5G 0 part /home
├─sda6 8:6 0 55.9G 0 part /var
└─sda7 8:7 0 838.4G 0 part
sdb 8:16 0 931.5G 0 disk
├─sdb1 8:17 0 9.3G 0 part
│ └─md0 9:0 0 9.3G 0 raid1 /
├─sdb2 8:18 0 7.5G 0 part
├─sdb3 8:19 0 1K 0 part
├─sdb5 8:21 0 20.5G 0 part
│ └─md127 9:127 0 20.5G 0 raid1
└─sdb6 8:22 0 55.9G 0 part
└─md2 9:2 0 55.9G 0 raid1
sr0 11:0 1 1024M 0 rom
---------------------------------------------
md0 : active raid1 sdb1[1] sda1[2]
9735168 blocks super 1.2 [2/2] [UU]
md127 : active (auto-read-only) raid1 sdb5[1]
21466112 blocks super 1.2 [2/1] [_U]
md2 : active (auto-read-only) raid1 sdb6[1]
58559488 blocks super 1.2 [2/1] [_U]
unused devices: <none>
---------------------------------------------
/dev/md127:
Version : 1.2
Creation Time : Mon Jun 26 18:21:00 2023
Raid Level : raid1
Array Size : 21466112 (20.47 GiB 21.98 GB)
Used Dev Size : 21466112 (20.47 GiB 21.98 GB)
Raid Devices : 2
Total Devices : 1
Persistence : Superblock is persistent
Update Time : Mon Jun 26 18:21:00 2023
State : clean, degraded
Active Devices : 1
Working Devices : 1
Failed Devices : 0
Spare Devices : 0
Consistency Policy : resync
Name : dns003:1 (local to host dns003)
UUID : xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Events : 0
Number Major Minor RaidDevice State
- 0 0 0 removed
1 8 21 1 active sync /dev/sdb5
sudo mdadm /dev/md127 -a /dev/sda5
mdadm: Cannot open /dev/sda5: Device or resource busy