oracle 10 g automatic storage management
Download
Skip this Video
Download Presentation
Oracle 10 g Automatic Storage Management

Loading in 2 Seconds...

play fullscreen
1 / 26

oracle 10 g automatic storage management - PowerPoint PPT Presentation


  • 321 Views
  • Uploaded on

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

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'oracle 10 g automatic storage management' - paul


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 components7
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 asm16
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 asm17
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

Command Description

  • cd Changes the current directory to the specified directory.
  • du Displays the total disk space occupied by ASM files in the specified ASM directory and all its subdirectories, recursively.
  • exit Exits ASMCMD.
  • find Lists the paths of all occurrences of the specified name (with wildcards) under the specified directory.
  • help Displays the syntax and description of ASMCMD commands.
  • ls Lists the contents of an ASM directory, the attributes of the specified file, or the names and attributes of all disk groups.
  • lsct Lists information about current ASM clients.
  • lsdg Lists all disk groups and their attributes.
  • mkalias Creates an alias for a system-generated filename.
  • mkdir Creates ASM directories.
  • pwd Displays the path of the current ASM directory.
  • rm Deletes the specified ASM files or directories.
  • rmalias Deletes 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
ad