260 likes | 394 Views
Storage Enhancements. Objectives. After completing this lesson, you should be able to: Set up ASM fast mirror resync Use ASM preferred mirror read Understand scalability and performance enhancements Set up ASM disk group attributes Use the SYSASM role
E N D
Objectives • After completing this lesson, you should be able to: • Set up ASM fast mirror resync • Use ASM preferred mirror read • Understand scalability and performance enhancements • Set up ASM disk group attributes • Use the SYSASM role • Use various new manageability options for CHECK, MOUNT, and DROP commands • Use the ASMCMD md_backup, md_restore, and repair extensions
1 2 3 4 Without ASM Fast Mirror Resync ASM redundancy used Disk access failure Secondaryextent Primaryextent Oracle Database 10gand 11g Disk added back:Extents rebalanced Disk automatically dropped:All dropped extents re-created
1 2 3 4 ASM Fast Mirror Resync: Overview ASM redundancy used Disk access failure Secondaryextent Primaryextent Oracle Database 11g Disk again accessible;need only to resync modified extents Failure time < DISK_REPAIR_TIME
Setting Up ASM Fast Mirror Resync ALTER DISKGROUP dgroupA SET ATTRIBUTE 'DISK_REPAIR_TIME'='3H'; ALTER DISKGROUP dgroupA OFFLINE DISKS IN FAILGROUP contrl2 DROP AFTER 5H; ALTER DISKGROUP dgroupA ONLINE DISKS IN FAILGROUP contrler2 POWER 2 WAIT; ALTER DISKGROUP dgroupA DROP DISKS IN FAILGROUP contrl2 FORCE;
ASM Preferred Mirror Read: Overview Site A Site B S P Site A Site B S P: Primary AU P S: Secondary AU
ASM Preferred Mirror Read: Setup Setup On first instance ASM_PREFERRED_READ_FAILURE_GROUPS=DATA.SITEA On second instance ASM_PREFERRED_READ_FAILURE_GROUPS=DATA.SITEB Monitor SELECT preferred_read FROM v$asm_disk; SELECT * FROM v$asm_disk_iostat;
ASM Preferred Mirror Read: Best Practice Two sites: normal redundancy Two sites: high redundancy P S P S P S S S Only two failure groups: one for each instance Max four failure groups: two for each instance Three sites: high redundancy P S S Only three failure groups: one for each instance
ASM Scalability and Performance Enhancements • Extent size grows automatically according to file size. • ASM supports variable extent sizes to: • Raise the maximum possible file size • Reduce memory utilization in the shared pool • There are no administration needs other than manual rebalance in case of important fragmentation.
ASM Scalability in Oracle Database 11g • ASM imposes the following limits: • 63 disk groups • 10,000 ASM disks • 4 petabytes per ASM disk • 40 exabytes of storage • 1 million files per disk group • Maximum file size: • External redundancy: 140 PB • Normal redundancy: 42 PB • High redundancy: 15 PB
SYSASM Role • Using the SYSASM role to manage ASM instances avoids overlap between DBAs and storage administrators. • SYSDBA will be deprecated: • Oracle Database 11g, Release 1 behaves as in 10g. • In future releases, SYSDBA privileges will be restricted in ASM instances. SQL> CONNECT / AS SYSASM SQL> CREATE USER username IDENTIFIED by passwd; SQL> GRANT SYSASM TO username; SQL> CONNECT username/passwd AS SYSASM; SQL> DROP USER username;
ASM Disk Group Compatibility • The compatibility of each disk group is separately controllable: • ASM compatibility controls ASM metadata on-disk structure. • RDBMS compatibility controls the minimum consumer client level. • This is useful with heterogeneous environments. • Setting disk group compatibility is irreversible. ASM instance DB instance ASM diskgroup COMPATIBLE.RDBMS >= COMPATIBLE <= <= COMPATIBLE COMPATIBLE.ASM
ASM Disk Group Attributes • Name • Property • Values • Description • au_size • C • 1|2|4|8|16|32|64MB • Size of allocation units in the disk group • compatible.rdbms • AC • Valid database version • Format of messages exchanged between DB and ASM • compatible.asm • AC • Valid ASM instance version • Format of ASM metadata structures on disk • disk_repair_time • AC • 0 M to 232 D • Length of time before removing a disk once OFFLINE • template.tname.redundancy • A • UNPROTECT|MIRROR|HIGH • Redundancy of specified template • template.tname.stripe • A • COARSE|FINE • Striping attribute of specified template C: CREATE A:ALTER CREATE DISKGROUP DATA NORMAL REDUNDANCY DISK '/dev/raw/raw1','/dev/raw/raw2' ATTRIBUTE 'compatible.asm'='11.1';
Enhanced Disk Group Checks • Disk group check syntax is simplified. • FILE and DISK options do the same as ALL. • Additional checks performed: • Alias • Directories ALTER DISKGROUP DATA CHECK;
Restricted Mount Disk Group for Fast Rebalance • A disk group can be mounted on a single instance only. • No database client or other ASM instance can obtain access. • Rebalance can proceed without locking overhead. ALTER DISKGROUP data DISMOUNT; 1 ALTER DISKGROUP data MOUNT RESTRICT; 2 Maintenance task: Add/Remove disks … 3 ALTER DISKGROUP data DISMOUNT; 4 ALTER DISKGROUP data MOUNT; 5
Mount Force Disk Group • By default, MOUNT is NOFORCE: • All disks must be available. • MOUNT with FORCE: • Offlines unavailable disks if quorum exists • Fails if all disks are available ALTER DISKGROUP data MOUNT [FORCE|NOFORCE];
Forcing Disk Group Drop • Allows users to drop disk groups that cannot be mounted • Fails if disk group is mounted anywhere DROP DISKGROUP data FORCE INCLUDING CONTENTS;
md_restore md_backup repair lsdsk ASMCMD Extensions User-created directoriesTemplatesDisk group compatibilityDisk group nameDisk names and failure groups full $ asmcmd help nodg newdg
ASMCMD Extensions: Example ASMCMD> md_backup –b jfv_backup_file -g data Disk group to be backed up: DATA# Current alias directory path: jfv ASMCMD> 1 Unintentional disk group drop 2 ASMCMD> md_restore -b jfv_backup_file -t full -g data Disk group to be restored: DATA# ASMCMDAMBR-09358, Option -t newdg specified without any override options. Current Diskgroup being restored: DATA Diskgroup DATA created! User Alias directory +DATA/jfv created! ASMCMD> 3 Restore disk group files by using RMAN 4
Summary • In this lesson, you should have learned how to: • Set up ASM fast mirror resync • Use ASM preferred mirror read • Set up ASM disk group attributes • Use the SYSASM role • Use various new manageability options for CHECK, MOUNT, and DROP commands • Use the ASMCMD md_backup, md_restore, and repair extensions
Practice 2: Overview • This practice covers the following topics: • Using ASM fast mirror resync • Using ASMCMD extensions