storage advantages by oracle warum redundancy … · baden bern · brugg · lausanne zurich...

36
Basel · Baden Bern · Brugg · Lausanne Zurich Düsseldorf · Frankfurt/M. · Freiburg i. Br. Hamburg · Munich · Stuttgart · Vienna Storage Advantages by Oracle Warum Redundancy Normal in ASM? Ralf Moosandl Senior Consultant [email protected] Nürnberg, 16.11.2010

Upload: trinhkien

Post on 20-May-2018

222 views

Category:

Documents


1 download

TRANSCRIPT

Basel · Baden Bern · Brugg · Lausanne Zurich Düsseldorf · Frankfurt/M. · Freiburg i. Br. Hamburg · Munich · Stuttgart · Vienna

Storage Advantages by Oracle –

Warum Redundancy Normal in ASM?

Ralf Moosandl

Senior Consultant

[email protected]

Nürnberg, 16.11.2010

© 2010© 20092

Trivadis facts & figures 11 Trivadis locations with more

than 540 employees

Financially independent and

sustainably profitable

Key figures 2009

Revenue CHF 100 / EUR 66 mio.

Services for more than 650 clients in over 1‘600 projects

Over 160 Service Level

Agreements

More than 5'000 training participants

Research and development

budget: CHF 5.0 / EUR 3.3 mio.

IT SOLUTIONS, SERVICES, & PRODUCTS

TECHNOLOGIES

Oracle, Microsoft, IBM, Open Source

Integration, Application Performance

Management, Security

Training Managed Services

Infrastructure

Engineering

Application

Development

Enterprise Content

Management

BUSINESS INTEGRATION SERVICES

IT

departments

Business

departments

CUSTOMER

Business

Intelligence

© 2010© 20093

Why we are special

Customer-specific

solution competence and vendor independence

offers substantiated techniques and skills as well as self-developed

approaches

guarantees repeatable quality and a safe execution

Technology competence offers more than 15 years of expertise in Oracle, Microsoft, IBM, and

open source

has its own Technology Center and strives for technological excellence

Solution and integration

expertise

has a wide and cross-sectoral customer basis and more than 1600

projects every year

Combines technological expertise with an understanding of the specific business needs of the client

Support for the entire IT

project lifecycle

has a modular portfolio of services for the entire IT project lifecycle

provides the appropriate combination of solutions and services for every „level of maturity“

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 4

Data are always

part of the game.

Nontechnical reasons for using ASM

Technical …

Reasons for using redundancies

Split Mirror

Filesystem Monitoring

Shared Pool Usage

Agenda

© 2010

Nontechnical Reasons for using ASM (1)

RAC Standard Edition is only certified with ASM

Cost savings, as customers get rid of cluster filesystems

Support of OS, Storage, DB from one vendor

Reduce costs of storage management

Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 5

© 2010

Technical reasons for using ASM (1)

Reduce administration complexity

Automatic I/O tuning for all types of workloads

Reduces the number of objects to manage, as one disk group

replaces multiple file systems

Introduces Oracle Managed Files

Simplifies database storage configuration changes

Automatic data copy on disk, add and drop

Online migration to new storage hardware

Reduced downtime

ASM prevents accidental file deletion because there is no file system

interface

Virus scanners cannot lock files within ASM ( Rtvscan.exe )

Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 6

© 2010

Technical reasons for using ASM (2)

Increase Utilization

Provides mechanism for Database Storage Consolidation

Provides clustered volume manager and file system functionality

integrated with the database

Makes block devices as simple to administer as file servers

Works with any type of disk from modular storage, NAS devices

to SAN disk arrays

Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 7

© 2010

Technical reasons for using ASM (3)

Improves Performance, Scalability, and Reliability

Raw disk I/O performance for all files

Datafiles are stored depending of filetype

Stripe files across multiple disks and storage arrays

Higher storage resource utilization

ASM-Lib API improves CPU utilization to reap I/O and provide priority

and caching hints

Overcomes file system size limitations

Implements mirroring to protect against storage array failure

Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 8

© 2010

Reasons for using redundancies (1)

Basics

File templates are collections of attribute values that are used to

specify

disk regions

file mirroring

striping attributes

for an Oracle ASM file when it is created

Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 9

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 10

File Templates – How can we handle them ?

Adding a Template to a Disk Group

Modifying a Disk Group Template

Using a User-Defined Template to Specify Attributes

Reasons for using redundancies (2)

ALTER DISKGROUP data MODIFY TEMPLATE reliable

ATTRIBUTES (COARSE);

ALTER SYSTEM SET DB_CREATE_FILE_DEST =

'+data(mytemplate)';

ALTER DISKGROUP data ADD TEMPLATE reliable

ATTRIBUTES (HIGH FINE);

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 11

