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: Best method to move Filesystems to RAW Devices.

Re: Best method to move Filesystems to RAW Devices.

From: Tim Gorman <Tim_at_SageLogix.com>
Date: Fri, 20 Sep 2002 19:13:20 -0800
Message-ID: <F001.004D5BBC.20020920191320@fatcity.com>


Nat,

SQL-generating-UNIX commands works well...

    select 'dd bs=1024k if='||name||' of=/dev/rXXXXX' from v$datafile     union all
    select 'dd bs=1024k if='||member||' of=/dev/rXXXXX' from v$logfile     union all
    select 'dd bs=1024k if='||name||' of=/dev/rXXXXX' from v$controlfile;

Spool this to one or more shell scripts and fill in the "XXXXX" with the appropriate logical-volume device name for each datafile. If you've created multiple shell scripts, then you can achieve some degree of parallelism for the copies...

You didn't mention the specific variant of UNIX, but each has different-sized "logical volume control blocks" (LVCB) which you may have to consciously avoid overwriting or not. On AIX for example, the LVCB is commonly 4Kb and you have to use the "skip=" parameter to skip past it while writing. It also means that you have to set the blocksize parameter for "dd" (i.e. "bs=") to the LVCB blocksize to begin writing in the right place. Check with your system administrator.

Once the files have been copied, then you can use SQL-generating-SQL to rename the files within your database's control file. For example:

    select 'alter database rename file '''||name||''' to ''/dev/rXXXXX'';' from v$datafile

    union all
    select 'alter database rename file '''||member||''' to ''/dev/rXXXXX'';' from v$logfile

    union all
    select 'alter database rename file '''||name||''' to ''/dev/rXXXXX'';' from v$controlfile;

Spool this out to a SQL*Plus script and run it...

Hope this helps...

Thanks!

-Tim

> We are planning to move to raw devices for all our existing file systems.
> Our database size is around 400 Gig. What is the recommended method that
you
> guys feel is best as far as time
> required to convert and ease of conversion.
>
> We feel we cannot use export - import as this may take more time for
> conversion..
> I checked many documents to find out the best method, there are few
> suggestions to use RMAN to convert to raw.
> seems it is fastest. At this point we have not configured RMAN on our
> databases so this suggestion seems to be of no use for us.
>
> Please let me know, if any of you went through this exercise and any
> suggestions and tips will be more beneficial,
>
> Thanks in advance,
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Nat
> INET: Nat2710_at_hotmail.com
>
> 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: ListGuru_at_fatcity.com (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.com
-- 
Author: Tim Gorman
  INET: Tim_at_SageLogix.com

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: ListGuru_at_fatcity.com (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 Fri Sep 20 2002 - 22:13:20 CDT

Original text of this message

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