2

I have a synology NAS with 2 disks configured in RAID1. Somehow the RAID array got messed up.

I plugged the 2 disks into my desktop computer to investigate what's happening:

# mdadm --examine /dev/sda5
/dev/sda5:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 40c15541:61481857:5a3fdf04:765977cb
           Name : DiskStation:2
  Creation Time : Sat Jul 13 09:54:06 2013
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 5851063680 (2790.00 GiB 2995.74 GB)
     Array Size : 2925531648 (2790.00 GiB 2995.74 GB)
  Used Dev Size : 5851063296 (2790.00 GiB 2995.74 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=384 sectors
          State : clean
    Device UUID : 90c7ae42:472940bf:72e32970:97629479

    Update Time : Mon Aug 10 15:57:32 2020
       Checksum : 81d9d2fc - correct
         Events : 2520428


   Device Role : spare
   Array State : .. ('A' == active, '.' == missing, 'R' == replacing)

# mdadm --examine /dev/sdb5
/dev/sdb5:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : 40c15541:61481857:5a3fdf04:765977cb
           Name : DiskStation:2
  Creation Time : Sat Jul 13 09:54:06 2013
     Raid Level : raid1
   Raid Devices : 2

 Avail Dev Size : 5851063680 (2790.00 GiB 2995.74 GB)
     Array Size : 2925531648 (2790.00 GiB 2995.74 GB)
  Used Dev Size : 5851063296 (2790.00 GiB 2995.74 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=384 sectors
          State : clean
    Device UUID : 5636b0cc:49a4b1a7:a45d99a5:61f45c5a

    Update Time : Mon Aug 10 15:49:07 2020
       Checksum : 8a86c7af - correct
         Events : 2520660


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

# mdadm --examine --scan
ARRAY /dev/md/2  metadata=1.2 UUID=40c15541:61481857:5a3fdf04:765977cb name=DiskStation:2
   spares=1

If it can help:

# blkid

/dev/sda5: UUID="40c15541-6148-1857-5a3f-df04765977cb" UUID_SUB="90c7ae42-4729-40bf-72e3-297097629479" LABEL="DiskStation:2" TYPE="linux_raid_member" PARTUUID="7400fe20-3ab4-4859-aec1-798032c26554"
/dev/sdb5: UUID="40c15541-6148-1857-5a3f-df04765977cb" UUID_SUB="5636b0cc-49a4-b1a7-a45d-99a561f45c5a" LABEL="DiskStation:2" TYPE="linux_raid_member" PARTUUID="9e3fee94-5c3c-4946-a5da-fc689f3a1f7e"
[...]

When I try to assemble the array:

# mdadm --assemble -f -v /dev/md2 /dev/sda5 /dev/sdb5
mdadm: looking for devices for /dev/md2
mdadm: /dev/sda5 is identified as a member of /dev/md2, slot -1.
mdadm: /dev/sdb5 is identified as a member of /dev/md2, slot 32768.
mdadm: No suitable drives found for /dev/md2

# mdadm --detail /dev/md2 
/dev/md2:
           Version : 1.2
        Raid Level : raid0
     Total Devices : 2
       Persistence : Superblock is persistent

             State : inactive
   Working Devices : 2

              Name : DiskStation:2
              UUID : 40c15541:61481857:5a3fdf04:765977cb
            Events : 2520660

    Number   Major   Minor   RaidDevice

       -       8       21        -        /dev/sdb5
       -       8        5        -        /dev/sda5

I also tried to assemble the array with only one disk:

# mdadm --assemble -f -v /dev/md2 /dev/sda5 
mdadm: looking for devices for /dev/md2 
mdadm: /dev/sda5 is identified as a member of /dev/md2, slot -1. 
mdadm: no uptodate device for slot 0 of /dev/md2 
mdadm: no uptodate device for slot 1 of /dev/md2 
mdadm: added /dev/sda5 to /dev/md2 as -1 
mdadm: /dev/md2 assembled from 0 drives and 1 spare - not enough to start the array

I am not a RAID expert but those slots -1 and 32768 doesn't look right.

Could it be the cause of the problem? How to fix it?

ps: for the sake of simplicity I have omitted an other array /dev/md3 present on the disks with the exact same issue

1 Answer 1

0

Start md2 with sda5 only, then add sdb5.

4
  • # mdadm --assemble -f -v /dev/md2 /dev/sda5 mdadm: looking for devices for /dev/md2 mdadm: /dev/sda5 is identified as a member of /dev/md2, slot -1. mdadm: no uptodate device for slot 0 of /dev/md2 mdadm: no uptodate device for slot 1 of /dev/md2 mdadm: added /dev/sda5 to /dev/md2 as -1 mdadm: /dev/md2 assembled from 0 drives and 1 spare - not enough to start the array. It does not seems to work or will it work after adding the other device? How do you do that?
    – Ponytech
    Aug 11, 2020 at 20:02
  • @Ponytech please don't put updates in comments. Update your question to show what you've tried and the resulting error messages (i.e. this lot). Take the time to format it so that it's absolutely clear what's going on - if we misinterpret what you're written we might inadvertently give wrong advice that could permanently destroy any chance of recovery Aug 12, 2020 at 15:45
  • 2
    Ipor, that's not a very helpful answer to someone who's not completely sure what they're doing. Could you flesh it out a bit, please? Aug 12, 2020 at 15:46
  • 1
    @roaima Thanks for the advice. Formatting in comments doesn't work. I updated the question.
    – Ponytech
    Aug 13, 2020 at 18:54

You must log in to answer this question.

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