2

I was running a Raid5 with 3 disks at on my homeserver. But had some problems with the back-plane for the disks. The disks weren't detected reliable. So I replaced the back plane and the disks are now detected correct. But the Md array is weird broken.

When I query the physical disks with mdadm -Q /dev/sdX I get this:

root@omv:/etc/mdadm# mdadm -Q /dev/sdb
/dev/sdb: is not an md array
/dev/sdb: device 3 in 3 device unknown raid5 array.  Use mdadm --examine for more detail.
root@omv:/etc/mdadm# mdadm -Q /dev/sdc
/dev/sdc: is not an md array
/dev/sdc: device 0 in 3 device unknown raid5 array.  Use mdadm --examine for more detail.
root@omv:/etc/mdadm# mdadm -Q /dev/sdd
/dev/sdd: is not an md array
/dev/sdd: device 3 in 3 device unknown raid5 array.  Use mdadm --examine for more detail.

Then used mdadm --examine /dev/sdX to get more information which gives me:

/dev/sdb:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : abdf672e:cf99b72d:df8be434:4b1320a7
           Name : omv:pool  (local to host omv)
  Creation Time : Thu Oct 20 23:09:18 2011
     Raid Level : raid5
   Raid Devices : 3

 Avail Dev Size : 3907027120 (1863.02 GiB 2000.40 GB)
     Array Size : 7814051840 (3726.03 GiB 4000.79 GB)
  Used Dev Size : 3907025920 (1863.02 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : b08f4b42:3d5d774b:46dd4460:10162e23

    Update Time : Tue Mar 27 20:47:45 2012
       Checksum : 93cc85d - correct
         Events : 0

         Layout : left-symmetric
     Chunk Size : 512K

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

/dev/sdc:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : abdf672e:cf99b72d:df8be434:4b1320a7
           Name : omv:pool  (local to host omv)
  Creation Time : Thu Oct 20 23:09:18 2011
     Raid Level : raid5
   Raid Devices : 3

 Avail Dev Size : 3907027120 (1863.02 GiB 2000.40 GB)
     Array Size : 7814051840 (3726.03 GiB 4000.79 GB)
  Used Dev Size : 3907025920 (1863.02 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : 3a5f2e45:a00ffef6:f1881208:258c62d6

    Update Time : Tue Mar 27 20:47:45 2012
       Checksum : 12a86cfe - correct
         Events : 246

         Layout : left-symmetric
     Chunk Size : 512K

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

/dev/sdd:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : abdf672e:cf99b72d:df8be434:4b1320a7
           Name : omv:pool  (local to host omv)
  Creation Time : Thu Oct 20 23:09:18 2011
     Raid Level : raid5
   Raid Devices : 3

 Avail Dev Size : 3907027120 (1863.02 GiB 2000.40 GB)
     Array Size : 7814051840 (3726.03 GiB 4000.79 GB)
  Used Dev Size : 3907025920 (1863.02 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
          State : clean
    Device UUID : d67e800b:e5372705:556cf02d:534eb1f5

    Update Time : Tue Mar 27 20:47:45 2012
       Checksum : 2c50597d - correct
         Events : 0

         Layout : left-symmetric
     Chunk Size : 512K

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

As you can see two of the three disks are marked as a spare device. Mdstat shows this:

cat /proc/mdstat 
Personalities : [raid6] [raid5] [raid4] 
md127 : inactive sdc[0](S) sdd[3](S)
      3907027120 blocks super 1.2

unused devices: <none>

Running the array produces the following error:

mdadm: failed to run array /dev/md127: Input/output error

I also tried to assemble the array by hand what simple tells me that it can't create an array of two disks. Is there a way to force the spare / active state of a disk and change the disk number in the array?

Dave M
  • 4,514
  • 22
  • 31
  • 30
Kolja
  • 121
  • 2
  • 2
    Its failing to assemble because the event counter on `sdc` is higher than the other two (meaning the disk has more recent data than the others). You could try adding `--force` when you assemble the array, but may have to assemble the array with just `sdb` and `sdd` (`sdc` missing), and then add `sdc` once its up. – phemmer Mar 27 '12 at 22:43

0 Answers0