A few years back my motherboard died. I had two 74GB raptor hard drives set up in a RAID0 (striped) array using the motherboard's built in fakeRAID controller. I tried to recover some of the data today and managed to get the old ntfs partition mounted.
I plugged in the drives to the standard SATA ports on my new motherboard. I have Ubuntu installed on a third hard drive. The two raptor hard drives showed up as /dev/sdb
and /dev/sdc
.
First, make sure you have mdadm
installed. mdadm
is the linux software RAID management tool:
$ sudo apt-get install mdadm
Now we will try to create a RAID0 array that matches the original fakeRAID one. RAID0 splits data between the drives in chunks, and to read back the data, we need to know which hard drive had the first chunk and how big the chunks were.
To figure which hard drive was first, run fdisk
:
$ sudo fdisk -l
Disk /dev/sdb: 74.4 GB, 74355769344 bytes
255 heads, 63 sectors/track, 9039 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x7962aa02
Disk /dev/sdb doesn't contain a valid partition table
Disk /dev/sdc: 74.4 GB, 74355769344 bytes
255 heads, 63 sectors/track, 9039 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3e344803
Device Boot Start End Blocks Id System
/dev/sdc1 * 1 18070 145147243+ 7 HPFS/NTFS
At least /dev/sdc
has a partition table, so it was probably the first hard drive in the array.
To find the chunk size, I just guessed. Usually it will be one of 64K, 32K, 16K, 128K, etc. I vaguely remember setting it to 16K when I created the fakeRAID. The moral of the story is write down the chunk size when creating a RAID0 array so that recovery is easier.
Now to create the array. /dev/md0
will be the name of the new array, and the hard drive with the first chunk should be listed first (in my case /dev/sdc
):
$ sudo mdadm --create /dev/md0 --verbose --level=0 --raid-devices=2 --chunk=64 /dev/sdc /dev/sdb
Try and mount the new raid array (in my case with NTFS, to /media/old_raid0
):
$ sudo mkdir /media/old_raid0
$ sudo mount.ntfs /dev/md0 /media/old_raid0
If the mount fails, try a different chunk size:
$ sudo mdadm --stop /dev/md0 && sudo mdadm --remove /dev/md0
$ sudo mdadm --create /dev/md0 --verbose --level=0 --raid-devices=2 --chunk=32 /dev/sdc /dev/sdb
After finding the right chunk size, the mount should be successful, and a new file system should show up in nautilus. Recovery is as simple as copying files to a different hard drive.
No comments:
Post a Comment