ivoras at freebsd.org
Wed Mar 18 03:30:32 PDT 2009
Andrea Venturoli wrote:
> I'm using dd to clone an 8GB USB memory into an identical one.
> # dd if=/dev/da2 of=/dev/da1
> load: 0.01 cmd: dd 12026 [physwr] 0.00u 0.01s 0% 904k
> 396+0 records in
> 395+0 records out
> 202240 bytes transferred in 1.453741 secs (139117 bytes/sec)
> 15925248+0 records in
> 15925248+0 records out
> 8153726976 bytes transferred in 31722.194052 secs (257035 bytes/sec)
By using this command line not only are you getting slow results, you
are also probably significantly reducing the lifetime of you flash
memory drive (depending on its technology). What you said in the above
command line is that the copy is to be done one 512-byte block at a time
- i.e. read 512 bytes, write 512 bytes, repeat. As common flash memories
have large flash blocks (32 kB - 128 kB), you're actually rewriting the
whole "large" flash block by writing small blocks of data. For example,
to fill a 32 kB block by writing 512 bytes at a time, the whole block
will be rewritten 64 times.
Use a "bs=1m" argument next time.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20090318/f70eb15b/signature.pgp
More information about the freebsd-questions