Presentation is loading. Please wait.

Presentation is loading. Please wait.

Oracle 10g Automatic Storage Management Overview of ASM as a Storage Option for Oracle 10g.

Similar presentations


Presentation on theme: "Oracle 10g Automatic Storage Management Overview of ASM as a Storage Option for Oracle 10g."— Presentation transcript:

1 Oracle 10g Automatic Storage Management Overview of ASM as a Storage Option for Oracle 10g

2 Objectives At the end of this module the student will understand the following tasks and concepts. Understand the role of ASM Understand ASM components Understand how ASM handles disk redundancy Understand ASM Disk Groups Understand ASM Directories and Files Understand the uses of the ASMCMD command Understand how OEM interfaces with ASM

3 Automatic Storage Management ASM is a storage management system for Oracle data ASM is designed to simplify DBA storage tasks ASM is designed to simplify DBA storage tasks Simply assign disks and walk away – no data layout decisions Simply assign disks and walk away – no data layout decisions Allows Oracle to manage thousands of files automatically Allows Oracle to manage thousands of files automatically Organizes available disks into disk groups Organizes available disks into disk groups

4 ASM and Oracle Managed Files ASM extends the power of Oracle Managed Files Creates and manages files automatically Creates and manages files automatically Understands different Oracle file types Understands different Oracle file types Offers built-in data mirroring and striping capabilities Offers built-in data mirroring and striping capabilities Automatically balances I/O load across disk group(s) Automatically balances I/O load across disk group(s) Functionally like an LVM (Logical Volume Manager) Functionally like an LVM (Logical Volume Manager)

5 ASM Database When ASM is enabled, Oracle automatically creates a small database for storing ASM- related meta-data The default database name is “+ASM” The default RAC instances are “+ASMn”, where n is the node number The default RAC instances are “+ASMn”, where n is the node number The ASM database may be managed with srvctl commands Normally auto-managed by Oracle Normally auto-managed by Oracle

6 ASM Components Disk Groups Oracle may provide disk mirroring (optional) Oracle may provide disk mirroring (optional) Oracle will stripe files across all available disks Oracle will stripe files across all available disks Using ASM striping across a group of hardware striped LUNs can be beneficial to performance Using ASM striping across a group of hardware striped LUNs can be beneficial to performance Disks assigned to ASM Disk groups become ASM Disks Files written on ASM disks become ASM files Files are named with an Oracle-defined format Files are named with an Oracle-defined format File name aliases may be defined for convenience File name aliases may be defined for convenience A hierarchical directory structure may be defined for file aliases A hierarchical directory structure may be defined for file aliases

7 ASM Components Templates may be used to associate file attributes such as redundancy and striping with ASM files ASM is implemented through an ASM instance that runs as a service on each node

8 ASM Disk Group Redundancy ASM Disk Groups may be defined with different levels of redundancy NORMAL redundancy indicates that Oracle will create a software mirror for each disk NORMAL redundancy indicates that Oracle will create a software mirror for each disk HIGH redundancy indicates that Oracle will create two mirror disks per data disk HIGH redundancy indicates that Oracle will create two mirror disks per data disk Disk mirrors may be segregated into different locations by designating Failure Groups Disk mirrors may be segregated into different locations by designating Failure Groups EXTERNAL redundancy indicates that Oracle will not create any software mirrors. Hardware mirrors (if any) will be used instead EXTERNAL redundancy indicates that Oracle will not create any software mirrors. Hardware mirrors (if any) will be used instead External redundancy is recommended for any system with a highly available storage array External redundancy is recommended for any system with a highly available storage array

9 ASM Performance Tips ASM performance is sensitive to the number of disk spindles utilized Just like traditional storage, the number of IOs/second that can be sustained is directly proportional to the number of disks in the disk group Just like traditional storage, the number of IOs/second that can be sustained is directly proportional to the number of disks in the disk group Always use External Redundancy if you are using RAID-capable storage hardware Multiple RAID 1 disks can be utilized in a Disk Group Multiple RAID 1 disks can be utilized in a Disk Group ASM will provide the disk striping ASM will provide the disk striping Another option is to use multiple four disk RAID 10 groups as the building block for ASM Disk Groups Another option is to use multiple four disk RAID 10 groups as the building block for ASM Disk Groups ASM will stripe on top of the hardware stripe, creating a stripe “plaid”, very desirable for OLTP and random I/O performance ASM will stripe on top of the hardware stripe, creating a stripe “plaid”, very desirable for OLTP and random I/O performance

