0

I have a Ubuntu Server RAID1 M.2 SSD (2 Drives) where 1 Failed, I removed and Replaced with a new one, but its state stays "removed".

I am new to RAID Stuff, Below are my RAID Details:

cat /proc/mdstat

Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] md0 : active raid1 nvme1n1p2[0] 1952279552 blocks super 1.2 [2/1] [U_] bitmap: 9/15 pages [36KB], 65536KB chunk

unused devices:


sudo mdadm -D /dev/md0

/dev/md0: Version : 1.2 Creation Time : Tue Apr 25 09:09:58 2023 Raid Level : raid1 Array Size : 1952279552 (1861.84 GiB 1999.13 GB) Used Dev Size : 1952279552 (1861.84 GiB 1999.13 GB) Raid Devices : 2 Total Devices : 1 Persistence : Superblock is persistent

 Intent Bitmap : Internal

   Update Time : Thu Apr 27 07:21:56 2023
         State : active, degraded
Active Devices : 1

Working Devices : 1 Failed Devices : 0 Spare Devices : 0

Consistency Policy : bitmap

          Name : ubuntu-server:0
          UUID : a3f233d6:b8695ca1:f765d639:f03347fa
        Events : 2541

Number   Major   Minor   RaidDevice State
   0     259        3        0      active sync   /dev/nvme1n1p2
   -       0        0        1      removed

1 Answer 1

1

You have to "add" the new device to the array, cause simply replacing isn't enought.
Something like this

mdadm /dev/md0 --add /dev/nvme2n1p2  

Just change the nvme2n1p2 with the correct new device, then check the sync status with

cat /proc/mdstat

You should see something like that

. . .
[>....................] resync = 0.9% (2032768/209584128) finish=15.3min speed=225863K/sec
. . .

Now that everything is runnig, you have to "save" the new configuration or you'll get a faulty array.

sudo nano /etc/mdadm/mdadm.conf

Remove or comment out the current line that corresponds to your array definition and then add the new one:

sudo mdadm --detail --brief /dev/md0 | sudo tee -a /etc/mdadm/mdadm.conf
1
  • This. You need to start mirroring from the active drive by running the "mdadm --add command". The entire process is also well described here: thegeekdiary.com/…
    – Strepsils
    May 4 at 7:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .