Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #187253

Re: dd to clone a drive

From "Thomas Schmitt" <scdbackup@gmx.net>
Newsgroups linux.debian.user
Subject Re: dd to clone a drive
Date 2017-09-26 16:40 +0200
Message-ID <utZbH-5XL-3@gated-at.bofh.it> (permalink)
References <utYz1-5vR-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi,

> Is it 'usual' to have dd take upwards of 2 days to copy a drive ?

Not really. An old 500 GiB SATA disk may deliver about 50 MiB/s.
That's 10000 seconds, a bit less than 3 hours.
(If you copy from filesystem to filesystem it may last much longer
 due to the lookup times in the trees.)

The first suspect for slow dd is small block size.
So you should in any case ask dd for larger chunks as already proposed
by Michael Stone. For copying Debian ISOs to USB sticks the FAQ proposes
4 MiB. But i think 1 MiB is surely enough:

  dd if=/dev/sda of=/dev/sdc bs=1M

Next you should get some progress indicating pacifier.
I see that Roberto C. Sánchez already showed the USR1 method to make dd
print progress.
Here is another way:

  dd if=/dev/sda bs=1M | pv | dd of=/dev/sdc bs=1M

(With if=/dev/zero and of=/dev/null i get 5 GiB/s here. So the pipes
 are not a problem in respect to throughput.)


Have a nice day :)

Thomas

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

dd to clone a drive Jack Dangler <tdldev@gmail.com> - 2017-09-26 16:00 +0200
  Re: dd to clone a drive Roberto C. Sánchez <roberto@debian.org> - 2017-09-26 16:20 +0200
  Re: dd to clone a drive Michael Stone <mstone@debian.org> - 2017-09-26 16:20 +0200
  Re: dd to clone a drive "Thomas Schmitt" <scdbackup@gmx.net> - 2017-09-26 16:40 +0200
    Re: dd to clone a drive Michael Stone <mstone@debian.org> - 2017-09-26 17:30 +0200
  Re: dd to clone a drive Pascal Hambourg <pascal@plouf.fr.eu.org> - 2017-09-26 16:50 +0200
  Re: dd to clone a drive Gene Heskett <gheskett@shentel.net> - 2017-09-26 17:40 +0200
    Re: dd to clone a drive Jack Dangler <tdldev@gmail.com> - 2017-09-29 13:40 +0200

csiph-web