software raid/lost os drive: raid recovery?


Results 1 to 7 of 7

Thread: software raid/lost os drive: raid recovery?

  1. #1
    Join Date
    Dec 2001
    Posts
    122

    software raid/lost os drive: raid recovery?

    Greetings,

    I have a two (6 drive) raid 5 array's, and also a standalone boot drive (for the os (gentoo)). Last night, I lost the os drive (tried to mount it from a live cd and move the data off -- but no dice) and, along with it, my raid config (mdadm.conf). When I re-install, is there a method I can use to say these drives belong to this raid or that raid? Also, is it safe to assume the order I reassemble matters?

    Thanks,
    Drip

  2. #2
    Join Date
    Jul 2002
    Location
    Vladivostok, Russia
    Posts
    9,053
    Have you looked at "mdadm(8) manpage"? ....some possible choices.

    Assemble
    Assemble the parts of a previously created array into an active array. Components can be explicitly given or can be searched for. mdadm checks that the components do form a bona fide array, and can, on request, fiddle superblock information so as to assemble a faulty array.
    HERE
    HERE
    Last edited by JohnT; 01-14-2009 at 11:41 PM.
    "I was pulled over for speeding today. The officer said, "Don't you know
    the speed limit is 55 miles an hour?" And I said, "Yes, but I wasn't going
    to be out that long."

    How To Ask Questions The Smart Way
    COME VISIT ME IN RUSSIA NOW!!

  3. #3
    Join Date
    Dec 2001
    Posts
    122
    Hi John,

    I did see the manpage. I'm familiar with the mdadm --assemble command as I have used it a few times. When I have used it, I have always specified the drives to assemble in the exact order in which 'cat /proc/mdstat' enumerates them. One thing that did shed some light is the 2nd link. mdadm -E seems very helpful.

    John, thank you for your time in assisting me with my issue. I plan on starting this re-install on friday and have been in an information gathering phase; however, I believe that mdadm -E is what I need and I extend my gratitude.

    catch you down the log,
    Drip

  4. #4
    Join Date
    Jul 2001
    Location
    Fife, Scotland
    Posts
    1,794
    I have to assemble one of my arrays each time I use it because it's USB! Still, it's RAID-1, not RAID-5 but the command you're looking for is something like this:

    mdadm -A /dev/md0 /dev/sda /dev/sdb /dev/sdc /dev/sdd /dev/sde /dev/sdf

    Although be careful to make sure they come up in the right order... I don't think if will do them any good to be out of order but the header information for the RAID drive might set them up in the right order by itself...

    James

    Edit: I did a look on the Internet and you can use the command:

    mdadm --examine /dev/sda1

    Which will give you the order of the disks (down the bottom). 0 is the first drive, 1 the second and so on. This will allow you to assemble the drive in the correct order.
    Last edited by Satanic Atheist; 01-15-2009 at 10:35 AM. Reason: Additional info
    -----------------------------
    UseLinux.net
    -----------------------------

    perl -e 'use Math::Complex;$|=1;for$r(0..24){for$c (0..79){$C=cplx(($c/20.0)-3.0,-($r/12.0)+1.0);$Z= cplx(0,0);for($i=0;($i<80)&&(abs($Z)<2.0);$i++){$Z =$Z*$Z+$C;}print$i>=80?"*":" ";}print"\n";}'

  5. #5
    Join Date
    Dec 2001
    Posts
    122
    Right on man, so the -E (--examine) appears to be the way to go. I'll examine each drive to get its order and re-assemble.

    Thanks to you both for the help,
    Drip

  6. #6
    Join Date
    Jul 2001
    Location
    Fife, Scotland
    Posts
    1,794
    Not a problem.

    I cannot find anything on the Internet that mentions drive ordering in mdadm and I suspect that mdadm will rebuild the array in the correct order from the information in the RAID superblock on each drive (RAID drives have "2" superblocks - one for the file system and one (at the end of the drive) for the RAID information). The only thing that makes me suspicious about drive ordering is because I use RAID-1 and each drive is identical - therefore can the RAID superblock be different on each drive or is this information simply not relevant to a RAID-1 array and only to mdadm?

    James
    -----------------------------
    UseLinux.net
    -----------------------------

    perl -e 'use Math::Complex;$|=1;for$r(0..24){for$c (0..79){$C=cplx(($c/20.0)-3.0,-($r/12.0)+1.0);$Z= cplx(0,0);for($i=0;($i<80)&&(abs($Z)<2.0);$i++){$Z =$Z*$Z+$C;}print$i>=80?"*":" ";}print"\n";}'

  7. #7
    Join Date
    Aug 2013
    Posts
    1
    The data is striped across the disk, so the blocks of data will end up on all the drives. Lose one, lose everything. Its gone, dead, expired, passed on.

Posting Permissions

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