[olug] using dd to clone a drive
rob.townley at gmail.com
Wed Apr 20 19:35:50 CDT 2016
echo Kevins trick to get feedback from dd.
*There is also dd_rescue (note the underscore). At least one of them reads
the drive forwards and backwards. One is not compatible with '|' pipes.
*Make sure you execute `sync` as root and wait for it to finish.
*Keep in mind the destination disk or USB channel may be bad as well, so
maybe try copying to the harddisk first.
* ddrescue will NOT read AudioCDs! Mount it first.
On Wed, Apr 20, 2016 at 11:24 AM, Christopher Cashell <topher-olug at zyp.org>
> On Tue, Apr 19, 2016 at 10:16 AM, Justin Reiners <justin at hotlinesinc.com>
> > ddrescue is great, I use it all the time. Hih
> > On Apr 19, 2016 9:50 AM, "Matthew G. Marsh" <olug4mgm at paktronix.com>
> > wrote:
> > > +1 on that. I actually install this as dd on my systems as the syntax
> > > basic work is pretty much the same and the extra error correcting
> > features
> > > are well worth it. Especially when you use it over a netblock
> > >
> > > mgm
> > >
> > > On Mon, 18 Apr 2016, Dan Linder wrote:
> > > If you're looking to save the data that might be in the bad sectors,
> > >> "ddrescue". It's restart-able and has options to intensely try the
> > failed
> > >> sectors.
> > >>
> > >> Dan
> To follow on the comments from Dan and others, dd will usually work, and
> has the advantage of being installed on almost every box. However, there
> are better tools that are worth looking at if available.
> There are at least half a dozen dd-like tools that handle disk errors
> and bad sectors better than dd. Many of them perform better, too,
> defaulting to larger block sizes. The better versions will start with a
> large block size, and then reduce it repeatedly if they run into problems,
> minimizing lost data, and maximizing recovered data. Most of them give
> better visibility into status, too.
> Another thing that can be handy is to use dd to copy the disk to a disk
> image file. That image file can then be mounted via loopback for accessing
> the data. This can be easier to work with and manage than trying to go
> straight from one drive to another drive.
> One potential issue with traditional dd is that if it runs into a block it
> can't read, it can get hung on certain disk errors trying to read data.
> Many of the dd replacements will set a timeout after which they'll reduce
> the block size and retry, or eventually give up and move on.
> For a 1GB drive, if any copy hasn't finished in a couple of hours, it's
> unlikely it will finish. Try a different dd replacement that handles
> errors better and see if that works for you.
> Note, also, that dd can be used on a full disk (i.e. /dev/sda) or on a
> partition (i.e. /dev/sda1). Depending on what your goal is, one or the
> other might be more appropriate.
>  Quick list of packages from a Debian box: dcfldd sdd ddpt dc3dd rdd
> myrescue gddrescue safecopy
> OLUG mailing list
> OLUG at olug.org
More information about the OLUG