dd
Jack L. Stone
jackstone at sage-one.net
Mon Mar 31 05:46:34 PST 2003
At 10:00 PM 3.30.2003 -0500, taxman wrote:
>On Sunday 30 March 2003 07:57 pm, Grant Peel wrote:
>> Hi all,
>>
>> I am about to make the trip to shutdown one of our servers and 'dd' the
>> first SCSI drive to the second.
>>
>> from what I have read, and what some of you have kindly offered, I just
>> kick into single user mode, with only root mounted on the primary drive,
>
>ro, I assume
>
>> and away we go...
>>
>> dd if=/dev/da0 of=/dev/da1 bs=1m
>
>That'll copy the data, but you'll want to prep the disk. I've seen
>recommendations something along the lines of: read data off the whole new
>disk first dd if=/dev/da1 of=/dev/null then write the data you want on it,
>then read it off to /dev/null again.
>Something to the effect of populating the drives on disk bad sector
records.
>There may be more burn in recommended, but I couldn't find anything in the
>archives.
>
>> One last question, the second drive is identical to the first, but should
>> it be right out odf the box condition, formatted, fdisk'ed partiitioned or
>> does any of that matter since it will be copies bit for bit?
>
>None of that matters for the reason you noted.
>
>> TIA!
You'll just need to FDisk and label the new HD so the system knows its
there. Then, your command for 'dd' is fine, except perhaps the choice of
the bs=1m which can influence the time it takes to do the dd considerably.
In my experimenting (but only with IDE), I found low settings (like
bs=8192) to take 4 times as long as bs=102400. When I exceeded the 102400,
the time increased again. If this is a 1-shot thing, this may not be
important to you, but I believe it has to do with I/O ability & you can
check it first. Here is my I/O test check for an IDE:
#iostat ad0 1
tty ad0 cpu
tin tout KB/t tps MB/s us ni sy in id
0 3 5.19 7 0.03 11 0 4 1 84
0 126 127.36 183 22.74 0 0 6 2 92
0 44 128.00 190 23.76 0 0 2 0 98
0 44 128.00 191 23.89 0 0 5 0 95
0 44 128.00 191 23.88 0 0 7 1 92
Best regards,
Jack L. Stone,
Administrator
SageOne Net
http://www.sage-one.net
jackstone at sage-one.net
More information about the freebsd-questions
mailing list