Raid5: one drive failed Rebuild b/c another drive is one the way out.

  • Raid 5 setup with 6 drives. I had a drive fail started to replace it . Noticed that another drive is giving me SMART errors. I swapped the dead drive, and started the rebuild. It failed, probably because of the bad drive. OMV labeled the raid as "Clean, Failed", set the new drive as a "spare" and labeld the bad drive as "faulty". My main question, Am I out of luck or is there any hope of coming back?


    After the failed rebuild, I rebooted and of course the array failed to load, so I ran


    mdadm --stop /dev/md127

    mdadm --assemble --force --verbose /dev/md127 /dev/sd[abcdfg]

    Code
    root@tronomv:~# cat /proc/mdstat
    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
    md127 : active (auto-read-only) raid5 sda[0] sdd[6](S) sdg[5] sdf[4] sdc[2] sdb[1]
          29301952000 blocks super 1.2 level 5, 512k chunk, algorithm 2 [6/5] [UUU_UU]
          bitmap: 3/44 pages [12KB], 65536KB chunk
    
    unused devices: <none>

    The Bad drive is /sdb

    • Offizieller Beitrag

    A few things stand out;

    mdadm: no uptodate device for slot 3 of /dev/md127

    mdadm: added /dev/sdd to /dev/md127 as -1

    the above two outputs suggests there is possibly a connection issue with /dev/sdd and it would also confirm that it's seen as a spare.


    The output from mdstat the array is an auto-read-only state, the command to correct this is mdadm --readwrite /dev/md127


    As to /dev/sdb whilst it's showing with bad sectors you cannot replace this drive until /dev/sdd has been re added to the array -> why, well currently you only have 5 of the 6 drives running in the array


    To add /dev/sdd -> mdadm --add /dev/md127 /dev/sdd

  • Geaves, thanks for the reply,


    I ran

    mdadm --readwrite /dev/md127

    It has put the array in to recovery i'll keep ypu posted.

    dev/sdd is a new blank replacement drive for the old one that I swapped out, it has not been built into the array before. The old drive is dead. Can I still manually add the new one it to the array? I've been running the the recovery action in the GUI and it has not been able to add it.

    • Offizieller Beitrag

    dev/sdd is a new blank replacement drive for the old one that I swapped out, it has not been built into the array before

    If that's the case, then Storage -> Disks, and wipe the drive, then Raid Management select the array then I think -> Recover on the menu a dialog box should display the new drive, select it and click OK the array will rebuild.

  • Thats what I did from the get go, but on the rebuild it fails halfway through. and and labels the array as "clean, Failed". dev/sdd is turned into a spare and dev/sdb is listed as faulty.

    • Offizieller Beitrag

    Thats what I did from the get go, but on the rebuild it fails halfway through. and and labels the array as "clean, Failed". dev/sdd is turned into a spare and dev/sdb is listed as faulty.

    Then the issue is probably with /dev/sdb

    I ran

    mdadm --readwrite /dev/md127

    It has put the array in to recovery i'll keep ypu posted.

    Is that still the case i.e. in recovery

  • Most recent update

    Code
    root@tronomv:~# cat /proc/mdstat
    Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
    md127 : active raid5 sda[0] sdd[6] sdf[5] sdg[4] sdc[2] sdb[1]
          29301952000 blocks super 1.2 level 5, 512k chunk, algorithm 2 [6/5] [UUU_UU]
          [==>..................]  recovery = 12.4% (732327528/5860390400) finish=582.2min speed=146788K/sec
          bitmap: 3/44 pages [12KB], 65536KB chunk
    
    unused devices: <none>
  • Ok so the rebuild failed am I out of opitons?

    • Offizieller Beitrag

    I have only seen this once on here and the only option was to rebuild and restore, there is a command I found online that should have helped but for whatever reason failed to return any information -> cat /sys/block/md127/md/sync_action


    TBH your into plan B, if the above command returns nothing (BTW if it does try changing md127 to md0) I believe what has happened is another drive has begun to fail, if you compare your mdadm --detail in your first post to the one above you can clearly see the difference.


    Addendum Edit:


    Based on the above this is never going to recover, so worth a shot, might be;

    mdadm --stop /dev/md127

    mdadm --fail /dev/md127 /dev/sdb

    mdadm --remove /dev/md127 /dev/sdb

    mdadm --add /dev/md127 /dev/sdd

  • Janimator

    Hat das Label gelöst hinzugefügt.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!