Re: Questions about the dd command
- From: Marius Gedminas <marius@xxxxxx>
- Date: Fri, 29 Feb 2008 18:39:43 +0200
On Fri, Feb 29, 2008 at 11:09:09AM -0500, elmo wrote:
I've spent literally hours trying to find direct answers on the dozens
of websites that discuss 'dd'
but the couldn't find what I wanted.
A few questions about the ' dd ' command:
For example: sudo dd if=/dev/sda2 of=/dev/sdb2 bs=1440
1. Which is preferrable; execute the command from an installed
ubuntu (/dev/sda2) or from a ubuntu CD?
CD. If you run it while the system is running, it may change the
contents of /dev/sda2 in the middle of the operation, and you'll end up
with an inconsistent copy.
2. How do you modify the example to show the data as it is being
copied?
Would this have a drastic effect on how long it takes to complete
the copy
compared to just watching a blinking cursor?
You can't, easily. Run killall -USR1 from a different terminal to see
the current progress whenever you get bored. Or estimate the time to
copy by dividing the partition size by the transfer speed
Run vmstat 1 and observe the bi/bo columns to see the current read/write
speed in kilobytes per second.
3. What effect on the does the ' bs = ' number have on
the time to complete the copy or the accuracy of the copy? Is
there a
default number if the the bs= is omitted from the command?
The default number is 512 bytes. Using a 1KB block size can be twice as
fast. When I played with it (running dd with various block sizes and
watching the I/O speed with vmstat), I didn't see any further speedups
with larger block sizes.
Block size has no effect on the accuracy. dd will copy the partial block
at the end of the partition correctly, even if the block size doesn't
divide the size of the partition.
HTH,
Marius Gedminas
--
You have moved the mouse. NT must be restarted for the changes to take effect.
Attachment:
signature.asc
Description: Digital signature
ubuntu-users mailing list
ubuntu-users@xxxxxxxxxxxxxxxx
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
- References:
- Questions about the dd command
- From: elmo
- Questions about the dd command
- Prev by Date: Re: BALSIC ,a basic program utility
- Next by Date: Re: Questions about the dd command
- Previous by thread: Questions about the dd command
- Next by thread: Re: Questions about the dd command
- Index(es):
Relevant Pages
|