Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 31 Mar 2003 07:46:19 -0600
From:      "Jack L. Stone" <jackstone@sage-one.net>
To:        taxman <taxman@acd.net>, Grant Peel <grant@thenetnow.com>, <freebsd-questions@freebsd.org>
Subject:   Re: dd
Message-ID:  <3.0.5.32.20030331074619.01414bf8@sage-one.net>
In-Reply-To: <200303302200.47877.taxman@acd.net>
References:  <00fb01c2f720$82e2c8f0$6401a8c0@grant> <00fb01c2f720$82e2c8f0$6401a8c0@grant>

next in thread | previous in thread | raw e-mail | index | archive | help
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@sage-one.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.5.32.20030331074619.01414bf8>