Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Feb 2006 16:05:48 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Kevin Kinsey <kdk@daleco.biz>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Using dd to Make a Clone of a Drive
Message-ID:  <20060214140548.GA9915@flame.pc>
In-Reply-To: <43F1DF7A.7000504@daleco.biz>
References:  <200602092036.k19KaIhn086956@dc.cis.okstate.edu> <20060209220123.GA4751@flame.pc> <43EBE2F8.8000501@daleco.biz> <43F1DF7A.7000504@daleco.biz>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2006-02-14 07:47, Kevin Kinsey <kdk@daleco.biz> wrote:
>Kevin Kinsey wrote:
>>Giorgos Keramidas wrote:
>>> Bah!  That's too slow for my taste.  I would usually go for a newfs,
>>> dump, and restore option.  For instance, to create a copy of /usr on a
>>> second disk:
>>>
>>>    newfs -U /dev/ad1s1a
>>>    mount /dev/ad1s1a /mnt
>>>    dump -0 -a -L /usr | ( cd /mnt ; restore ruvf - )
>>>
>>> Copying with dd(1) is not as fast :)
>>
>> Sorry to butt in --- but I'm needing to start cloning too.  Looks
>> like a winner to me ... wouldn't this have the added advantage
>> of making "same size and geometry" (cf. Erik Trulsson, 4 hours ago,
>> this thread) less relevant?
>>
>> As long as the "new" slice had enough space, geometry shouldn't
>> matter to dump|restore ....  <?>
>
> Just for the archives:
>
> Giorgios' solution is very nice, but needs the "-f" option and another
> "-" to work properly AFAICT, both from experience and from reading
> dump(8):
>
>          dump -0 -a -L -f - /usr | (cd /mnt ; restore ruvf - )
>
> If you don't include "-f" (for "file") and "-" (for "stdout"), then your
> command will fail with:
>
>          DUMP: Cannot open output "/dev/sa0"

Oops!  Yes, good catch :)




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