-
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
-
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.
-
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
-
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";}'
-
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
-
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";}'
-
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
-
Forum Rules
|
|