recreate raid-5 array w/o loosing data
I rebuilt a server and am now trying to recover my large data arrays.
The server was ubuntu 10.04lts before. I decided to rebuild it with CentOS simply because I am more familiar with it. I had 2 raid-5 arrays on the old server:
How can I reassemble the arrays without loosing my data? I know the data can still be accessed because booting the server with a live-cd mounts and shows the arrays just fine. Should I boot with a live cd and copy the mdadm config file? Thanks in advance. BinWondrin ;-) |
The live CD probably just runs dmraid -ay.
Code:
dmraid -ay |
Thank you. I gave it a shot and here is what I get:
These are the devices: Quote:
Quote:
|
That's unfortunate.
You should definitely ensure that you have a good backup of the data before proceeding. Do you have a backup of the mdadm config file from the original system? |
O.K. - I figured it out:
mdadm will do it if supplied with the correct original raid device name followed by the devices that form ther array: Quote:
|
Thank you for posting the answer and for marking the thread "solved".
|
Quote:
The DDF1 array stores metadata at the end of the hard drive. One way to erase it is to zero out the entire hard drive, but that could take too much time depending on size. Another way, is to find out where the metadata is stored. You can do this in Linux by running "strace dmraid -c -s > /tmp/out 2>&1". Look at the output file for "lseek" which will give you the byte offset of the metadata. The metadata is stored in a bunch of different sectors, so "lseek" will appear a bunch of times, just find the smallest byte offset and use "dd" to zero the data from that point forward. |
All times are GMT -5. The time now is 05:25 AM. |