0

I have a machine where the sata card failed and caused me to lose my raid array. I tested the drives externally and they are in good shape. I have moved the drives to a new machine (with enough onboard sata ports) and am attempting to get the array back up but I've run into problems. It's a RAID 5 array with 4 drives. It appears one of the drives is not in the array. I'm running ubuntu 14.04 and the current mdadm.conf is still the default. I have the old mdadm.conf information. I'd really like to preserve the data on the drives. Suggestions?

Here's what mdadm has to say:

cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md127 : inactive sdd1[2] sde1[4] sdb1[5]
      5860537608 blocks super 1.2

-

sudo mdadm --examine /dev/sd[bcde]1
/dev/sdb1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x2
     Array UUID : ef1b89aa:a2bbaab9:2ce4bdd0:47832afb
           Name : mediaserver:0
  Creation Time : Tue Aug  6 08:38:10 2013
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3907025072 (1863.01 GiB 2000.40 GB)
     Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
  Used Dev Size : 3907023872 (1863.01 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
Recovery Offset : 1799197544 sectors
   Unused Space : before=1968 sectors, after=1200 sectors
          State : clean
    Device UUID : 968168e5:6c695c7b:66a78ba1:9bccdc80

    Update Time : Sun Sep 29 16:09:54 2013
       Checksum : dd82d9a - correct
         Events : 47568

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 2
   Array State : .AAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdc1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : ef1b89aa:a2bbaab9:2ce4bdd0:47832afb
           Name : mediaserver:0
  Creation Time : Tue Aug  6 08:38:10 2013
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3907025072 (1863.01 GiB 2000.40 GB)
     Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
  Used Dev Size : 3907023872 (1863.01 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=1200 sectors
          State : clean
    Device UUID : 1da9199e:cc6fc424:128e502c:881d890a

    Update Time : Sun Sep 29 14:46:26 2013
       Checksum : 1923ec18 - correct
         Events : 47565

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 0
   Array State : AAAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sdd1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : ef1b89aa:a2bbaab9:2ce4bdd0:47832afb
           Name : mediaserver:0
  Creation Time : Tue Aug  6 08:38:10 2013
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3907025072 (1863.01 GiB 2000.40 GB)
     Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
  Used Dev Size : 3907023872 (1863.01 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=1200 sectors
          State : clean
    Device UUID : 3688a662:e042319b:017fe47f:a73d04b2

    Update Time : Sun Sep 29 16:09:54 2013
       Checksum : 4f2dc2e7 - correct
         Events : 47568

         Layout : left-symmetric
     Chunk Size : 512K

   Device Role : Active device 1
   Array State : .AAA ('A' == active, '.' == missing, 'R' == replacing)
/dev/sde1:
          Magic : a92b4efc
        Version : 1.2
    Feature Map : 0x0
     Array UUID : ef1b89aa:a2bbaab9:2ce4bdd0:47832afb
           Name : mediaserver:0
  Creation Time : Tue Aug  6 08:38:10 2013
     Raid Level : raid5
   Raid Devices : 4

 Avail Dev Size : 3907025072 (1863.01 GiB 2000.40 GB)
     Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
  Used Dev Size : 3907023872 (1863.01 GiB 2000.40 GB)
    Data Offset : 2048 sectors
   Super Offset : 8 sectors
   Unused Space : before=1968 sectors, after=1200 sectors
          State : clean
    Device UUID : 173cc321:8c8b416a:635388f7:3dd0bb3e

    Update Time : Sun Sep 29 16:09:54 2013
       Checksum : e1b6266d - correct
         Events : 47568

         Layout : left-symmetric
     Chunk Size : 512K

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

With array stopped

sudo mdadm --assemble --scan -v
mdadm: looking for devices for further assembly
mdadm: no RAID superblock on /dev/sde
mdadm: no RAID superblock on /dev/sdd
mdadm: no RAID superblock on /dev/sdc
mdadm: no RAID superblock on /dev/sdb
mdadm: no RAID superblock on /dev/sda5
mdadm: no RAID superblock on /dev/sda2
mdadm: no RAID superblock on /dev/sda1
mdadm: no RAID superblock on /dev/sda
mdadm: /dev/sde1 is identified as a member of /dev/md/mediaserver:0, slot 3.
mdadm: /dev/sdd1 is identified as a member of /dev/md/mediaserver:0, slot 1.
mdadm: /dev/sdc1 is identified as a member of /dev/md/mediaserver:0, slot 0.
mdadm: /dev/sdb1 is identified as a member of /dev/md/mediaserver:0, slot 2.
mdadm: added /dev/sdc1 to /dev/md/mediaserver:0 as 0 (possibly out of date)
mdadm: added /dev/sdb1 to /dev/md/mediaserver:0 as 2
mdadm: added /dev/sde1 to /dev/md/mediaserver:0 as 3
mdadm: added /dev/sdd1 to /dev/md/mediaserver:0 as 1
mdadm: /dev/md/mediaserver:0 assembled from 2 drives and 1 rebuilding - not enough to start the array.
mdadm: looking for devices for further assembly
mdadm: No arrays found in config file or automatically

-

sudo mdadm --detail --scan
ARRAY /dev/md127 metadata=1.2 spares=1 name=mediaserver:0 UUID=ef1b89aa:a2bbaab9:2ce4bdd0:47832afb

based on a suggestion from the comments... I tried this and got a new error.

sudo mdadm --assemble /dev/md127 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1
mdadm: /dev/md127 assembled from 2 drives and 1 rebuilding - not enough to start the array.

ran smartctl on all drives and they passed

0

It looks like sdc1 is not assembled. I am using mdadm as well, it does not work reliable using scan operations - I always assemble them manually. So try the following:

Make sure your array is stopped:

mdadm --stop /dev/md127

Then reassemble your array with the following line:

mdadm --assemble /dev/md127 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

Now check your status:

mdadm --detail /dev/md127

Your array will most likely being re-synced.

|improve this answer|||||
  • I got a new error – daisychick Nov 28 '14 at 6:31
  • sudo mdadm --assemble /dev/md127 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1 mdadm: /dev/md127 assembled from 2 drives and 1 rebuilding - not enough to start the array. – daisychick Nov 28 '14 at 6:53
  • Try adding --force – tombert Nov 29 '14 at 12:54
  • Another possibility is to re-create the array with "assume-clean" ... – tombert Nov 29 '14 at 18:35
  • I'm not 100% sure the drives are clean though. I was in the middle of a grow when it failed. However, the data on the disks had not changed in over a month. – daisychick Dec 2 '14 at 4:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.