Moving to a new disk..

Ronald Paul ronald at rcpaul.nl
Tue Dec 5 08:11:23 PST 2006


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.

-- 
Kind regards,
Ronald Paul


More information about the freebsd-questions mailing list