Thread (7 messages) 7 messages, 4 authors, 2013-09-07

Re: Is a raid0 512 byte chunk size possible? Or is it just too small?

From: Veedar Hokstadt <hidden>
Date: 2013-09-07 19:57:39

Just to close this out. The making a 4TB image file of the raid0 was
not feasible for me so I ended up using a commercial raid recovery app
that could handle the 512 byte chunk.

Thanks for your help.  -V

On 8/31/13, Roman Mamedov [off-list ref] wrote:
quoted hunk ↗ jump to hunk
On Sat, 31 Aug 2013 01:05:44 -0400
Veedar Hokstadt [off-list ref] wrote:
quoted
I am totally aware of the complications involved but if I can somehow
build a raid0 / chunk 512B array with mdadm using the raw Lacie dives
then I can take it from there to recover the data.
You can write a simple program to read in chunks of 512 bytes from one
drive,
then from the other, piece this together and write to some third file. Here
is
something quick that I modified from a tool I already had. Even though it's
doing the tight loop in PHP, it seems to do about 100 MB/sec reading from
two
SATA drives and writing to a file on a RAID6 in my system.
--- merge.php ---
#!/usr/bin/php
<?php
  $f = array();
  array_shift($argv);
  foreach($argv as $arg) {
    if(($f[] = @fopen($arg, "rb"))===false) die("Unable to open file
$arg.\n");
  }
  while(@$feof_cnt<2) {
    $feof_cnt=0;
    foreach($f as $file) {
      print(fread($file, 512));
      if(feof($file))$feof_cnt++;
    }
  }
?>

---

Usage: ./merge.php /dev/sda /dev/sdb > image.img

And you will need somewhere to store this image.img that's has the free
space
to fit the size of sda+sdb. Also check that you specify the drives in the
proper order (only 2 tries, really).

--
With respect,
Roman
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help