I recently had our backup server at work die. Upon investigation the Kubuntu 8 server had had it’s OS drive and one of the RAID1 data disks corrupted to such an extent it couldn’t boot. The bad data disk was so bad that it couldn’t even be assigned a hardware address under Linux or Windows.
The only hope remained with the remaining RAID1 disk.
As the server had been set up by a previous administrator as a software RAID, I thought it would be a nice simple job of sticking the drive into a good computer and copying files off.
Alas no.
Windows had no luck at all. This was due to the drive being formatted in ext2, and there was no way I could get drivers for a ext2 drive to be read by Windows XP or 7.
The Linux mount command faired little better. This returned:
| |
Essentially the problem was that we are trying to load only 1 disk from a RAID array and getting nowhere without the other RAID members. But we couldn’t use them because of corruption.
The way around this was to create an imaginary mirrored disk to the good data disk, mount the psuedo-array, and copy the files off. Here’s how I did it.
Open a console window in linux (I’m using Ubuntu 10.10) and attach the drive using a USB caddy (SATA or IDE cable is possible just be careful on the next step)
Check the drives log file to see the address of the last added drive
| |
It should say something like
| |
Note the last line. Our drive is called sdd1
Next, get the multi-disk administer program (aka mdadm)
| |
Examine the current system for any RAID arrays. If nothing is found then it’s returned blank, as was the case for me
| |
Now we create a forced RAID1 from one real disk (and an imaginary one) (requires super user)
| |
Change the last word (in bold) for whatever your drive is called.
Mount the created RAID array
| |
Check status and file directory of mount
| |
Copy files to new drive (ie all of mounted array to other mounted disk under /media)
| |
Feel free to also use cp -r -v if you want to see that you are actually copying things. Otherwise you’ll just have a flashing cursor for a few hours.
Alternatively, you can now use your normal file browser and go to File System > mnt and copy and paste out in the normal way (Ctrl +C or right click then Copy).
Hope it helps!