Oracle ASM System Default Templates Attribute Settings

Source: Oracle® Database Storage Administrator's Guide 11g Release 2 (11.2)

Reasons for using redundancies (3)

Template Name File Striping

Mirroring,

Normal Redundancy

Mirroring,

High redundancy

CONTROLFILE FINE HIGH MIRROR

DATAFILE, ONLINELOG COARSE MIRROR MIRROR

ARCHIVELOG, BACKUPSET COARSE MIRROR MIRROR

TEMPFILE, PARAMETERFILE COARSE MIRROR MIRROR

DATAGUARDCONF, DUMPSET COARSE MIRROR MIRROR

FLASHBACK, CHANGETRACKING COARSE MIRROR MIRROR

XTRANSPORT, AUTOBACKUP COARSE MIRROR MIRROR

ASMPARAMETERFILE, OCRFILE COARSE MIRROR MIRROR

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 12

Attribute „file mirroring“ can be modified when using redundancy

normal

Permitted Values for Oracle ASM Template Redundancy Attribute

Source: Oracle® Database Storage Administrator's Guide 11g Release 2 (11.2)

Reasons for using redundancies (4)

Redundancy

Attribute Value

Resulting Mirroring

in Normal Redundancy Disk

Group

Resulting Mirroring

in High Redundancy Disk

Group

Resulting Mirroring

in External Redundancy Disk

Group

MIRROR Two-way

mirroring

Three-way

mirroring

(Not allowed)

HIGH Three-way

mirroring

Three-way

mirroring

(Not allowed)

UNPROTECTED No mirroring (Not allowed) No mirroring

© 201013

There exists another world for non database files

Reasons for using redundancies (5)

Source Oracle Corporation

Storage Advantages by Oracle - Warum Redundancy Normal im ASM?

© 201014

asmca provides a GUI interface for installing and configuring

Instances, Disk Groups, Volumes, File Systems

Reasons for using redundancies (6)

14Storage Advantages by Oracle - Warum Redundancy Normal im ASM?

© 201015

Redundancy cannot be influenced if the underlying diskgroup is

of type redundancy external

Reasons for using redundancies (7)

15Storage Advantages by Oracle - Warum Redundancy Normal im ASM?

© 201016

Redundancy can only be influenced if the underlying diskgroup is

of type redundancy normal

Reasons for using redundancies (7)

16Storage Advantages by Oracle - Warum Redundancy Normal im ASM?

© 201017

Redundancy cannot be influenced if the underlying diskgroup is

of type redundancy high

Reasons for using redundancies (7)

17Storage Advantages by Oracle - Warum Redundancy Normal im ASM?

© 2010

Reasons for using redundancies (6)

ADVM Volume characteristics can be influenced

ADVM Volume is stored in a diskgroup – if possible with

redundancy normal

Redundancy external →every kind of mirroring is

switched off

Redundancy normal →You can choose between all kinds of

mirroring for the dynamic volume

File metadata is more safe

3 mirrored extents with file metadata, visible from x$kffxp and x$kfdat

… not validated till now

Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 18

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 19

To eliminates additional layers of software complexity

Redundancy Normal or High enables customizable Redundancy

Storage system does not have a RAID controller

Mirroring across storage arrays

Extended cluster configurations

Features which need ASM mirroring

Fast Mirror Resync

Preferred Read Failure Groups

Reasons for using redundancies (7)

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 20

A failure group is a set of ASM disks that share a common failure

mechanism, such as a set of SCSI disks that share a common

SCSI Controller

Per default, every ASM disk is a failure group

Redundant copies of file extent are stored in different FGs

ASM has to take care of fulfilling redundancies

Split Mirror – Building the mirror (1)

33 2 2

SQL> SELECT name, failgroup FROM v$asm_disk;

-- without specifying

NAME FAILGROUP -- a failure group

---------------- ----------------

U01A001 U01A001

U01B001 U01B001

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 21

Minimum number of failure groups depend on redundancy

Redundancy external → 1 FG #not specified during creation

Redundancy normal → 2 FG

Redundancy high → 3 FG

ASM Mirroring at different redundancies

external normal high

Origin AU

Copy AU

Copy of copy

n AU Number

Split Mirror – Building the mirror (2)

11 11 1 1 2 33 3332 2 22 3 2

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 22

Create a logical mirror within a diskgroup

A Failure Group is a logical mirror if 2 Failure Groups exist only

Split Mirror – Building the mirror (3)

CREATE DISKGROUP U01 NORMAL REDUNDANCY

FAILGROUP U01A DISK

'/dev/sdc1' NAME U01A001,

'/dev/sdc2' NAME U01A002

FAILGROUP U01B DISK

'/dev/sdd1' NAME U01B001,

