Replacing a failing HD

Bob Ababurko ababurko at adelphia.net
Thu Oct 6 21:50:40 PDT 2005


Craig Deal wrote:
>  
> 
>>-----Original Message-----
>>From: owner-freebsd-questions at freebsd.org 
>>[mailto:owner-freebsd-questions at freebsd.org] On Behalf Of Bob Ababurko
>>Sent: Wednesday, October 05, 2005 7:53 AM
>>To: Charlie Schluting; freebsd-questions at freebsd.org
>>Subject: Re: Replacing a failing HD
>>
>>Yes, I guess I should mention that the drives were on the 
>>same machine, actually the same bus and/or channel.  I have 
>>also done this on Solaris. 
>>  I believe it was Solaris 8, but it works just the same.  I 
>>am not sure if it would work over a network.  Just make sure 
>>you dd the disk as a whole as in /dev/daX and not by the slice.
>>
>>-Bob
>>
>>
>>Charlie Schluting wrote:
>>
>>>>I have used dd to image a drive many times before in freebsd.  It 
>>>>works like a champion and will boot up just fine.  I may have 
>>>>misunderstood your mail but if not then it will work.
>>>>
>>>
>>>
>>>Well, maybe my weird "over ssh calling a setuid program 
>>
>>that calls a 
>>
>>>script" dd was flawed somehow. I'll do it again with both drives in 
>>>the same machine.
>>>
>>>Thanks for the response!
> 
> 
> 
> Hope it's ok to continue this thread, but can you explain in more detail how
> to use dd to copy a HD. I read "man dd" and was unable to figure out how
> this is done.
> 
> Thanks,
> Craig
> 
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
> 
This is what I have done in the past.

dd if=/dev/da0 of=/dev/da1 bs=8192b

where da0 is the disk you want to copy and da1 is the new, blank disk. 
I should also mention that it is wise to do this in single user mode.  I 
actually have read this somewhere and understand the point of it, but I 
must also say that I have done it both ways and they have both worked. 
YMMV  I would have to say it is all dependant and what you have running.

I have done this too many times to count and it is very easy.

peace,
Bob


More information about the freebsd-questions mailing list