You are on page 1of 38

Automatic Storage Management

12
Copyright 2008, Oracle. All rights reserved.

Objectives
After completing this lesson, you should be able to: Identify the features of Automatic Storage Management (ASM) Set up initiali ation parameter files for ASM and database instances !"ecute S#$ commands %ith ASM file names Start up and shut do%n ASM instances Administer ASM dis& groups 'se (MA) to migrate your database to ASM

12 - 2

Copyright 2008, Oracle. All rights reserved.

Automatic Storage Management: (evie%


*ortable and high+performance cluster file system Manages Oracle database files ,ata spread across dis&s to balance load Integrated mirroring across dis&s Solves many storage management challenges

Application ,atabase -ile system .olume manager

ASM

Operating system

12 - 3

Copyright 2008, Oracle. All rights reserved.

Auto atic !torage "a#age e#t$ %evie& '#otes o#ly slide(

12 - 4

Copyright 2008, Oracle. All rights reserved.

ASM /eneral Architecture

,2 instance SI,0sales
,240 ASM2 -/ (2A$

ASM instance SI,0asm

(2A$ A(20

A(2A

ASM dis&s

ASM dis&s

ASM dis&s

ASM dis&s

ASM dis&s

ASM dis&s

ASM dis& group 1

ASM dis& group 3

12 - )

Copyright 2008, Oracle. All rights reserved.

+otes O#ly !lide

12 - *

Copyright 2008, Oracle. All rights reserved.

ASM Instance 5as&s


5he follo%ing are tas&s that you need to be able to perform in order to use an ASM instance: 6reate the ASM instance Set the initiali ation parameters Start the ASM instance Manage the ASM instance Shut do%n the ASM instance

12 - ,

Copyright 2008, Oracle. All rights reserved.

6reating an ASM Instance

12 - 8

Copyright 2008, Oracle. All rights reserved.

ASM Instance Initiali ation *arameters

INSTANCE_TYPE = ASM DB_UNIQUE_NAME = +ASM ASM_POWER_LIMIT = 1 ASM_DISKSTRING = '/dev/ d!"/#!$'% '/dev/ d!"/&1#' ASM_DISKGROUPS = d' ()*A% d' ()*B LARGE_POOL_SI+E = ,MB

12 - -

Copyright 2008, Oracle. All rights reserved.

,atabase Instance *arameter 6hanges


INSTANCE_TYPE = RDBMS LOG_ARC-I.E_/ORMAT DB_BLOCK_SI+E DB_CREATE_ONLINE_LOG_DEST_n DB_CREATE_/ILE_DEST DB_RECO.ERY_/ILE_DEST CONTROL_/ILES LOG_ARC-I.E_DEST_n LOG_ARC-I.E_DEST STANDBY_ARC-I.E_DEST LARGE_POOL_SI+E = ,MB

12 - 10

Copyright 2008, Oracle. All rights reserved.

Starting 'p an ASM Instance

0 e1*( 2 ORACLE_SID='+ASM' 0 !34*4)! /5(4(' SQL6 CONNECT / AS !7!d89 C(55e&2ed 2( 95 :d4e :5!295&e; SQL6 STARTUP< ASM :5!295&e !29 2ed T(294 S7!2e= G4(894 A e9 ,>,,?@,@ /:1ed S:Ae 1$?@$1? .9 :984e S:Ae BCD?@@D@ ASM C9&Ee $B1?B,$D ASM d:!"' ()*! =()52ed

872e! 872e! 872e! 872e!

12 - 11

Copyright 2008, Oracle. All rights reserved.

Accessing an ASM Instance


AS SYSDBA
ASM instance

AS SYSOPER

All operations

)ondestructive operations ,is& group

,is& group

Storage system
12 - 12

Copyright 2008, Oracle. All rights reserved.

Accessi#g a# A!" .#sta#ce '#otes o#ly slide(

12 - 13

Copyright 2008, Oracle. All rights reserved.

ASM 7ome *age

12 - 14

Copyright 2008, Oracle. All rights reserved.

ASM *erformance *age

12 - 1)

Copyright 2008, Oracle. All rights reserved.

ASM 6onfiguration *age

12 - 1*

Copyright 2008, Oracle. All rights reserved.

Shutting ,o%n an ASM Instance


,atabase instance A 3 ,atabase instance 2

ASM instance 8 1 S-UTDOWN NORMAL 1

12 - 1,

Copyright 2008, Oracle. All rights reserved.

!hutti#g /o&# a# A!" .#sta#ce '#otes o#ly slide(

12 - 18

Copyright 2008, Oracle. All rights reserved.

,26A and Storage Options

12 - 1-

Copyright 2008, Oracle. All rights reserved.

ASM Storage: 6oncepts


,atabase ASM dis& group ,ata file ASM file

5ablespace

Segment -ile system file or ra% device

ASM dis&

!"tent

Allocation unit (A') *hysical bloc&

Oracle data bloc&

12 - 20

Copyright 2008, Oracle. All rights reserved.

ASM ,is& /roups


A pool of dis&s managed as a logical unit *artitions total dis& space into uniform si ed units Spreads each file evenly across all dis&s 'ses coarse+ or fine+grain striping on the basis of file type Administers dis& groups, not files

ASM instance

,is& group

12 - 21

Copyright 2008, Oracle. All rights reserved.

-ailure /roup

6ontroller 1
< ; : 8 3 1 1 1 9 9 9 18 18 18

6ontroller 3

6ontroller 8

1 1 1

9 9 9

18 18 18

1 1 1

9 9 9

18 18 18

-ailure group 1

-ailure group 3 ,is& group A

-ailure group 8

12 - 22

Copyright 2008, Oracle. All rights reserved.

,is& /roup Mirroring


Mirror at A' level Mi" primary and mirror A's on each dis& !"ternal redundancy: ,efers to hard%are mirroring )ormal redundancy:
0 5%o+%ay mirroring 0 At least t%o failure groups

7igh redundancy:
0 5hree+%ay mirroring 0 At least three failure groups

12 - 23

Copyright 2008, Oracle. All rights reserved.

,is& /roup ,ynamic (ebalancing


Automatic online rebalance %henever storage configuration changes Only move data proportional to storage added )o need for manual I=O tuning Online migration to ne% storage 6onfigurable load on system using ASM_POWER_LIMIT
Copyright 2008, Oracle. All rights reserved.

12 - 24

Managing ,is& /roups

CREATE DISKGROUP ASM instance DROP DISKGROUP

,atabase instance ALTER DISKGROUP

12 - 2)

Copyright 2008, Oracle. All rights reserved.

ASM Administration *age

12 - 2*

Copyright 2008, Oracle. All rights reserved.

6reate ,is& /roup *age

12 - 2,

Copyright 2008, Oracle. All rights reserved.

6reating and ,ropping ,is& /roups

CREATE DISKGROUP d' ()*A NORMAL REDUNDANCY /AILGROUP &(52 (44e 1 DISK '/dev:&e!/A1' NAME d:!"A1 SI+E 1$@G /ORCE% '/dev:&e!/A$'% '/dev:&e!/A>' /AILGROUP &(52 (44e $ DISK '/dev:&e!/B1'% '/dev:&e!/B$'% '/dev:&e!/B>'<

DROP DISKGROUP d' ()*A INCLUDING CONTENTS<

12 - 28

Copyright 2008, Oracle. All rights reserved.

Adding ,is&s to ,is& /roups


ALTER DISKGROUP d' ()*A ADD '/dev/ d!"/&@2Dd@!$' NAME '/dev/ d!"/&@2Bd@!$' NAME '/dev/ d!"/&@2?d@!$' NAME '/dev/ d!"/&@2Cd@!$' NAME DISK AB% A?% AC% A,<

ALTER DISKGROUP d' ()*A ADD DISK '/dev:&e!/A#'<

,is& formatting

,is& group rebalancing

12 - 2-

Copyright 2008, Oracle. All rights reserved.

Addi#g /is1s to /is1 2roups '#otes o#ly slide(

12 - 30

Copyright 2008, Oracle. All rights reserved.

Miscellaneous ALTER 6ommands


(emove a dis& from d' ()*A:
ALTER DISKGROUP d' ()*A DROP DISK AB<

Add and drop a dis& in a single command:


ALTER DISKGROUP d' ()*A DROP DISK A? ADD /AILGROUP F ed DISK '/dev/ d!"/&@2,d@!$' NAME AG<

6ancel a dis& drop operation:


ALTER DISKGROUP d' ()*A UNDROP DISKS<

12 - 31

Copyright 2008, Oracle. All rights reserved.

Miscellaneous Alter 6ommands (notes only slide)

12 - 32

Copyright 2008, Oracle. All rights reserved.

ASM -iles
CREATE TABLESPACE !9=*4e DATA/ILE '+d' ()*A'<
,atabase file (MA) 1 3 8 : Automatic ASM file creation

ASM file automatically spread inside dis& group d' ()*A


12 - 33 Copyright 2008, Oracle. All rights reserved.

ASMCMD 'tility

SQL6 CREATE TABLESPACE 28!9!= DATA/ILE '+DGROUP1' SI+E 1@@M< T984e!*9&e & e92ed; SQL6 CREATE TABLESPACE E 9**! DATA/ILE '+DGROUP1' SI+E 1@M< T984e!*9&e & e92ed;

0 9!=&=d ASMCMD6 4! H4 DGROUP1/ORCL/DATA/ILE T7*e Red)5d S2 :*ed T:=e DATA/ILE MIRROR COARSE OCT @B $1I@@I@@ DATA/ILE MIRROR COARSE OCT @B $1I@@I@@ ASMCMD6

S7! Y Y

N9=e -RAPPS;$BC;BC@G$>?11 TBSASM;$B?;BC@G$$G1C

12 - 34

Copyright 2008, Oracle. All rights reserved.

Migrating >our ,atabase to ASM Storage


1? Shut do%n your database cleanly? 3? Shut do%n the database and modify your server parameter file to use Oracle Managed -iles (OM-)? 8? !dit and e"ecute the follo%ing (MA) script:
STARTUP NOMOUNT< RESTORE CONTROL/ILE /ROM '/)1/&1;&24'< ALTER DATABASE MOUNT< BACKUP AS COPY DATABASE /ORMAT '+d' ()*1'< SWITC- DATABASE TO COPY< SQL JALTER DATABASE RENAME '/)1/4('1' TO '+d' ()*1' J< K Re*e92 RENAME &(==95d F( 944 (54:5e ed( 4(' =e=8e ! ;;; ALTER DATABASE OPEN RESETLOGS< SQL JALTER DATABASE TEMP/ILE '/)1/2e=*1' DROPJ<
12 - 3) Copyright 2008, Oracle. All rights reserved.

"igrati#g 3our /ata4ase to A!" !torage '#otes o#ly slide(

12 - 3*

Copyright 2008, Oracle. All rights reserved.

Summary
In this lesson, you should have learned ho% to: ,escribe the concepts of Automatic Storage Management (ASM) Set up initiali ation parameter files for ASM and database instances !"ecute S#$ commands %ith ASM file names Start up and shut do%n ASM instances Administer ASM dis& groups 'se (MA) to migrate your database to ASM

12 - 3,

Copyright 2008, Oracle. All rights reserved.

*ractice Overvie%: 'sing Automatic Storage Management


5his practice covers the follo%ing topics: 6reating and starting an ASM instance 6reating and using ASM dis& groups Migrating a tablespace to ASM storage

12 - 38

Copyright 2008, Oracle. All rights reserved.

You might also like