RE: ASM is single point of failure ?

  • From: "Luca Canali" <Luca.Canali@xxxxxxx>
  • To: <tanel.poder.003@xxxxxxx>
  • Date: Tue, 9 May 2006 20:05:38 +0200

Hi Tanel,

Very nice script there. I had to add a couple of modifications to run it on my 
environment (see below). By the way, I think I figured out all the fields in 
X$KFFXP except for these two: FLAGS_KFFXP, CHK_KFFXP. Do you maybe know what 
they are?

Cheers,
L.

-- simple asm dump utility
-- use full database file name (with +datagroup name) as only parameter
-- nb! doesnt work properly on multidisk diskgroups with fine grained striping
-- single disk disk groups with fine grained striping or multidisk groups
-- with coarse grained striping are ok
--
-- tanel poder - nov 2005 [ http://www.tanelpoder.com ]
-- L.C.- May 2006, modified and tested on Linux + 10gR2 + asmlib + ASM mirroring

set lines 300 trim on verify off pages 50000

select
    'dd if='|| replace(path,'ORCL:','/dev/oracleasm/disks/')||' bs=1048576 
skip='||AU_KFFXP||' count=1 '||
    '>> /tmp/'||substr('&1',instr('&1','/',-1)+1)||'.dmp'  cmd
from
    X$KFFXP X, V$ASM_DISK_STAT D, V$ASM_ALIAS A
where
    lower(A.NAME) = lower(substr('&1',instr('&1','/',-1)+1))
    and X.NUMBER_KFFXP = A.FILE_NUMBER
    and X.GROUP_KFFXP  = A.GROUP_NUMBER
    and X.INCARN_KFFXP = A.FILE_INCARNATION
    and X.DISK_KFFXP = D.DISK_NUMBER
    and X.GROUP_KFFXP = D.GROUP_NUMBER
    and LXN_KFFXP = 0
order by
    X.XNUM_KFFXP; 

-----Original Message-----
From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On 
Behalf Of Tanel Põder
Sent: Tuesday, May 09, 2006 4:09 PM
To: gogala@xxxxxxxxxxxxx; kevinc@xxxxxxxxxxxxx
Cc: oracle-l@xxxxxxxxxxxxx
Subject: Re: ASM is single point of failure ?

> My biggest problem with it is the fact that I cannot backup my data by 
> anything else but RMAN. With all due respect, I don't trust Oracle 
> that much. I want to see files and the space allocation. Black box 
> approach doesn't work very well for me. As a pessimist, I know that a 
> coffin is also a black box.

Yeah, that was the first thing that came into my mind when Oracle started 
marketing ASM.

I've recommended my customers to keep their redologs and archivelogs outside 
ASM if their data is precious to them. Btw, It's the redo stream which we have 
to protect the most, not the datafiles alone. As long as you've got full redo 
stream available, it doesn't matter how many weeks old backup you take to get 
your data back.

Anyway, for the customers stuck on ASM with Standard Ed RAC, I once wrote an 
experimental utility which can dump out their online redologs from physical ASM 
files. You just have to extract the redolog (or any datafile) allocation unit 
locations when ASM instance is running - you can do the dump without any 
instance available later on as long as you haven't changed the file locations 
or sizes.

The script itself is very simple, thanks to cached ASM allocation unit info 
availability from X$KFFXP and that the script doesn't account for all ASM 
nuisances as rebalancing, mirroring, possible non-default allocation unit and 
stripe sizes etc..

select
    'dd if='|| d.path||' bs=1048576 skip='||AU_KFFXP||' count=1 '||
    '>> /tmp/'||substr('&1',instr('&1','/',-1)+1)||'.dmp'  cmd from
    X$KFFXP X, V$ASM_DISK D, V$ASM_ALIAS A where
    lower(A.NAME) = lower(substr('&1',instr('&1','/',-1)+1))
    and X.NUMBER_KFFXP = A.FILE_NUMBER
    and X.GROUP_KFFXP  = A.GROUP_NUMBER
    and X.INCARN_KFFXP = A.FILE_INCARNATION
    and X.DISK_KFFXP = D.DISK_NUMBER
    and X.GROUP_KFFXP = D.GROUP_NUMBER
order by
    X.XNUM_KFFXP;

http://www.integrid.info/asmdump.sql
http://www.integrid.info/asmdumpf.sql

Highly experimental of course, don't rely your recovery strategy on it ;)

Tanel.
[new website coming soon ;] 


--
//www.freelists.org/webpage/oracle-l


--
//www.freelists.org/webpage/oracle-l


Other related posts: