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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 31 Aug 2013 01:05:44 -0400
Veedar Hokstadt <veedar@xxxxxxxxx> wrote:

> 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

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux