Sunteți pe pagina 1din 18

Unit 6:

Automatic Storage Management


Overview

© Copyright IBM Corporation 2013


Agenda
• Oracle ASM overview and concepts

• ASM implementation considerations

© Copyright IBM Corporation 2013


What is ASM?
• Automatic Storage Management
• Oracle alternative to conventional file
system and Logical Volume Application & Database
Management capabilities
File System
– With support for Oracle RAC
Logical Volume
• Simplified database storage ASM
management and provisioning
• Included in Oracle 11g at no additional Volume Manager
charge
Operating System

© Copyright IBM Corporation 2013


ASM concepts: Disk Group and Failure Group

• Disk groups are composed of one or more raw hdisks


– JBOD or RAID based LUNs
• May mirror data across multiple failure groups in disk group
(optional)
• Data is striped across the disks in a failure group
– 128 KB (fine) or 1 MB units (coarse)
• Disk group should consist of disks of equal capacity and
performance capabilities
• Disk Group can include:
1 2 n 1 2 n
– Control files Failure Group 1 Failure Group 2
– Online redo logs DATA_DISKGROUP
– Data files
– Spfiles
1 2 n 1 2 n
– RMAN backup files
Failure Group 1 Failure Group 2
– CRS files (OCR and voting disks)
Recovery_DISKGROUP

© Copyright IBM Corporation 2013


Oracle ACFS
• Oracle Automatic Storage Management Cluster File
System
• A cluster file system implemented as part of ASM
– Can be used as a shared filesystem for Oracle home binaries
• used to support many types of files maintained outside
of the Oracle database.
– BFILEs, database trace files, executables, report files and
even general purpose files like image, text, video, and audio
files.

© Copyright IBM Corporation 2013


Oracle Instances and Oracle ASM Storage

Oracle RAC
Oracle Oracle
Datab Datab
ase ase
Instan Instan
ce ce

ASM ASM
Instan Instan
ce ce

Disk Group A Disk Group B

© Copyright IBM Corporation 2013


Database Instance and with ASM Instance

Database Instance ASM Instance

ASMB

RBAL ARBn
RBAL DBWn

1 2 n 1 2 n 1 2 n 1 2 n
Failure Group 1 Failure Group 2 Failure Group 1 Failure Group 2

DATA_DISKGROUP Recovery_DISKGROUP

© Copyright IBM Corporation 2013


Disk Group Redundancy
• Mirror at Allocation Unit level
• ASM ensures that a primary AU and its mirror copy
never inside in the same failure group.
• ASM disk group support three types of redundancy:
– Normal redundancy: Two copies of data
• This is the default redundancy mode
• At least two failure groups
– High redundancy: Three copies of data
• At least three failure groups
– External redundancy: No mirroring in ASM
• Would normally be used for RAID protected storage, such as
DS4000, DS6000, DS8000

© Copyright IBM Corporation 2013


ASM striping granularity
• By default, stripe size is either 128 KB (fine) or 1 MB (coarse), depending on template
attributes for that particular file type:
– CONTROLFILE, DATAFILE, ONLINE LOG, ARCHIVELOG, TEMPFILE, BACKUPSET,
PARAMETERFILE, DATAGUARDCONFIG, FLASHBACK,
CHANGETRACKING, DUMPSET, XTRANSPORT, AUTOBACKUP
• Template attributes can be tailored for individual disk groups:
– ALTER DISKGROUP <diskgroup_name> ALTER TEMPLATE <tmpl> ATTRIBUTES (FINE)
• For databases larger than 10 TB, Oracle recommends increasing allocation unit size
(from 1 MB default to 16 MB) and setting attributes for all file templates to fine (1 MB)
to improve ASM file open performance and reduce memory requirements for storing
ASM metadata:
– _asm_ausize=16777216
– _asm_stripesize=1048576
• Above parameters apply to any newly created disk groups after ASM has been restarted
– ALTER DISKGROUP <diskgroup_name> ALTER TEMPLATE <tmpl> ATTRIBUTES (FINE)

© Copyright IBM Corporation 2013


Disk Group Rebalance and
Redistribution
• Disks can dynamically be added to disk
groups Before:
50 GB used on each
• Files are automatically redistributed, moving of 8 disks = 400 GB
only as much data as necessary
• Example:
– Add two drives to 8-disk disk group
– Move 20% of the data on each disk to the
new disks After:
40 GB used on each
• New init.ora parameter determines of 10 disks = 400 GB
redistribution priority:
– asm_power_limit
– range:0-11,default 1

© Copyright IBM Corporation 2013


Agenda
• Oracle ASM overview and concepts

• ASM implementation considerations

© Copyright IBM Corporation 2013


Oracle ASM recommendations
• Define a minimum of two disk groups
– One for database (.dbf) files
• May also contain secondary copies of recovery objects
– One for (primary copy of) recovery objects
• Logs
• Flashback recovery area
• RMAN backups
• ASM mirroring is not a substitute for redo log / control file
multiplexing

