Simplify your Job Automatic Storage Management DB TSC
1. DBA Challenges 2. ASM Disk group 3. Mirroring/Striping/Rebalancing 4. Traditional vs. ASM 5. ASM administration 6. ASM Summary
Capacity in Terabytes 60 50 40 30 20 10 0 Disk Capacity Capacity /DB Adm Mgmt Gap 1997 1998 1999 2000 2001 2002 2003 2004 2005 Strategic Research Corporation
DBA
(Automatic Storage Management, ASM) Automatic Storage Management, cluster file system volume manager file system Cluster database
ASM Tables Tables Tablespace Files File System Logical Vol 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010 Tablespace Files File System Logical Vol Oracle ASM Disks Disk Group
Application Application Application Application Database Database File System Volume Manager Operating System
File 2 File 1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1
ASM Disk Groups Disk Group
ASM Disk Groups (M bytes, Extent) Disk Group
ASM Disk Groups (M bytes, Extent) Disk group Disk Group
ASM Disk Groups (M bytes, Extent) Disk group Coarse / fine grain Disk Group
ASM Disk Groups Disk Group (M bytes, Extent) Disk group Coarse / fine grain OMF(Oracle Managed Files)
Disk Groups & Failure Groups Controller 1 Controller 2 Failure Group 1 Failure Group 2 Disk Group Disk Group Failure Group Disk Group ASM Disk Group DBA Failure Group, Extent Failure group Failure Groups DBA ASM
ASM Disk group redundancy External: hardware Normal: 2-way High: 3-way / dirty region logging
ASM Extent Primary & Mirror extent
ASM Extent Primary & Mirror extent
ASM hot spare disk load I/O load
ASM Array NVRAM (data redundancy)
ASM Coarse striping Fine Grained striping
Name Archivelog Autobackup Controlfile Datafile Flashback Onlinelog ParameterFile Tempfile Stripe Coarse Coarse Fine Coarse Fine Fine Coarse Coarse Redundancy Normal Normal Normal Normal Normal Normal Normal Normal
ASM (!!) Disk Group
ASM (!!) Disk Group
ASM (!!) I/O Disk Group
ASM (!!) Disk Group
ASM (!!) Disk Group
ASM (!!) Disk Group
ASM (!!) Disk Group
ASM ASM Instance Non RAC Database Oracle DB Instance Server Pool of Storage Disk Group
ASM ASM Instance ASM Instance RAC Database Clustered Servers Clustered Pool of Storage Oracle DB Instance Oracle DB Instance Disk Group
ASM ASM Instance ASM Instance RAC Database Clustered Servers Clustered Pool of Storage Oracle DB Instance Oracle DB Instance Disk Group Disk Group
ASM ASM Instance ASM Instance ASM Instance ASM Instance RAC or Non RAC Databases Oracle DB Instance Oracle DB Instance Oracle DB Instance Oracle DB Instance Oracle DB Instance Clustered Servers Clustered Pool of Storage Disk Group Disk Group
ASM - 1. 1. 2. Volume Manager, File 2. ASM System 3. Disk Group 3. hot spot 4. s/w 4. Logical volumes 5. File system 6. s/w 5. 7.
ASM 1. OS 1. OS 2. Volume Manager 2. Add Disk volume 3. volume File System 4. 5. 6. 7. I/O
ASM 1. 1. Drop disk 2. 2. File system 3. 4. 5. OS 6. I/O
ASM 1. OS 1. OS 2. 2. Add disk 3. Drop 3. Volume Manager Disk volume 4. 4. File system 5. 6. 7. OS 8. I/O
ASM I/O 1. I/O This space intentionally left 2. hot spot blank 3. hot spots 4. 5. 6. hot spot
ASM 1. This space intentionally left blank 2. Fragmentation 3. Fragmentation 4. 5. 6. Fragmentation
ASM = OSM
EM ASM
ASM Diskgroups Disks Files 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010
ASM diskgroups Redundancy External ( ) Normal (2-way ) 2 failure groups High (3-way ) 3 failure groups
ASM diskstring Scan ( ) /dev/rdsk* /dev/sd[a-f] osm_diskstring OS specific default /dev/raw/raw* on Linux \\.\PhysicalDrive[1-9]* on Windows
ASM init.ora instance_type=asm RDBMS osm_diskgroup=<diskgroup1>, <diskgroup2> Diskgroup startup mount, alter diskgroup mount all
Diskgroup #1 create diskgroup group1 disk /dev/raw/raw1 ; create diskgroup group2 external redundancy disk /dev/raw/raw2 ;
Diskgroup #2 Create diskgroup dgroup3 failgroup controller0 disk /dev/c0t*, failgroup controller1 disk /dev/c1t* ;
V$osm_diskgroup select name, state from v$osm_diskgroup; NAME STATE ------------------ ------- GROUP1 MOUNTED
Diskgroup Drop diskgroup group1; Drop diskgroup group2 including contents;
ASM administration Diskgroups Disks Files 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010
V$osm_disk osm_diskstring ASM OS device Redundancy
V$osm_disk select name, total_mb, free_mb from v$osm_disk; NAME TOTAL_MB FREE_MB ------------ -------- ------- GROUP1_0001 1000 453
Disk alter diskgroup group1 add disk /dev/raw/raw9, /dev/raw/raw10 ;
/ osm_power_limit=[1-11] alter diskgroup group1 drop disk group1_0000 rebalance power 4;
V$osm_operation Mbyte Select sofar, est_rate, est_minutes from v$osm_operation; SOFAR EST_RATE EST_MINUTES ----- -------- ----------- 373 400 1
ASM administration Diskgroups Disks Files 0010 0010 0010 0010 0010 0010 0010 0010 0010 0010
ASM file ASM file (OMF ) create tablespace data datafile +group1/data ; File alter diskgroup group1 drop file +group1/data ;
File (3-way, 2-way, None) Coarse (1MB) Fine-grained (8x128k)
V$osm_template Select name, redudnancy, stripe from v$osm_template where name=datafile; NAME REDUND STRIPE --------------------- ------ ------ DATAFILE NORMAL COARSE
ASM init.ora instance_type=asm osm_diskstring=/dev/raw/raw* osm_diskgroup=group1 osm_power_limit=1
ASM Fixed Tables V$osm_disk V$osm_diskgroup V$osm_file V$osm_alias V$osm_template V$osm_operation V$osm_client
8 7 7 7 6 8 6 6 Nbr Steps 6 5 4 3 2 1 0 5 2 2 Install Add Storage Remove Storage 4 Migrate Storage Tune I/O 0 0 Manage Space ASM Traditional
ASM - File system / Volume manager solution Disk group I/O ( ) Fine / Coarse grain
ASM - Software dirty region logging hot spare disk I/O ASM I/O direct I/O(not OS buffering) I/O Mainframe
. ASM Grid Computing
Q U E S T I O N S A N S W E R S