You can probably get away with reading 1MB at a time.  This will be more efficient also.  <br><br>Good luck, document well, this will be interesting to read once you have repaired as much as you can.<br><br>Dan<br><br><div class="gmail_quote">
On Mon, Jul 25, 2011 at 3:34 PM, David L. Willson <span dir="ltr">&lt;<a href="mailto:DLWillson@thegeek.nu">DLWillson@thegeek.nu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
sda and sdb will get dd&#39;d into files on the great big new drive, as soon as I have time. For now, they&#39;ve been pulled out of the system and are waiting patiently.<br>
<br>
What I need is a script that goes something like:<br>
<br>
Read a block from sda, read a block from sdb.<br>
If they&#39;re the same, overwrite the block from sdb with zeroes.<br>
If they&#39;re different, quit.<br>
Read the next block from sda and sdb. Repeat.<br>
<br>
Since nobody&#39;s produced such a thing, I suppose I&#39;ll have to write it...<br>
<div class="im"><br>
David L. Willson<br>
Trainer, Engineer, Enthusiast<br>
RHCE MCT MCSE Network+ A+ Linux+ LPIC-1 NovellCLA UbuntuCP<br>
tel://720.333.LANS<br>
Freedom is better when you earn it. Learn Linux.<br>
<br>
</div><div><div></div><div class="h5">----- Original Message -----<br>
&gt; I suspect that you  don&#39;t have any other backup of the sdb drive?<br>
&gt; yeah. I&#39;ve been there.  Sucks to be you right now. :-(<br>
&gt;<br>
&gt; At this point the most important thing is to preserve the state of<br>
&gt; what you have.  I hate to say it but you might want to dd what&#39;s left<br>
&gt; of /dev/sdb to some static storage like a usb drive.<br>
&gt; Step 2 is to try to fsck with some alternate superblock.  With luck<br>
&gt; you&#39;ll get a file system back from that.  After that its pretty much<br>
&gt; catch as catch can as to what will work.<br>
&gt; If you know how much got over written you can write back that amount<br>
&gt; from a newfs&#39;d drive and retry the fsck.<br>
&gt;<br>
&gt; On Mon, Jul 25, 2011 at 3:00 PM, David L. Willson<br>
&gt; &lt;<a href="mailto:DLWillson@thegeek.nu">DLWillson@thegeek.nu</a>&gt; wrote:<br>
&gt; &gt; Damn it, dd! Stop doing what I say! Or at least warn me... Ugh...<br>
&gt; &gt;<br>
&gt; &gt; I ~meant~: $ dd if=/dev/sda of=/dev/sdc<br>
&gt; &gt; but I said: $ dd if=/dev/sda of=/dev/sdb<br>
&gt; &gt;<br>
&gt; &gt; /dev/sdb ~had~ important stuph on it.<br>
&gt; &gt;<br>
&gt; &gt; Now, it has an in-determinate amount of garbage copied verbatim<br>
&gt; &gt; from<br>
&gt; &gt; /dev/sda, as much as it could copy before I read what I&#39;d written,<br>
&gt; &gt; shrieked,<br>
&gt; &gt; and filled the keyboard buffer with &lt;CTRL&gt;+c&#39;s followed by some<br>
&gt; &gt; important<br>
&gt; &gt; stuph I might never see again.<br>
&gt; &gt;<br>
&gt; &gt; Sigh...<br>
&gt; &gt;<br>
&gt; &gt; I think step 0 of my &quot;get some back&quot; plan is to zero out the bit of<br>
&gt; &gt; /dev/sdb<br>
&gt; &gt; that matches /dev/sda, in order to get rid of the bogus information<br>
&gt; &gt; at the<br>
&gt; &gt; beginning of the disk. Anyone have a script handy?<br>
&gt; &gt;<br>
&gt; &gt; Links for when I get to steps 1-99?<br>
&gt; &gt;<br>
&gt; &gt; David L. Willson<br>
&gt; &gt; Trainer, Engineer, Enthusiast<br>
&gt; &gt; RHCE MCT MCSE Network+ A+ Linux+ LPIC-1 NovellCLA UbuntuCP<br>
&gt; &gt; tel://720.333.LANS<br>
&gt; &gt; Freedom is better when you earn it. Learn Linux.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; clue mailing list: <a href="mailto:clue@cluedenver.org">clue@cluedenver.org</a><br>
&gt; &gt; For information, account preferences, or to unsubscribe see:<br>
&gt; &gt; <a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br>
&gt; &gt;<br>
&gt; _______________________________________________<br>
&gt; clue mailing list: <a href="mailto:clue@cluedenver.org">clue@cluedenver.org</a><br>
&gt; For information, account preferences, or to unsubscribe see:<br>
&gt; <a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br>
&gt;<br>
_______________________________________________<br>
clue mailing list: <a href="mailto:clue@cluedenver.org">clue@cluedenver.org</a><br>
For information, account preferences, or to unsubscribe see:<br>
<a href="http://cluedenver.org/mailman/listinfo/clue" target="_blank">http://cluedenver.org/mailman/listinfo/clue</a><br>
</div></div></blockquote></div><br>