Results 1 to 7 of 7

Thread: Degraded software RAID

  1. #1
    Join Date
    Jun 2005
    Beans
    125
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Degraded software RAID

    HELP! (please)

    Lost power to my PC last night and it didnt get to shut down properly. Tried to boot it up this morning and all I got after grub was a purple screen. Rebooted and got the same again. Booted into recovery mode and got a whole lot of text about mounting file systems etc, then got a "Do you wish to start the degraded RAID? [y/n]" prompt. So of course I choose Y and it "failed to start array /dev/md/0: Input/output error" and i get dropped into an initramfs prompt.

    output of cat /proc/mdstat:
    md1 : active raid5 sdh3[1] sdi[2] sdg3[0]
    488278016 blocks super 1.2 level 5, 512 kchunk, algorithm 2 [3/3] [UUU]
    md0 : inactive sdi2 [2]
    97655226 blocks super 1.2
    md3 : active raid5 sdi4[2] sdh4[1] sdg4[0]
    9762816 blocks super 1.2 level5, 512k chunk, algorithm 2 [3/3] [UUU]
    md2 : active raid5 sdi5[2] sdh5[1] sdg5[0]
    3213665280 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/3] [UUU]
    unused devices: <none>

    So it seems to me its just md0 thats pooped itself rather than a failed drive. But seeing as 2 of the 3 drives are missing from md0, I cant repair (or even boot).

    All my data is on md2, which to me looks like its still in one piece.

    Is there anything I can do to get this working again?

    Thanks

  2. #2
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Degraded software RAID

    And what is md0? The root partition? /boot partition?

    Have you tried if it will assemble correctly from live mode? The live cd doesn't include mdadm so you have to install it first (and do it every time you reboot since it doesn't remember it):
    Code:
    sudo apt-get install mdadm
    sudo mdadm --assemble --scan
    That should scan all disks and assemble the devices it can. See if you get lucky with md0.

    Otherwise you might be in real trouble losing two partitions out of three in raid5, but you main data on md2 should be safe.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  3. #3
    Join Date
    Jun 2005
    Beans
    125
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Degraded software RAID

    Thanks Darkod

    mdadm --assemble --scan gave me "not enough to start the array" - as expected.

    md0 is /
    md1 is /home
    md2 is /data
    md3 is swap

    So md0 isnt overly important... its just root. If i go ahead and reinstall and recreate md0 in the process... I can mount md1+2 and all should be good??? right?

    Or is there something im overlooking here?

  4. #4
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Degraded software RAID

    Right. As long as the data on md1 and md2 is good, you can always make a clean install on md0 and attach md1 and md2 during the install, or later if you prefer.

    Make sure you never tick the format box for them, otherwise, it works fine.

    And of course, you will lose any customization you might have made in the OS and which is outside your /home. For settings inside /home they will be picked up since you have separate /home which won't be destroyed in the clean install.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  5. #5
    Join Date
    Jun 2005
    Beans
    125
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Degraded software RAID

    That's what I like to hear. Thought that would be the case, but its always good to get a second opinion when there's a possibility of loosing everything.

    Will try it tonight and let you know how it goes.

    Thanks again.

  6. #6
    Join Date
    Nov 2009
    Location
    Segur De Calafell, Spain
    Beans
    11,660
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Degraded software RAID

    Depending how are you installing, with the alternate cd or the live cd by adding mdadm first, don't forget that you NEVER run mdadm --create on existing mdX devices. That will destroy the data.

    You run --create only once to create the device, and for assembling only --assemble.

    In this case you would need to create new md0 device and only assemble md1 and md2, if they are not assembled automatically. You don't recreate md1 and md2.
    Darko.
    -----------------------------------------------------------------------
    Ubuntu 12.04 LTS 64bit & Windows 7 Ultimate 64bit

  7. #7
    Join Date
    Jun 2005
    Beans
    125
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: Degraded software RAID

    Good news! Back up and running! And I still have all my data.

    Had a bit of an issue with grub not wanting to boot the raid... but I showed it who's boss.

    Thanks again mate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •