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

ASM Explorations

A collection of experiments and facts on ASM internals.
At CERN Physics DB we use Oracle 10g ASM (Automatic Storage Manager) as a cluster filesystem and volume manager for Oracle RAC. ASM is used to build 'SAME' (stripe and mirror everything') volumes from a number of low-cost storage arrays. Software mirroring by ASM is a key feature of the architecture Architecture_description.pdf ASM is managed via a specialized ASM instance, operations are done using special SQL commands, while metadata is visible via V$ and X$ views. 10.2.0.3 and normal redundancy is the reference for the examples below.

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: connecting to ASM instances via Oracle*NET requires an extra keyword (UR=A) in the tnsnames alias, or you will get an error message that the instance is blocked. You also need a password file Example:
ASM1 =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = [hostname])(PORT = [portN]))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = +ASM1)
      (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, is used to create a diskgroup DATADG. DATADG is built using 2 evenly sized groups of disks: 32 disks in failgroup N.1 and 32 in failgroup N.2. When a file is create in DATADG, it is logically divided in extents (1MB for datafiles) and allocated in 2 copies, called allocation units (AU): one AU in failgroup N.1 the other in failgroup N.2.

Selected X$tables

X$KFFXP

This table contains the mapping between files and allocation units. It allows to track the position of all the extents of a given file striped and mirrored across storage.

Columns 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 Extent number (for the given file)
XNUM_KFFXP Logical extent number per file (mirrored extents have the same 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 file header/metadata

X$KFDAT

X$KFDPARTNER

X$KFFIL and metadata files

Edit | Attach | Watch | Print version | History: r22 | r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r2 - 2007-01-16 - 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