© Copyright IBM Corporation 2013


Is two ASM disk pools the right number?

• What is the impact of an unanticipated failure?


– RAID array catastrophic failure
– ASM disk group corruption
• Striping all database data in a single pool across all
available disks may result in unacceptable recovery times.
• Physically separating both (all) copies of recovery related
data from base database data may provide additional
data integrity protection and improve redo log
performance

© Copyright IBM Corporation 2013


Using ASM with IBM storage
• S8000/DS6000/ESS/SAN Volume Controller
• AIX
– Use SDDPCM with MPIO (root access required for
/dev/vpathxx devices)
• Linux
– SDD 1.6.0.0-15 and higher allows non-root access of
/dev/rvpathxx devices
• Set reserve_policy = no_reserve

© Copyright IBM Corporation 2013


What’s a physical volume identifier (PVID)?

• ID numbers used to track AIX physical volumes (PVs)


• Physically written on the disk (LUN) and registered in the ODM
• Must be set before disks can be assigned to a volume group and used by the Logical Volume
Manager (LVM)
• Preserves hdisk numbering across reboots and storage reconfigurations
• Can be displayed with ‘lspv’ command:

# lspv
hdisk0 00cb0e8fcc7ab6d2 rootvg active
hdisk1 002c41afc70de886 rootvg active
hdisk2 00ca00aeff4f4d42 oravg active
hdisk3 00ca00aeff5475ef None
hdisk4 none None
hdisk5 none None

• If PVIDs haven’t been system generated, they can be set or cleared with the ‘chdev’ command:

# chdev -l hdisk4 –a pv=yes


# chdev -l hdisk4 –a pv=clear

© Copyright IBM Corporation 2013


PVIDs and Oracle RAC/ASM
• For shared disks, hdisk numbering is not necessarily consistent
across nodes, so PVIDs can be helpful in identifying the same
physical disk on multiple nodes
• OCR and Voting devices are managed by ASM
• ASM managed disks
– ASM preserves its own mapping between LUNs and assignments
in ASM disk
– Some Oracle installation documentation recommends
temporarily setting PVIDs during the install process
– Assigning or clearing a PVID on an existing ASM managed disk will
overwrite the ASM header, making data unrecoverable without
the use of KFED (See Metalink Note # 353761.1)

© Copyright IBM Corporation 2013


Disk header (with PVID set)
# lspv |grep hdisk0
hdisk0 00cb0e8fcc7ab6d2 rootvg active
# lquerypv –h /dev/hdisk0
00000000 C9C2D4C1 00000000 00000000 00000000 |................|
00000010 00000000 00000000 00000000 00000000 |................|
00000020 00000000 00000000 00000000 00000000 |................|
00000030 00000000 00000000 00000000 00000000 |................|
00000040 00000000 00000000 00000000 00000000 |................|
00000050 00000000 00000000 00000000 00000000 |................|
00000060 00000000 00000000 00000000 00000000 |................|
PVID
00000070 00000000 00000000 00000000 00000000 |................|
00000080 00CB0E8F CC7AB6D2 00000000 00000000 |................|
00000090 00000000 00000000 00000000 00000000 |................|
000000A0 00000000 00000000 00000000 00000000 |................|
000000B0 00000000 00000000 00000000 00000000 |................|
000000C0 00000000 00000000 00000000 00000000 |................|
000000D0 00000000 00000000 00000000 00000000 |................|
000000E0 00000000 00000000 00000000 00000000 |................|
000000F0 00000000 00000000 00000000 00000000 |................|

© Copyright IBM Corporation 2013


Disk header (ASM disk)
# lspv |grep hdisk5
hdisk5 none None
# lquerypv –h /dev/hdisk5
00000000 00820101 00000000 80000000 E630223E |.............0">| ASM
00000010 00000000 00000000 00000000 00000000 |................| Header is
00000020 4F52434C 4449534B 00000000 00000000 |ORCLDISK........| present
00000030 00000000 00000000 00000000 00000000 |................|
00000040 0A100000 00000203 44415441 41524541 |........DATAAREA|
00000050 5F303030 30000000 00000000 00000000 |_0000...........|
00000060 00000000 00000000 44415441 41524541 |........DATAAREA|
00000070 00000000 00000000 00000000 00000000 |................| ASM
00000080 00000000 00000000 44415441 41524541 |........DATAAREA| Disk Group
00000090 5F303030 30000000 00000000 00000000 |_0000...........| Name
000000A0 00000000 00000000 00000000 00000000 |................|
000000B0 00000000 00000000 00000000 00000000 |................|
000000C0 00000000 00000000 01F607B0 076DCC00 |.............m..|
000000D0 01F60DA1 6B5CA400 02001000 00100000 |....k\..........|
000000E0 0001BC80 00002710 00000002 00000001 |......'.........|
000000F0 00000002 00000002 00000000 00000000 |................|

© Copyright IBM Corporation 2013

S-ar putea să vă placă și