Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
cancel
Showing results for 
Search instead for 
Did you mean: 

dd-rawfiles

SOLVED
Go to solution
Roger Baptiste
Honored Contributor

dd-rawfiles

hi,

I need to copy/move around 300Gb of oracle datafiles (150 raw datafiles approx) from one Symm frame to another symm frame. I have the choice of either doing a backup/restore of the files from the old to new symm or doing a dd of the files.
Any idea on which one would be faster?
Also, if i use dd can i use a bs larger than 8k ? (since oracle block size is 8k).

thanks
Take it easy.
5 REPLIES
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: dd-rawfiles

Dd will probably be faster. I would script this up and have several dd's going at once. You can certainly increase the blocksize above 8k - blocking is not critical in disk/disk transfers though it is in tape transfers. I would bump it up to at least 64k and perhaps 256k. Make sure that you ONLY use bs=64k rather than ibs=64k obs=64k to avoid double buffering within dd. At EOF, if dd is only able to read a partial block, it will write a partial block - just what you want. In your script, I would definitely check the exit status of the dd command and log stdout and stderr.
If it ain't broke, I can fix that.
hpuxrox
Respected Contributor

Re: dd-rawfiles

Why not just use LVM mirroring. Connect the box to both frames and, add both drives and drives to the volume group and mirror away. Another alternative is pvmoves but this is much more risky.

peace.....
Roger Baptiste
Honored Contributor

Re: dd-rawfiles


Thanks clay. Another question, can the target raw lv size be slightly *larger* than the source raw lv or should the source and target be exact size for the dd to work correctly?
I ask this query, because i saw a few earlier posts on this subject mentioning that the sizes should be exact, which doesn't make sense. I have rounded the target lvs to 2048, whereas there are source lvs with sizes of 2000,2047 and so on.

Yates - Mirroring is not an option , for some other reasons in this case.

thanks
Take it easy.
MANOJ SRIVASTAVA
Honored Contributor

Re: dd-rawfiles

Hi Rajman


If you ahve two symmtrix frames are they connected may be you can use SRDF , or in case you have two hosts connected across the frames then you can use BCV's to copy and restore across the frames.


Manoj Srivastava
A. Clay Stephenson
Acclaimed Contributor

Re: dd-rawfiles

As long as the destination raw lvols are at least as large, you are ok. The tricky part about using raw devices in a database environment is that you must preserve the pathnames. This is fairly easy if using LVM but can be a real problem if using physical disks. A better approach is to add a level of indirection like this: I would create the datafiles as something like /u01/oradata/data01.dbf and then create a symbolic link from /dev/vg03/rlvol3 to /u01/oradata/data01.dbf. The advantage of this approach is that it becomes very easy to move data and not touch Oracle. Simply redefine the symbolic links and you are done.
If it ain't broke, I can fix that.