1

My friend's RAID5 has lost two disks -- one failed months ago, apparently, but the other dropped out and the data is believed to be okay.

I can run mdadm --examine on (clones of) the two surviving disks, and mdadm --detail on the resulting (stopped) array. When I try to examine (a clone of) the third disk, I get "mdadm: No md superblock detected on /dev/sdc6".

How can I definitely, definitely confirm that sdc6 contains data and I'm not just wasting my time? How can I recreate or clone the MD superblock?

I'm using Debian Buster.

I've just tried --assemble --force, and lost the data on my clones. While they're reimaging, here's data from another partition, for another array with the same symptoms (this one is RAID1, and thus I don't care about sdc2).

# mdadm -E /dev/sda2
/dev/sda2:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 91910024:5720fb37:1542f8c1:fd297f0c
           Name : LS-QVL-EM727:1
  Creation Time : Wed Oct 31 15:01:52 2007
     Raid Level : raid1
   Raid Devices : 4

 Avail Dev Size : 9998336 (4.77 GiB 5.12 GB)
     Array Size : 4999156 (4.77 GiB 5.12 GB)
  Used Dev Size : 9998312 (4.77 GiB 5.12 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=24 sectors
          State : clean
    Device UUID : 14cbe7a9:15c0a00d:f27af23f:a36c631c

    Update Time : Fri Apr  3 17:08:10 2020
       Checksum : 5bfc17c4 - correct
         Events : 1052191


   Device Role : Active device 2
   Array State : .AA. ('A' == active, '.' == missing, 'R' == replacing)
Steve Almond
  • 123
  • 7

1 Answers1

1

Recall that drives letters can change. Arrays are only assembled by UUID. You cannot copy the superblock because device UUID will be different.

It's a good idea to set up monitoring using mdadm and smartmontools, and have it email you when a drive fails.

Whether you can recover the data depends on whether only the superblock was damaged. You can try creating an array on your clones (writing new superblocks) with --assume-clean and see, but you need to make sure the drives are all in the right slots and the other bad drive is set 'missing'.

stark
  • 360
  • 1
  • 13