Moving to a new disk..

Eric heli at mikestammer.com
Tue Dec 5 08:25:33 PST 2006


Ronald Paul wrote:
> B. Cook wrote:
>
>> I've got a dying drive on my hands.. and I know I found a doc/guide 
>> on the handbook before regarding this..
>>
>> something like..
>>
>> # tar cf - --one-file-system -C /var . | tar xpvf - -C /mnt/var
>
> [..]
>
>> what would be the best way?
>
> I do it this way:
>
>     dd if=/dev/ad0 of=/dev/ad2 bs=8m
>
> Where /dev/ad0 is the source disk and /dev/ad2 is the destination 
> disk. Make sure nothing is mounted. This process takes place at sector 
> level, so the boot sector, the partition table and even empty sectors 
> are copied. That someone might want to resize some partitions 
> afterwards to be able to use that extra 10 GB.
>
this is one reason why dump is better. it only dumps what there is to 
dump. no need to worry about the extra space, etc after the fact




More information about the freebsd-questions mailing list