10 Creating ASM Disk Groups ASM disk groups may be created as part of the installation process Raw device files may be used though their file name aliases Raw device files may be used though their file name aliases As an alternative to raw files, ASMLIB may be used to stamp raw device files As an alternative to raw files, ASMLIB may be used to stamp raw device files Creates a name alias for the raw device files Creates a name alias for the raw device files The “CREATE DISKGROUP” SQL statement may be used to create disk groups: CREATE DISKGROUP dgroup_01 EXTERNAL REDUNDANCY DISK ‘C:\ASM*'; CREATE DISKGROUP dgroup_01 EXTERNAL REDUNDANCY DISK ‘C:\ASM*'; The disk group created in this example will be referred to as “+dgroup_01” The disk group created in this example will be referred to as “+dgroup_01”

11 ASM File Creation ASM files will be created automatically by Oracle when a new object is created: ALTER SYSTEM SET DB_CREATE_FILE_DEST = '+dgroup_01'; ALTER SYSTEM SET DB_CREATE_FILE_DEST = '+dgroup_01'; CREATE TABLESPACE mytspace1; CREATE TABLESPACE mytspace1; Note: ASM files are only visible to Oracle through SQL, ASMCMD, Grid Control, or OEM Not visible as an OS level file – looks like a raw device to the OS Not visible as an OS level file – looks like a raw device to the OS

12 ASM File Formats ASM files have the following format: +group/dbname/file_type/file_type_tag.file.incarnation Where: Where: +group is the disk group name +group is the disk group name dbname is the DB_UNIQUE_NAME of the database dbname is the DB_UNIQUE_NAME of the database file_type is the Oracle file type file_type is the Oracle file type tag is a descriptor appropriate to the file type tag is a descriptor appropriate to the file type file.incarnation is the file/incarnation pair, used to ensure uniqueness file.incarnation is the file/incarnation pair, used to ensure uniqueness An example of a fully qualified ASM filename is: +dgroup_01/oradb/controlfile/CF.248.1

13 Creating ASM Directories Before creating an alias for an ASM file, you must first create a directory hierarchy to contain the file: ALTER DISKGROUP dgroup_01 ADD DIRECTORY '+dgroup_01/newdir'; ALTER DISKGROUP dgroup_01 ADD DIRECTORY '+dgroup_01/newdir';

14 ASM File Aliases An alias may be created in SQL for an ASM file name: ALTER DISKGROUP dgroup_01 ADD ALIAS '+dgroup_011/newdir/control_2.dbf' FOR '+dgroup_01/oradb/controlfile/CF.248.2'; ALTER DISKGROUP dgroup_01 ADD ALIAS '+dgroup_011/newdir/control_2.dbf' FOR '+dgroup_01/oradb/controlfile/CF.248.2'; Oracle Enterprise Manager may be used to assign file aliases An SQL statement is still required to create the directory (as of Oracle 10g R1) An SQL statement is still required to create the directory (as of Oracle 10g R1)

15 Creating a Tablespace with ASM Creating a Tablespace in ASM: Example 1 Let Automatic Storage Management create and manage the tablespace datafile for you: Let Automatic Storage Management create and manage the tablespace datafile for you: Assume the following initialization parameter setting: Assume the following initialization parameter setting: DB_CREATE_FILE_DEST = '+dgroup2' DB_CREATE_FILE_DEST = '+dgroup2' The following statement creates the tablespace and its datafile: The following statement creates the tablespace and its datafile: CREATE TABLESPACE tspace2; CREATE TABLESPACE tspace2;

16 Creating a Tablespace with ASM Creating a Tablespace in ASM: Example 2 The following statements create a tablespace that uses a user defined template to specify the redundancy and striping attributes of the datafile: The following statements create a tablespace that uses a user defined template to specify the redundancy and striping attributes of the datafile: SQL> ALTER SYSTEM SET DB_CREATE_FILE_DEST = '+dgroup1(my_template)'; SQL> ALTER SYSTEM SET DB_CREATE_FILE_DEST = '+dgroup1(my_template)'; SQL> CREATE TABLESPACE tspace3; SQL> CREATE TABLESPACE tspace3;

17 Creating a Tablespace with ASM Creating a Tablespace in ASM: Example 3 The following statement creates an undo tablespace with a datafile that has an alias name, and with attributes that are set by the user defined template my_undo_template (not Oracle Managed Files). The following statement creates an undo tablespace with a datafile that has an alias name, and with attributes that are set by the user defined template my_undo_template (not Oracle Managed Files). CREATE UNDO TABLESPACE myundo DATAFILE '+dgroup3(my_undo_template)/myfiles/my_undo_t s' SIZE 200M; CREATE UNDO TABLESPACE myundo DATAFILE '+dgroup3(my_undo_template)/myfiles/my_undo_t s' SIZE 200M;

