copying data to raw devices using 'dd'


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users copying data to raw devices using 'dd'
# 1  
Old 03-22-2006
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.

Thanks.
# 2  
Old 03-22-2006
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.
# 3  
Old 03-23-2006
"dd" will not work with cross file-systems. You must use NFS or tar/gzip/ftp to accomplish task
# 4  
Old 03-23-2006
If you can NFS mount the destination system the following should work very well for you.
Code:
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.

MPH
# 5  
Old 03-23-2006
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 Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Red Hat

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... (9 Replies)
Discussion started by: karthik9358
9 Replies

2. UNIX for Dummies Questions & Answers

How to make a CSV file from a Raw data

Hi Please help me on this.i have the Following data i want to make it CSV file by a Unix Shell Script. •msgType : 234 ( m_code : 0 # m_name : type # m_data : LOG ) pls help me on this (4 Replies)
Discussion started by: Aditya.Gurgaon
4 Replies

3. Programming

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? (1 Reply)
Discussion started by: majid.merkava
1 Replies

4. Shell Programming and Scripting

Put raw data to column data

Dear all, I want below data to make it in column format.so i will see the data like this cdrID teleServiceCode chargedPartyNumber ... ... ... ... "egmailcom0w10ggzx00" 'sMS (5)' "716323770" "m17ifi5z30w0z6o7200" 'sMS (5)' ... (7 Replies)
Discussion started by: Nayanajith
7 Replies

5. Shell Programming and Scripting

raw data to column data

I have a data file like this. SDPINPUTCDR.SDPCallDetailRecord.chargeEventCDR { cdrID : "egmailcom0w10ggzx00" teleServiceCode : 'sMS (5)' chargedPartyNumber : "716323770" otherPartyNumber : "een@gmail.com" time : "084127" date : "20070319" duration : "0" extensionInt1 : '4'D }... (3 Replies)
Discussion started by: Nayanajith
3 Replies

6. AIX

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... (3 Replies)
Discussion started by: cris1357
3 Replies

7. Shell Programming and Scripting

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: ... (1 Reply)
Discussion started by: Nayanajith
1 Replies

8. UNIX for Advanced & Expert Users

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, (2 Replies)
Discussion started by: isenhart
2 Replies
Login or Register to Ask a Question