ASM

1,what is the asm?

ASM is an integrated volume manager for storingOracle database files - includingdatafiles, redo logs,backups, controlfiles and spfiles. ASM allows administrators to add and remove disks while the database is on-line and available to users. Data is automaticallystriped across all disks in a disk group, and is optionally mirrored.


2,how to operate?

1)v$

2)asmcmd

weblink for asmcm

3,v$

v$asm_diskgroup: Describes a disk group (number, name, size related info, state, and redundancy type) Contains one row for every open ASM disk in the DB instance.

v$asm_client:  Identifies databases using disk groups managed by the ASM instance. Contains no rows.

v$asm_disk:  Contains one row for every disk discovered by the ASM instance, including disks that are not part of any disk group. Contains rows only for disks in the disk groups in use by that DB instance.

v$asm_file:  Contains one row for every ASM file in every disk group mounted by the ASM instance. Contains rows only for files that are currently open in the DB instance.

v$asm_template:  Contains one row for every template present in every disk group mounted by the ASM instance. Contains no rows

v$asm_alias:  Contains one row for every alias present in every disk group mounted by the ASM instance. Contains no rows.

v$asm_operation:  Contains one row for every active ASM long running operation executing in the ASM instance. Contains no rows.

 


Oracle v$ views for ASM and their x$ tables

The v$ views for ASM  are built upon several ASM fixed tables, called x$ tables.  The x$ tables are not really tables, they are C language structures inside the SGA RAM heap:

X$ Table v$ View

X$KFGRP

V$ASM_DISKGROUP

X$KFGRP_STAT

V$ASM_DISKGROUP_STAT

X$KFDSK 

V$ASM_DISK

X$KFKID V$ASM_DISK

X$KFDSK_STAT

V$ASM_DISK_STAT

X$KFKID V$ASM_DISK_STAT

X$KFFIL

V$ASM_FILE

X$KFALS

V$ASM_ALIAS

X$KFTMTA

V$ASM_TEMPLATE

X$KFNCL

V$ASM_CLIENT

X$KFGMG

V$ASM_OPERATION

X$KFENV V$ASM_ATTRIBUTE
X$KFNSDSKIOST

V$ASM_DISK_IOSTAT


4,How to be used by db?

create 2 disk groups - one for data and one for recovery files. Here is an example:

CREATE DISKGROUP data    EXTERNAL REDUNDANCY DISK '/dev/d1', '/dev/d2', '/dev/d3', ....;
CREATE DISKGROUP recover EXTERNAL REDUNDANCY DISK '/dev/d10', '/dev/d11', '/dev/d12', ....;


how you can enable automatic file management with such a setup:

ALTER SYSTEM SET db_create_file_dest   = '+DATA' SCOPE=SPFILE;
ALTER SYSTEM SET db_recovery_file_dest = '+RECOVER' SCOPE=SPFILE;






發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章