1830241 Members
5039 Online
109999 Solutions
New Discussion

Using dd

 
Paul Procter
Frequent Advisor

Using dd

Hi,

I've read some of the forum topics regarding this subject but would appreciate some guidance on the subject.

I am investigating copying Oracle .dbf files from one filesystem to another using 'dd' for example:

dd if=/fs1/file1.dbf of=/fs2/file1.dbf &
dd if=/fs1/file2.dbf of=/fs2/file2.dbf &
dd if=/fs1/file3.dbf of=/fs2/file3.dbf &

I have not included the 'bs=' option as I am currently testing different variations from 128k - 4096k (The trade-off being the system time)

The reason for this approach is:
a) The files are greater than 2GB in size
b) It appears to be relatively fast.

The Database is offline and as such the files are static.

What I am asking is:
A) Is this, probably, the best method?
B) Can anyone highlight any potential issues with this approach?

Thanks in anticipation.
Paul
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Using dd

Shalom,

a) Probably not the best method. An OS copy will work very well with the database offline.

b) Database corruption, high i/o, though the method should pass rigorous testing.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
James R. Ferguson
Acclaimed Contributor

Re: Using dd

Hi Paul:

I think some simple timeings with and without 'bs' will convince you that blocking reduces the overall copy time.

The file size has nothing to do with using or not using 'bs'. Using 'bs' means that no incore buffer-to-buffer copy occurs which speeds things up even more.

Regards!

...JRF...
Mel Burslan
Honored Contributor

Re: Using dd

Paul,

You did not ask this in your question I know, but my suggestion is to use vxdump|vxrestore commands to copy huge chinks of data from one place to another on the same system. In our SAN migration, we have found this to be the fastest way to replicate data from a filesystem on the old storage array to another filesystem on the new array.

Hope this helps.
________________________________
UNIX because I majored in cryptology...
Paul Procter
Frequent Advisor

Re: Using dd

Guys,

Many thanks for the information thus far:

I'll investigate the database corruption, if the files are static though I'm hoping that won't be an issue.

Best 'bs=' size at the moment is looking like 512k. When timed this gives the best throughput against the amount of system time utilised.

Tried vxdump|vxrestore but this doesn't appear to work at file level (unless I'm missing something) however the information was useful for filesystems so thanks for that.

Paul
Paul Procter
Frequent Advisor

Re: Using dd

----- Thread Closed -----