'/dev/sdd2' NAME U01B002

ATTRIBUTE

'au_size'='4M'‚ --required

'compatible.asm' = '11.2',

'compatible.RDBMS' = '11.2',

'sector_size'='512';

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 23

Shutdown the RDBMS instance

Dismount the diskgroup

Physically remove the asm disk(s) belonging to one of two failure

groups

Mount the diskgroup with force option

RDBMS Instance can be started again

Add a new failure group and rebalance

Drop the missing failure group or wait til disk_repair_time is over

Split Mirror – Activities at source site

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 24

Physically adapt the asm disk(s) of the source site

Take care of init.ora

Check ownership

Update asm_diskstring with new devicename

Mount the diskgroup with force option

Cloned Database can be used now

Add a new failure group and monitor rebalancing

Drop the missing failure group

Split Mirror – Activities at auxiliary site

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 25

All involved file templates must have redundancy mirror or high

Think about changing instance name

Think about changing DBID

Think about changing init.ora parameters

instance name

db_create_file_dest

Think about changing service_names

Split Mirror – Remarks (1)

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 26

If you run into trouble with your naming concept, binary kfed is

your friend as it can be used to edit the ASM Disk header

Header of ASM Disk stores metadata information

The disks that belong to a disk group

The amount of space that is available in a disk group

The filenames of the files in a disk group

The location of disk group data file extents

Oracle ADVM volume information

Header contains a redo log that records information about

atomically changing metadata blocks

Header can be backed up and restored by using binary kfed

Split Mirror – Remarks (2)

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 27

Problem:

You are not sure about uniqueness of file templates

maybe a DBA changed a single template to redundancy high

Solution:

Be careful and use free_mb, which does not depend on redundancies

Or use ASM command line utility, especially free_mb

Filesystem Free Space Monitoring (1)

SELECT name, free_mb

FROM v$asm_disk;

asmcmd lsdg U02

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 28

Filesystem Free Space Monitoring (2)

© 201029

Filesystem Free Space Monitoring (3)

Thresholds (1)

29Storage Advantages by Oracle - Warum Redundancy Normal im ASM?

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 30

Example Metric: Used % of Safely Usable

Description This metric shows the percentage of safely usable space used by a disk

group. Usable free space of a disk group depends on the redundancy

Data Source

Used % of Safely Usable = 100 -

(usable_file_mb/usable_total_mb)*100

where usable_total_mb = total_mb -

required_mirror_free_mb)/redundancy_factor

total_mb and required_mirror_free_mb are derived from the view

column and redundancy factor is 1 for External Redundancy Disk

Group, 2 for Normal Redundancy Disk Group, and 3 for High

Redundancy Disk Group.

Filesystem Free Space Monitoring (4)

© 201031

Filesystem Free Space Monitoring (5)

Thresholds (2)

31Storage Advantages by Oracle - Warum Redundancy Normal im ASM?

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 32

Apply the following rules to the sum of space used by datafiles,

tempfiles and redo-logs:

For disk groups using external redundancy,every 100 GB of space need 1 MB of extra shared pool plus 2 MB

For disk groups using normal redundancy,

every 50 GB of space need 1 MB of extra shared pool plus 4 MB

For disk groups using high redundancy,

every 33 GB of space need 1 MB of extra shared pool plus 6 MB

Consider also the sum of space used by archived redo logs

if you are dealing with a huge Flash Recovery Area

ACFS Volumes also need resources

Shared Pool Usage - ASM Instance

SHARED_POOL_SIZE = '128M'

TBP

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 33

Query V$SGASTAT

to see how much memory is allocated for extent pointers in an

RDBMS instance. Doc ID 465039.1

Shared Pool Usage - RDBMS Instance (1)

SELECT * FROM V$SGASTAT

WHERE name= 'ASM extent pointer array';

© 2010Storage Advantages by Oracle - Warum Redundancy Normal im ASM? 34

Shared Pool Usage - RDBMS Instance (2)

© 201035

ASM Redundancies – Core Messages

Knowledge

transfer is only

the beginning.

Knowledge

application is

what counts.

You should use ASM

Yes, you can

There are good reasons for

redundacy normal

Split Mirror works

Rely on absolute (free space)/3 only

and read metric definitions carefully

Shared Pool Need is negligible

O-Storage - ASM ConceptsStorage Advantages by Oracle - Warum Redundancy Normal im ASM?

Basel · Baden Bern · Brugg · Lausanne Zurich Düsseldorf · Frankfurt/M. · Freiburg i. Br. Hamburg · Munich · Stuttgart · Vienna

Trivadis @ DOAG: 3th floor

Nr. 304

Ralf Moosandl

Senior Consultant, Trivadis AG

[email protected]