[olug] using dd to clone a drive

Dan Linder dan at linder.org
Mon Apr 18 19:41:50 CDT 2016


If you're looking to save the data that might be in the bad sectors, use
"ddrescue".  It's restart-able and has options to intensely try the failed
sectors.

http://www.gnu.org/software/ddrescue/

Dan

On Mon, Apr 18, 2016 at 7:12 PM, Kevin <sharpestmarble at gmail.com> wrote:

> The copy won't complete(I tried it with a similar situation). What I wound
> up doing is manually creating a filesystem on the new drive, mounting both
> filesystems, and then using rsync to copy the files over.
>
> I think I used CentOS.
>
> You can check the status of dd by sending it a -USR1 signal. Note that
> you'll have to send the dd process itself the signal, not sudo or su or any
> other similar process. From dd(1):
>
>        Sending a USR1 signal to a running 'dd' process makes it print I/O
> statistics to standard error and then resume copying.
>
>               $ dd if=/dev/zero of=/dev/null& pid=$!
>               $ kill -USR1 $pid; sleep 1; kill $pid
>
>               18335302+0 records in 18335302+0 records out 9387674624 bytes
> (9.4 GB) copied, 34.6279 seconds, 271 MB/s
>
>
> On Sun, Apr 17, 2016 at 10:53 PM, Jay Bendon <jaybocc2 at gmail.com> wrote:
>
> > The copy will complete.  Those read errors will turn into block errors on
> > the destination disk.  It will complete but data may not be available
> > depending on the number of errors.
> >
> > --Jay
> >
> > On Sun, Apr 17, 2016 at 8:43 PM, Tom Williamson <twilliam at inebraska.com>
> > wrote:
> >
> > > I tried to use dd to clone a 1 GB drive to another 1 GB drive. I had
> been
> > > getting warnings of "many bad sectors" on the one I was trying to copy
> > > from. When I ran the command, there was no error message, but I could
> not
> > > tell if anything was happening. How long should this process take? Will
> > the
> > > bad sectors prevent the copying from being able to complete the
> process?
> > I
> > > did see some conditional commands about errors, but I was not sure if
> > this
> > > would do what is needed to clone the image.
> > >
> > > I am using a live disk with ubuntu 14.04, to execute the process in a
> > > terminal. This is a 32bit machine that I am working on and the first
> try
> > > did not show that anything was done after 10 to 12 hours. I started in
> > the
> > > early evening an let it run over night.
> > >
> > > Any ideas and information would be appreciated.
> > >
> > > Thanks
> > >
> > > Tom Williamson
> > > _______________________________________________
> > > OLUG mailing list
> > > OLUG at olug.org
> > > https://lists.olug.org/mailman/listinfo/olug
> > >
> > _______________________________________________
> > OLUG mailing list
> > OLUG at olug.org
> > https://lists.olug.org/mailman/listinfo/olug
> >
> _______________________________________________
> OLUG mailing list
> OLUG at olug.org
> https://lists.olug.org/mailman/listinfo/olug
>



-- 
***************** ************* *********** ******* ***** *** **
"If a problem has no solution, it may not be a problem,
  but a fact - not to be solved, but to be coped with
  over time." - Shimon Peres

"Quis custodiet ipsos custodes?"
    (Who can watch the watchmen?)
    -- from the Satires of Juvenal

"I do not fear computers, I fear the lack of them."
    -- Isaac Asimov (Author)
** *** ***** ******* *********** ************* *****************


More information about the OLUG mailing list