copying data to raw devices using 'dd'

Login or Register to Reply

Thread Tools Search this Thread
# 1  
copying data to raw devices using 'dd'

Hello all,

I'm new here, so this information may exist elsewhere on this forum. If so, please point me in the right direction.

Here's the problem.

I'm trying to migrate Oracle data from an HP system to a Sun system using a raw device as a 'bridge' between the two systems. Both machines can see the disk and I've gone as far as to perform a 'pvcreate' on the HP side and a 'label' on the Sun side. The copy works using the following syntax:

dd if=<file on HP side> of=<HP link to raw device that can be seen by both systems> oseek=10 bs=1024 conv=sync count=400000

The problem is that the file being copied is roughly 370000 blocks in size so there's a 'buffer' of 30000 blocks attached to the end of the copied file. I've instructed my DBA to specify a count size similar in size to the file, but they have multiple files to copy and they're looking for a 'wildcard' so to speak that they can use for the count size so they can script the copy process.

Any ideas from anyone on how to proceed? Maybe even a different syntax? My DBA is limiting the options available by not wanting to use tar or a tape backup/restore. Hopefully I'm making sense here.

# 2  
The two os's are incompatible enough to make using the disk not a very easy route. Just copy the data across the network. Networks have standards, raw disk devices do not.
# 4  
If you can NFS mount the destination system the following should work very well for you.
example% cd fromdir; tar cf - . | (cd todir; tar xfBp -)

Change the fromdir and todir to fit. You may also have to play around with the xfBp args to tar depending on the system. As is, This will tar the entire directory preserving file dates, times, ownership and permissions, and put the files in the todir arg.

# 5  
Is there some reason you cannot use Oracle export/import? That is what it is meant for.

You are running a big risk -- complete data corruption -- attempting what you're doing.
Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Raw Devices
Can you please modify my script. This script is not working for i in /dev/sdf do /bin/raw /dev/raw/`/bin/basename ${i}` ${i} /bin/sleep 2 /bin/chown orasm:ordba /dev/raw/`/bin/basename ${i}` /bin/chmod 660...... Red Hat
Red Hat
Raw devices in C
Hi guys. what is the benefits of using raw devices in programming? which applications mostly use raw devices? how can i use raw devices in C programs? is there any system calls or library functions?... Programming
Error on HACMP5.3 volume group on raw devices after exporting vg
Hi all, We have a problem after exporting a exhanced concurrent capable VG accessed in concurrent mode, created on raw devices ( pSeries 590 AIX5.3 + HACMP5.3 +SAN4300) from node A to node B. On node B the VG is correct activated by HACMP, but on node A we have 0516-306 error "Unable to find...... AIX
How to change Raw data to Coloumn data fields
Dear All, I have some data file.see below. --------------ALARM CLEARING FROM SubNetwork=ONRM_RootMo,SubNetwork=AXE,ManagedElement=CGSN-------------- Alarm Record ID: 25196304 Event Time: 2006-08-28 13:41:35 Event Type: ...... Shell Programming and Scripting
Shell Programming and Scripting
copying oracle tables from raw disk
I have been tasked with archiving Oracle tables. The data is on raw devices, and possibly will span multiple logical volumes. Has anyone ever had to do this? How did you accomplish it? Any references to accomplish this would be greatly appreciated. Thanks,... UNIX for Advanced & Expert Users
UNIX for Advanced & Expert Users