Mdadm raid
I have a failed legacy Mdadm raid 1 and need to recover it. One drive has the data still, and the next needs to be added to the array. During the down time I have changed distros to Gentoo. I need to either recreate my legacy array without losing the data on the first drive, or create a superblock array and keep the data in tact.
|
Well, I'd imagine that mdadm -B /dev/mdX /dev/device1 missing --level=1 --raid-devices=2 would start your array with the missing drive. You could then mdadm --add /dev/mdX /dev/device2 to rebuild redundancy, or you could copy the data to a new array with superblocks. See man mdadm.
|
I executed the command and got this:
Code:
mdadm: ADD_NEW_DISK failed for /dev/hdb1: Invalid argument |
Hmm, maybe you can't --add on a legacy array. I presume that it was the second command that gave you an error. You might want to post Exactly what you typed with fdisk -l as well to avoid misunderstanding.
Assuming that's OK, I'd just build a new array, mount both of them and rsync or cp the data over. Something like: #check the oldarray to make sure it's built and running mdadm -S /dev/mdX # mount it mount /dev/mdX /mnt/oldarray #make a new array with superblocks somewhere else mdadm --create /dev/mdY /deviceA /deviceB #check to make sure it's what you want mdadm -S /dev/mdY #mount it mount /dev/mdY /mnt/newarray rsync -avH /mnt/oldarray /mnt/newarray |
I typed
Code:
mdadm -B /dev/mdX /dev/device1 missing --level=1 --raid-devices=2 Code:
mdadm: ADD_NEW_DISK failed for /dev/hdb1: Invalid argument |
You mean you typed something like
mdadm -B /dev/md0 /dev/hdb1 missing --level=1 --raid-devices=2 right? Not something like mdadm -B /dev/hdb1 /dev/device1 missing --level=1 --raid-devices=2 right? Just trying to be clear, my syntax was meant as a general example not a specific recipe! |
I didnt use the general stuff haha, but I'm working on it. My local Gentoo Guru is helping me =P
|
All times are GMT -5. The time now is 05:35 PM. |