Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: copy a datafile to a raw device

RE: copy a datafile to a raw device

From: Adams, Matthew (GECP, MABG, 088130) <MATT.ADAMS_at_appl.ge.com>
Date: Thu, 19 Jun 2003 13:08:52 -0700
Message-ID: <F001.005B57C3.20030619125451@fatcity.com>

It's been a number of years since I did anything with raw devices, so this is all ancient and possibly out of date/incorrect.

I believe Stephen to be wrong.  The bits and bytes written on the data file are identical, regardless of whether the device is raw or cooked.  However, back in the day I worked with these, the file could not use the first block of the raw device, as that was reserved for operating system usage (and back then on those devices, this was 8K).  So, we had to do something like

dd if=system of=/dev/raw obs=8192 seek=1

to force the dd to skip the first 8K. 

Since you have already overwritten the first block of the raw device, you might have to drop it and re-create it.

Also, since the first 8K was reserved for the OS, the size of the raw device must be at LEAST the size of the datafile + 8K.

Matt



Matt Adams - GE Appliances - [EMAIL PROTECTED] Another month has ended.
All Targets Met. All Systems Working.
All Customers Satisfied. All Staff Enthusiastic. All Pigs Fed And Ready To Fly.

-----Original Message-----
From: Stephen Lee [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 19, 2003 4:27 PM
To: Multiple recipients of list ORACLE-L Subject: RE: copy a datafile to a raw device

Well heck.  Nobody else has replied, so I might take a stab at it here.  I suspect that the format of the data (bits and bytes) required on a raw device is different than the format of the data in a file in a file system. I'm stretching a bit here, but I think an analogy would be what would happen if you dd a file from UFS to NTFS.  The data on the NTFS might be a digital copy of what was on UFS, but it's format is totally useless in the context of NTFS.

> -----Original Message-----
> From: Gurelei [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, June 19, 2003 1:55 PM
> To: Multiple recipients of list ORACLE-L
> Subject: copy a datafile to a raw device
>
>
> hi all:
>
> I need to move a SYSTEM datafile from a filesystem
> to a raw device. I have shutdown the database,
> copied the file via
>
> dd if=system of=/dev/raw
>
> renamed the file in the database, but couldn't open
> the database because of the error: Unknown File Header
> Version read for file number 1.
>
> I tried another dd:
>
> dd if=system of=/dev/raw obs=32768 (32K is the db
> block size), but I got the same error. Can anyone
> see what else could be wrong with my dd command
>
> thanks
>
> Gene
>
> __________________________________
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Gurelei

>   INET: [EMAIL PROTECTED]

>
> Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
> San Diego, California        -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).
>
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephen Lee
  INET: [EMAIL PROTECTED]


Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Jun 19 2003 - 15:08:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US