1846608 Members
1835 Online
110256 Solutions
New Discussion

the dd command...

 
SOLVED
Go to solution
Paul Torp
Regular Advisor

the dd command...

Hi I've got a small issue here..

I've got one volumegroup containing different logical volumes with differnt amount of stripes in striping.. (yak) Some lv's are striped over 7 disks, some 8 and some 12.

These rlv's are raw-devices for oracle 9.1.0.2.
Now i have to move these from EMC-enterprice to midrange disks.

I've gotten the same amount of midrange disks (in MB) and i've gotten 8 metavolumes.

I have created new lv's with nearly the same space (a bit more on some, because i have striped them over these 8 metavolums -i 8 in lvcreate.

What i'm about to do is :
1. Stop the database.
2. Run dd from /dev/vg_oracle/rlv_data01 (excisting) to /dev/vg_oracle/rlvX_data01 and so on.
3. Make a change in the controlefile (or whatever. i get help to this) so it points to the new devices.
4. Then do the same thing on the controlfile

Then there is this issue...: Will the lv be corrupt when i dd a 7168MB large rlv (striped over 7 disks) to a rlv that is 8192MB? (striped over 8 disks)

I have tried with the same size.. from 8192 to 8192 and it works, but i'm not sure about the explained case.
-Paul
"sendmail is kind of fun..."
4 REPLIES 4
Ravi_8
Honored Contributor

Re: the dd command...

Hi Paul

It should work, I have done this on which DB2 was running and was working well after making dd to new disks

the command I used was
#dd if=/dev/vgxx/lvolxx of=/dev/vgyy/lvolyy bs=1024k
never give up
A. Clay Stephenson
Acclaimed Contributor

Re: the dd command...

The database doesn't know or care about the LVOL striping; as long as the destination LVOL is at least as large as the source there will be no problems although you will be wasting space. UNIX has no "header" blocks so there is no need to offset the dd at all unlike under some OS'es. Your command will work.

Actually, my favorite way to do this stuff to avoid ANY Oracle changes is to add a small layer of indirection via symbolic links. Rather than using "/dev/vg05/rlvol1" as the Oracle data file, I instead use "/raw/datafile01" and then create a symbolic link between them. You can then do your dd's and change the symbolic links (with the database, of course, being down) and you are back in business. It provides a little documentation to the raw volumes as well --- and no, there are no performance impacts from this indirection.
If it ain't broke, I can fix that.
Sanjay_6
Honored Contributor
Solution

Re: the dd command...

Hi Paul,

As long as you do a dd from a smaller volume to a larger volume, you should be okay. The dd command or the app /db using the lv does not care if the stripe if 7-way or 8-way. What it cares is that the data is accessible.

We have done this kind of dd a lot over the past and as long as the input lv is smaller than the output lv in size, you are okay.

If the input lv is bigger than the output lv, you'll get an error.

Hope this helps.

Regds
Paul Torp
Regular Advisor

Re: the dd command...

tnx..
"sendmail is kind of fun..."