Score:0

Trouble assembling raid1 array after replacing failed disk

in flag

I have a weird mdadm situation.

I had a drive in a raid1 array go bad. I shut the machine down, and replaced the disk, did ddrescue (which succeeded without error) from the old non-failed drive to the new drive.

Now when I attempt to assemble, I get:

% sudo mdadm --verbose --assemble /dev/md3 /dev/sdg1 /dev/sdf1
mdadm: looking for devices for /dev/md3                       
mdadm: /dev/sdg1 is identified as a member of /dev/md3, slot 0.
mdadm: /dev/sdf1 is identified as a member of /dev/md3, slot 0.
mdadm: no uptodate device for slot 1 of /dev/md3
mdadm: added /dev/sdg1 to /dev/md3 as 0
mdadm: /dev/md3 assembled from 0 drives and 1 rebuilding - not enough to start the array.

and my cat /proc/mdstat is

md3 : inactive sdf1[0](S)
      7813894144 blocks super 1.2

output of examine

% sudo mdadm --examine /dev/sd[fg]1                                                                                                       21-08-21 - 12:13:27
/dev/sdf1:                         
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x2
     Array UUID : 1a5dd664:54cdc95a:f0de5ce2:c8ea58f9
           Name : arcana:3  (local to host arcana)
  Creation Time : Wed Jan 18 14:06:34 2017
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 15627788288 (7451.91 GiB 8001.43 GB)
     Array Size : 7813893952 (7451.91 GiB 8001.43 GB)
  Used Dev Size : 15627787904 (7451.91 GiB 8001.43 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
Recovery Offset : 0 sectors
   Unused Space : before=261864 sectors, after=384 sectors
          State : clean
    Device UUID : 5501a6d9:dfef5dbf:aae0b1cb:4692e6ec

    Update Time : Fri Aug 13 11:19:08 2021
  Bad Block Log : 512 entries available at offset 264 sectors
       Checksum : 2b596499 - correct
         Events : 2777


   Device Role : Active device 0
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdg1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x2
     Array UUID : 1a5dd664:54cdc95a:f0de5ce2:c8ea58f9
           Name : arcana:3  (local to host arcana)
  Creation Time : Wed Jan 18 14:06:34 2017
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 15627788288 (7451.91 GiB 8001.43 GB)
     Array Size : 7813893952 (7451.91 GiB 8001.43 GB)
  Used Dev Size : 15627787904 (7451.91 GiB 8001.43 GB)
    Data Offset : 262144 sectors
   Super Offset : 8 sectors
Recovery Offset : 0 sectors
   Unused Space : before=261864 sectors, after=384 sectors
          State : clean
    Device UUID : 5501a6d9:dfef5dbf:aae0b1cb:4692e6ec

    Update Time : Fri Aug 13 11:19:08 2021
  Bad Block Log : 512 entries available at offset 264 sectors
       Checksum : 2b596499 - correct
         Events : 2777


   Device Role : Active device 0
   Array State : AA ('A' == active, '.' == missing, 'R' == replacing)

I want to get this fixed (hopefully without losing any data). It seems like for the slots, one should be 0 and one should be 1. How do I get this going? My googling has failed me and I don't want to "just try things" because I am a bit shy about destroying the data.

in flag
If you only need to change the number, then [this answer from a few years back](https://askubuntu.com/a/259084/1222991) should do what you need to do.
in flag
I don't think that will work with the metadata version I have, I get `mdadm: --update=super-minor not understood for 1.x metadata`
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.