18 ASMCMD ASMCMD is a command-line utility for viewing and manipulating files and directories within ASM disk groups. Can be used in interactive mode Can be used in interactive mode Commands can be placed in OS scripts Commands can be placed in OS scripts Available with 10g R2 ASMCMD can be used to: List the contents of disk groups List the contents of disk groups Perform searches Perform searches Create and remove directories and aliases Create and remove directories and aliases Display space utilization Display space utilization And more. And more.

19 ASMCMD Syntax CommandDescription cdChanges the current directory to the specified directory. cdChanges the current directory to the specified directory. duDisplays the total disk space occupied by ASM files in the specified ASM directory and all its subdirectories, recursively. duDisplays the total disk space occupied by ASM files in the specified ASM directory and all its subdirectories, recursively. exitExits ASMCMD. exitExits ASMCMD. findLists the paths of all occurrences of the specified name (with wildcards) under the specified directory. findLists the paths of all occurrences of the specified name (with wildcards) under the specified directory. helpDisplays the syntax and description of ASMCMD commands. helpDisplays the syntax and description of ASMCMD commands. lsLists the contents of an ASM directory, the attributes of the specified file, or the names and attributes of all disk groups. lsLists the contents of an ASM directory, the attributes of the specified file, or the names and attributes of all disk groups. lsctLists information about current ASM clients. lsctLists information about current ASM clients. lsdgLists all disk groups and their attributes. lsdgLists all disk groups and their attributes. mkaliasCreates an alias for a system-generated filename. mkaliasCreates an alias for a system-generated filename. mkdirCreates ASM directories. mkdirCreates ASM directories. pwdDisplays the path of the current ASM directory. pwdDisplays the path of the current ASM directory. rmDeletes the specified ASM files or directories. rmDeletes the specified ASM files or directories. rmaliasDeletes the specified alias, retaining the file that the alias points to. rmaliasDeletes the specified alias, retaining the file that the alias points to.

20 ASMCMD Example In the following example, the rm command operates on the file undotbs1.272.557429239, which in this case is a relative path. ASMCMD prepends the current directory to the command argument to obtain the absolute path to the file ASMCMD [+] > cd +dgroup1 ASMCMD [+DGROUP1] > cd sample/datafile ASMCMD [+DGROUP1/SAMPLE/DATAFILE] > ls EXAMPLE.269.555342243SYSAUX.257.555341961SYSTEM.256.555341961UNDOTBS1.258.555341963UNDOTBS1.272.557429239USERS.259.555341963 ASMCMD [+DGROUP1/SAMPLE/DATAFILE] > rm undotbs1.272.557429239

21 OEM (Grid Control) ASM Home Page In Grid Control or Database Control (OEM) you can log into an ASM instance target (usually +ASMn) Check overall Disk Group health Check overall Disk Group health Specific tabs for: Specific tabs for: Performance Performance Administration Administration Maintenance Maintenance

22 OEM (Grid Control) ASM Performance Page Performance Graphs for Disk Group metrics: Disk Group I/O response Time Disk Group I/O response Time Disk Group I/O Operations Disk Group I/O Operations Disk Group I/O Throughput Disk Group I/O Throughput

23 OEM (Grid Control) ASM Administration Page Provides administrative access to disk groups Mount Disk Groups Mount Disk Groups Dismount Disk Groups Dismount Disk Groups Create Disk Groups Create Disk Groups Drill down to more detail Drill down to more detail

24 OEM (Grid Control) ASM Configuration Page Configure parameters for Disk Groups Data Discovery Path – path for discovering Disk Groups Data Discovery Path – path for discovering Disk Groups Auto Mount Disk Groups – list of Disk Groups to mount automatically at startup Auto Mount Disk Groups – list of Disk Groups to mount automatically at startup Rebalance Power – affects speed of Disk Group rebalancing. High numbers are faster, with more I/O overhead (1-11) Rebalance Power – affects speed of Disk Group rebalancing. High numbers are faster, with more I/O overhead (1-11)

25 Review Should you use normal redundancy for a RAC system on a SAN? What ASM component associates redundancy and file striping attributes with a file type? Do you have to create a file name for each new Oracle object? List the format of a fully qualified ASM file Give an example of an ASCMD command.

26 Summary ASM provides an easy-to-administer option for allocating storage ASM extends the concept of Oracle Managed Files ASM can provide both disk striping and disk redundancy ASM components include Disk Groups, ASM Disks, Templates and ASM instances ASM Directories, Files and File Aliases may be optionally created ASMCMD may be used to simulate a traditional file system command line interface Grid Control (OEM) provides several useful ASm oriented screens


Download ppt "Oracle 10g Automatic Storage Management Overview of ASM as a Storage Option for Oracle 10g."

Similar presentations


Ads by Google