Oracle 10 g automatic storage management
This presentation is the property of its rightful owner.
Sponsored Links
1 / 26

Oracle 10 g Automatic Storage Management PowerPoint PPT Presentation


  • 92 Views
  • Uploaded on
  • Presentation posted in: General

Oracle 10 g Automatic Storage Management. Overview of ASM as a Storage Option for Oracle 10g. 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

Download Presentation

Oracle 10 g Automatic Storage Management

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Oracle 10 g automatic storage management

Oracle 10g Automatic Storage Management

Overview of ASM as a Storage Option for Oracle 10g


Objectives

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


Automatic storage management

Automatic Storage Management

  • ASM is a storage management system for Oracle data

    • ASM is designed to simplify DBA storage tasks

    • Simply assign disks and walk away – no data layout decisions

    • Allows Oracle to manage thousands of files automatically

    • Organizes available disks into disk groups


Asm and oracle managed files

ASM and Oracle Managed Files

  • ASM extends the power of Oracle Managed Files

    • Creates and manages files automatically

      • Understands different Oracle file types

    • Offers built-in data mirroring and striping capabilities

    • Automatically balances I/O load across disk group(s)

    • Functionally like an LVM (Logical Volume Manager)


Asm database

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 ASM database may be managed with srvctl commands

    • Normally auto-managed by Oracle


Asm components

ASM Components

  • Disk Groups

    • Oracle may provide disk mirroring (optional)

    • Oracle will stripe files across all available disks

    • 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

    • File name aliases may be defined for convenience

    • A hierarchical directory structure may be defined for file aliases


Asm components1

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


Asm disk group redundancy

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

    • 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

    • 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


Asm performance tips

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

  • Always use External Redundancy if you are using RAID-capable storage hardware

    • Multiple RAID 1 disks can be utilized in a Disk Group

      • 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

      • ASM will stripe on top of the hardware stripe, creating a stripe “plaid”, very desirable for OLTP and random I/O performance


Creating asm disk groups

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

    • As an alternative to raw files, ASMLIB may be used to stamp 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*';

    • The disk group created in this example will be referred to as “+dgroup_01”


Asm file creation

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';

    • 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


Asm file formats

ASM File Formats

  • ASM files have the following format:

    +group/dbname/file_type/file_type_tag.file.incarnation

    Where:

    • +group is the disk group name

    • dbname is the DB_UNIQUE_NAME of the database

    • file_type is the Oracle file type

    • tag is a descriptor appropriate to the file type

    • 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


Creating asm directories

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';


Asm file aliases

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';

  • 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)


Creating a tablespace with asm

Creating a Tablespace with ASM

  • Creating a Tablespace in ASM: Example 1

    • Let Automatic Storage Management create and manage the tablespace datafile for you:

    • Assume the following initialization parameter setting:

      • DB_CREATE_FILE_DEST = '+dgroup2'

    • The following statement creates the tablespace and its datafile:

      • CREATE TABLESPACE tspace2;


Creating a tablespace with asm1

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:

      • SQL> ALTER SYSTEM SET DB_CREATE_FILE_DEST = '+dgroup1(my_template)';

      • SQL> CREATE TABLESPACE tspace3;


Creating a tablespace with asm2

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).

      • CREATE UNDO TABLESPACE myundo DATAFILE '+dgroup3(my_undo_template)/myfiles/my_undo_ts' SIZE 200M;


Asmcmd

ASMCMD

  • ASMCMD is a command-line utility for viewing and manipulating files and directories within ASM disk groups.

    • Can be used in interactive mode

    • Commands can be placed in OS scripts

  • Available with 10g R2

  • ASMCMD can be used to:

    • List the contents of disk groups

    • Perform searches

    • Create and remove directories and aliases

    • Display space utilization

    • And more.


Asmcmd syntax

ASMCMD Syntax

CommandDescription

  • 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.

  • exitExits ASMCMD.

  • findLists the paths of all occurrences of the specified name (with wildcards) under the specified directory.

  • 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.

  • lsctLists information about current ASM clients.

  • lsdgLists all disk groups and their attributes.

  • mkaliasCreates an alias for a system-generated filename.

  • mkdirCreates ASM directories.

  • pwdDisplays the path of the current ASM directory.

  • rmDeletes the specified ASM files or directories.

  • rmaliasDeletes the specified alias, retaining the file that the alias points to.


Asmcmd example

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.555342243

    SYSAUX.257.555341961

    SYSTEM.256.555341961

    UNDOTBS1.258.555341963

    UNDOTBS1.272.557429239

    USERS.259.555341963

    ASMCMD [+DGROUP1/SAMPLE/DATAFILE] > rm undotbs1.272.557429239


Oem grid control asm home page

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

    • Specific tabs for:

      • Performance

      • Administration

      • Maintenance


Oem grid control asm performance page

OEM (Grid Control) ASM Performance Page

  • Performance Graphs for Disk Group metrics:

    • Disk Group I/O response Time

    • Disk Group I/O Operations

    • Disk Group I/O Throughput


Oem grid control asm administration page

OEM (Grid Control) ASM Administration Page

  • Provides administrative access to disk groups

    • Mount Disk Groups

    • Dismount Disk Groups

    • Create Disk Groups

    • Drill down to more detail


Oem grid control asm configuration page

OEM (Grid Control) ASM Configuration Page

  • Configure parameters for Disk Groups

    • Data Discovery Path – path for discovering Disk Groups

    • 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)


Review

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.


Summary

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


  • Login