Re: how to make an identical copy of the raw device from one hdisk to another ?

From: John Jolet (john.jolet@FXFN.COM)
Date: Thu Jan 08 2004 - 10:20:33 EST


We use dd here, but we change the blocksize for performance. I was under
the impression that mklvcopy just mirrored, not copied the data.
On Thu, 2004-01-08 at 06:52, Paul. Vanchope wrote:
> i have an Oracle 8.1.7 database, which was not built on the filesystem but
> on the raw device ( that is /dev/rlvXXXX).
> And five pvs have been allocated to the database for its tablespace and
> many lvs have been created on these pvs. Now i want to make an identical
> copy of some of the lvs on hdisk3 to another hdisk, such as hdisk5, suppose
> that hdisk3 and hdisk5 are on the same vg.
>
> #lspv -l hdisk3
> lv01029 64 64 64..00..00..00..00 N/A
> lv01030 64 64 64..00..00..00..00 N/A
> lv01031 64 64 64..00..00..00..00 N/A
> lv01032 64 64 64..00..00..00..00 N/A
> lv01033 64 64 64..00..00..00..00 N/A
> lv01034 64 64 64..00..00..00..00 N/A
> lv01035 64 64 64..00..00..00..00 N/A
> lv01036 64 64 64..00..00..00..00 N/A
> lv01037 64 64 64..00..00..00..00 N/A
>
> the lvs i want to copy to hdisk5 are lv01029 lv01031 lv01034.
> i have already created three lvs which have the same size as the original
> lvs,of course the lv names are different.
> #lspv -l hdisk5
> b_lv01029 64 64 64..00..00..00..00 N/A
> b_lv01031 64 64 64..00..00..00..00 N/A
> b_lv01034 64 64 64..00..00..00..00 N/A
>
> Now i find three ways to make an identical copy of these lvs:
> 1. dd if=/dev/rlv01029 of=/dev/rb_lv01029
> 2. dd if=/dev/lv01029 of=/dev/b_lv01029
> 3. suppose i did not create the 3 lvs on hdisk5 , and i use mklvopy
> instead:
> mklvcopy lv01029 2 hdisk5
>
> Do All the three ways work ?
> which way is the best choose ?
> what is the difference between the 1st and 2nd command ?
> Please give me some suggestion , thanks in advance.



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:17:28 EDT