On the BTRFS mailing list one of the devs (or smart engineers) posted a different gddrescue script to clone brtfs drives, that should allow for better clones in times of troubles. It supposed to work better with drives that contain a BTRFS filesystem

From the gddrescue manpage (man page # man ddrescue) the simplest way is to first copy the good sections and then clone the bad sections. It copies only the bad sections on the second try because the log file keeps track of the progress (and it wont copy an area it successfuly copied already). ThereforeAfter ddrescue -n the destination drive DST123 will have all of the good sectors of the source drive SRC123. Now The logfile will mention all of these good and bad sectors so that when ddrescue -r1 runs it only runs across the none copied sectors (thats what it does, it will only attempt on none attempted sectors, and since -n says do not attempt bad sectors, all we have left then is just bad sectors) which are bad. It will retry once on them. If you want more retries just increase the count from -r1 to -r2 to -r3 (or whatever you want)

If need to force it:

Or one that logs to text file and to ddlog file (the text file can be viewed at any time to see if its on the first or second ddrescue command)



Link: http://www.spinics.net/lists/linux-btrfs/msg33168.html

Here is their script (just change the variables)


Leave a Reply

Your email address will not be published. Required fields are marked *