Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I co-worker had two drives configured as a stripe on a motherboard with an on-board Promise FastTrak 133. The motherboard failed, and we've been unable to find any others with an on-board Promise controller which can recognize the array.

With Linux or some disk editors, I can see data on both drives... and I want to see if I can combine the data from both drives onto a single, larger drive. But I need to know how that information is interleaved on the drives.

I've tried dmraid on Linux, but that doesn't recognize the drives as an array. I guess I could just try combining alternating blocks from the drives, starting with a block size of 256B and keep doubling until I get a result that looks intact. But I'd like to avoid that if someone already knows how Promise controllers spread the data over a striped array.

share|improve this question
1  
Why don't you just restore your backup? It would be a lot faster than attempting to "recover" anything from this antique. –  Michael Hampton Dec 14 '12 at 17:18

1 Answer 1

Okay, I figured it out. Various Promise manuals state that the stripe size defaults to 64k and can be set to 32k or 128k. So, I wrote a little java application to combine from two different sources, and it worked like a charm! Turns out that they were 64k stripes.

Here's the code, just in case anybody else ever has this problem. It's not fancy (and it just runs until it runs out of input or output space), but it'll get you out of a pinch.

public class PromiseFastTrakCombiner {

    public static void main(String[] args) {
        if(args.length != 4) {
            System.out.println("Usage: java PromiseFastTrakCombiner <source1> <source2> <dest> <blocksize_in_kB>");
            System.exit(1);
        }

        String source1 = args[0];
        String source2 = args[1];
        String dest = args[2];
        int blocks = Integer.parseInt(args[3]);
        System.out.println("Going to copy: " + source1 + " and " + source2 + " to " + dest + " with " + blocks + "kB blocks");
        System.out.println("If this is not what you want, hit Ctrl-C now. Otherwise, hit Enter");
        try {
            System.in.read();
        } catch (IOException e) {
            e.printStackTrace();
        }

        try {
            FileInputStream in1 = new FileInputStream(source1);
            FileInputStream in2 = new FileInputStream(source2);
            FileOutputStream out = new FileOutputStream(dest);

            int bufsize = 1024 * blocks;
            byte[] buffer = new byte[bufsize];
            long bytesread;
            long totalbytes = 0;
            long lastreport = 0;
            while(true) {
                bytesread = in1.read(buffer);
                totalbytes += bytesread;
                out.write(buffer);
                bytesread = in2.read(buffer);
                totalbytes += bytesread;
                out.write(buffer);
                // Progress update after every 10MB...
                if(totalbytes - lastreport > 10000000) {
                    System.out.println("Bytes processed: " + totalbytes);
                    lastreport = totalbytes;
                }
            }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
share|improve this answer
2  
Hard-core... Good work. –  ewwhite Dec 15 '12 at 18:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.