Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've had to (temporary) reduce my RAID5-Array, so that there are four out of five disks available. Things getting worse as my system crashed during write process. After reboot the system wants to start "Background Reconstruction" as it normally does to an intact array to reconstruct the missing redundancy. As the array is degraded, this reconstruction does not start (see https://raid.wiki.kernel.org/index.php/Tweaking,_tuning_and_troubleshooting#Autodetection last paragraph on what the Reconstruction does).

I want to make my array active again but a mdadm --run /dev/md127 produces an input/output error (same "background reconstruction"-message under syslog). I know that I am loosing some MB of data- but how can I get my array back to work?

/dev/md127:
        Version : 1.2
     Raid Level : raid5
  Used Dev Size : 1360148480 (1297.14 GiB 1392.79 GB)
   Raid Devices : 5
  Total Devices : 4
    Persistence : Superblock is persistent

    Update Time : Fri Jun 14 10:54:22 2013
          State : active, degraded, Not Started 
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 512K

           Name : mars:RA
           UUID : 05c6d9f1:87571dc6:ee0d9f6b:c0b0c320
         Events : 159201

    Number   Major   Minor   RaidDevice State
       7       8       18        0      active sync   /dev/sdb2
       8       8       66        1      active sync   /dev/sde2
       2       0        0        2      removed
       5       8       34        3      active sync   /dev/sdc2
       9       8       50        4      active sync   /dev/sdd2
share|improve this question
3  
Any data not backed up should be backed up now, if possible. Then just create a new array and restore your data from a backup. The whole point of RAID is to allow you to "just keep going" when something fails. If it won't "just keep going" trying to mess with just increases your downtime, defeating the point of RAID. The sooner you give up, the less downtime you have. –  David Schwartz Jun 14 '13 at 10:15
    
Show the exact error. –  psusi Jun 14 '13 at 14:30

1 Answer 1

I got it working again (after some extra adrenalin)!

I installed the kernel sources and read documentation/md.txt. There I found some interesting setting under /sys/block/md127/md/resync_start which stores the position of the resync-process. It was set to "0" meaning that the resync should start which never happens due to the degraded state of the array. I double checked that my other arrays have a value of "none" there (because the values have changed from some kernel versions to others). I simply echo'ed the "none" in there and surprisingly everything is working again. I'll start a fsck and thanks to the paranoia I have, I'm having md5-sums and par2 files for every file stored in the filesystem (I created them before I started this critical modification).

Phew... that was close ;-)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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