3Ware 9650SE Raid 0 Striping information

ghpearson

Distinguished
Apr 27, 2011
4
0
18,510
How does the 3Ware 9650SE setup the disks on a RAID 0 with 64K stripes. I had a Logical Volume created with port 0, port 1, and port 2; each connected to 1 Tb harddrives. The container has since been deleted. I would like to create a non raid image from the three physical drives to attempt a recovery.

Here is the log of events:
I had a 3Ware 9650SE with 3 by 1TB drives setup in a RAID 0 with 64K stripes; until the power supply started to go out. The system is Linux Ubuntu with GPT partition table and ext3 formatted filesystem. Unfortunately, like most things hardware, the power supply was partially functioning and allowed the system to boot up.
The partition originally mounted, but the files were not accessible. I unmounted the partition and attempted the fsck check on the system. It came up with block errors that seemed to continue on forever. I decided to abort the fsck check and try another approach. I then rebooted to check the integrity of the array; which showed to be ok initially. I powered the system down and brought back to my office for a more in depth scan of the file system. On the next boot up the drive array failed. 2 disks were detached from volume group leaving 1 disk available. I tried to reconnect the drives inside the controller bios, but it did not allow this to be completed. I finally wound up removing the last drive from the volume group in hopes of backing up the disks to a single image for scan and recovery.
Here is the program I wrote to combine the 3 disks into an image:

main(int argc, char *argv[]) {
FILE *fin1, *fin2, *fin3, *fout;
int x, y, n;
unsigned char buffer[64];
char *prog = argv[0];

if(argc < 5){
fprintf(stderr, "%s Usage:\n %s <infile1> <infile2> <infile3> <outfile>\n", prog, prog);
exit(1);
}
fin1=fopen(argv[1], "rb");
fin2=fopen(argv[2], "rb");
fin3=fopen(argv[3], "rb");
fout=fopen(argv[4], "wb");
while(!feof(fin1)) {
n = fread(buffer, 64, 1, fin1);
if (n > 0 ) fwrite(buffer, 64, 1, fout);
n = fread(buffer, 64, 1, fin2);
if (n > 0 ) fwrite(buffer, 64, 1, fout);
n = fread(buffer, 64, 1, fin3);
if (n > 0 ) fwrite(buffer, 64, 1, fout);
}
}

I am open to suggestions or approaches to salvage the data.
thanks
 

ghpearson

Distinguished
Apr 27, 2011
4
0
18,510
Update on progress.
I modified the c program to account for 64K instead of 64bytes. This allowed the striping of 3 drives into 1 image file for scanning; now on to the order.
I discovered that the 3Ware 9650SE seems to have combined the three drives in reverse order. It started with port 2, then put in port 1, then added port 0. This was discovered through partial restore of an image then scanning/salvaging the image for files. I managed to recover several video files that were viewable once the order was correct.
I am now waiting for the final 3 TB combined to occur. This should take around 6.5 Hours to complete.
After that I should be able to scan the image and salvage the files; cross fingers.
 

ghpearson

Distinguished
Apr 27, 2011
4
0
18,510
Final note on the solution to this problem.
I completed the extraction of the three physical drives into a recreated raid image using the C program above. Once the order was correct and the image completed the testdisk program salvaged the directory and retrieved the data.
Lesson learned?
Double check the backups on a regular basis because intermittent hardware failure always trumps the best laid plans for servers.
I am also reconsidering whether backup drives inside the same server is a wise choice. I am now leaning towards network backups to other devices.