WARNING: This web is not used anymore. Please use PDBService.ASM_Internals instead!
 

ASM Metadata Internals

A collection of experiments and facts on Oracle ASM metadata internals. More on configuration and performance at HAandPerf

ASM metadata from V$ and X$ views

ASM instance V$ views and X$ tables:

View Name X$ Table name Description
V$ASM_DISKGROUP X$KFGRP performs disk discovery and lists diskgroups
V$ASM_DISKGROUP_STAT X$KFGRP_STAT ists diskgroups
V$ASM_DISK X$KFDSK, X$KFKID performs disk discovery, lists disks and their usage metrics
V$ASM_DISK_STAT X$KFDSK_STAT, X$KFKID lists disks and their usage metrics
V$ASM_FILE X$KFFIL lists ASM files, including metadata/asmdisk files
V$ASM_ALIAS X$KFALS lists ASM aliases, files and directories
V$ASM_TEMPLATE X$KFTMTA lists the available templates and their properties
V$ASM_CLIENT X$KFNCL lists DB instances connected to ASM
V$ASM_OPERATION X$KFGMG lists rebalancing operations
N.A. X$KFKLIB available libraries, includes asmlib path
N.A. X$KFDPARTNER lists disk-to-partner relationships
N.A. X$KFFXP extent map table for all ASM files
N.A. X$KFDAT extent list for all ASM disks

This list is obtained querying v$fixed_view_definition where view_name like '%ASM%' which exposes all the v$ and gv$ views with their definition. Additionally querying v$fixed_table where name like 'X$KF%' and name like 'X$KF%' (ASM views start with the KF prefix).

Oracle*NET to ASM


TIP: An example of tnsnames entry to be used to connect to ASM instances via Oracle*NET (you will also need a password file of course). Note the extra keyword (UR=A). More generally UR=A allows to connect to 'blocked services'.
ASM1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = [hostname])(PORT = [portN]))
    (CONNECT_DATA =
      (SERVER = DEDICATED) (SERVICE_NAME = +ASM)  (INSTANCE_NAME = +ASM1)
      (UR=A)
    )  )

Striping and Mirroring with ASM, extents and allocation units

An basic example, using ASM and normal redundancy: the available storage, say 64 HDs over FC SAN, are used to create the main DB diskgroup: DATADG. DATADG is logically divided into 2 evenly sized groups of disks: 32 disks in failgroup N.1 and 32 in failgroup N.2. Oracle datafiles created in DATADG are 'striped' into smaller pieces, extents of 1MB in size. Extents are allocated to the storage in 2 (mirrored) allocation units (AU): one AU in failgroup N.1 the other in failgroup N.2.

Selected X$tables

X$KFFXP

This X$ table contains the mapping between files and used allocation units. It allows to track the position of all the extents of a given file striped and mirrored across storage. Read operations are load-balanced over primary and mirror allocation units (for performance reasons). Write operations need instead to write both AU to disk.

X$KFFXP Column Name Description
ADDR x$ table address/identifier
INDX row unique identifier
INST_ID instance number (RAC)
NUMBER_KFFXP ASM file number. Join with v$asm_file and v$asm_alias
COMPOUND_KFFXP File identifier. Join with compound_index in v$asm_file
INCARN_KFFXP File incarnation id. Join with incarnation in v$asm_file
PXN_KFFXP file AU number
XNUM_KFFXP ASM file extent number (mirrored AU have the same extent value)
GROUP_KFFXP ASM disk group number. Join with v$asm_disk and v$asm_diskgroup
DISK_KFFXP Disk number where the extent is allocated. Join with v$asm_disk
AU_KFFXP Relative position of the allocation unit from the beginning of the disk. The allocation unit size (1 MB) in v$asm_diskgroup
LXN_KFFXP 0=primary extent, 1=mirror extent, 2=2nd mirror copy (high redundancy)
FLAGS_KFFXP N.K.
CHK_KFFXP N.K.

X$KFDAT

This X$ table contains details of all allocation units (free and used).

X$KFDAT Column Name Description
ADDR x$ table address/identifier
INDX row unique identifier
INST_ID instance number (RAC)
GROUP_KFDAT diskgroup number, join with v$asm_diskgroup
NUMBER_KFDAT disk number, join with v$asm_disk
COMPOUND_KFDAT disk compund_index, join with v$asm_disk
AUNUM_KFDAT Allocation unit identifier, join with x$kffxp.au_kffxp
V_KFDAT V=this Allocation Unit is used; F=AU is free
FNUM_KFDAT file number, join with v$asm_file
I_KFDAT N.K.
XNUM_KFDAT ASM file AU number join with x$kffxp.pxn_kffxp
RAW_KFDAT raw format encoding of the disk,and file extent information

X$KFDPARTNER

This X$ table contains the disk-to-partner (1-N) relationship. Two disks of a given ASM diskgroup are partners if they each contain a mirror copy of the same extent. Therefore partners must belong to different failgroups of the same diskgroup. From a few live examples I can see that typically disks have 10 partners each. This mechanism is in place to reduce the chance of losing both sides of the mirror in case of double disk failure.

X$KFDPARTNER Column Name Description
ADDR x$ table address/identifier
INDX row unique identifier
INST_ID instance number (RAC)
GRP diskgroup number, join with v$asm_diskgroup
DISK disk number, join with v$asm_disk
COMPOUND disk identifier. Join with compound_index in v$asm_disk
*NUMBER_KFDPARTNE*R partner disk number, i.e. disk-to-partner (1-N) relationship
MIRROR_KFDPARNER =1 in a 'clean configuration'
PARITY_KFDPARNER =1 in a 'clean configuration'
ACTIVE_KFDPARNER =1 in a 'clean configuration'

X$KFFIL and metadata files

..to be edited

Examples

...to be edited, see also https://twiki.cern.ch/twiki/pub/PSSGroup/HAandPerf/ASM_metadata_30012006.html


Revisions:
V1.0 Jan 2006, Luca.Canali@cernNOSPAMPLEASE.ch
Major additions, Jan2007, L.C.

Edit | Attach | Watch | Print version | History: r22 | r5 < r4 < r3 < r2 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r3 - 2007-01-21 - LucaCanali
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    PSSGroup All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback