Oracle 11g ASM Enhancements - oracle-info

Download Report

Transcript Oracle 11g ASM Enhancements - oracle-info

ASM 11g R1/R2 Enhancements
Suresh Gandhi
}
Agenda
} R1 Enhancements
–
–
–
–
–
–
–
–
–
New Disk Group Compatibility Attributes
Fast Mirror Resync
Rolling Upgrade
SYSASM Privilege and OSASM OS Group
Scalability and Performance Enhancements
New ASMCMD Commands and Options
Preferred Read Failure Groups
Fast Rebalance
Miscellaneous Disk Group Maintenance Enhancements
} R2 Enhancements
–
–
–
–
–
–
–
ASM Cluster File System (ACFS)
ASM Dynamic Volume Manager (ADVM)
ASM FS Snapshot
Oracle Cluster registry OCR and Voting Disk on ASM
ASM Intelligent Data Placement
ASM Storage Management Configuration Assitant
ASM File Access Control
} Some Practices on new
–
–
Database Home on ACFS Filesystem
Invoking ASMCMD Commands for volume management
}
ASM How it works
Database File Open
RDBMS
Server
ASM
- File Layout Info
I/O
Create File
- Health Info
Extent Map
OS / ADVM
ASM Manages Metadata
Disk Group
Not in I/O Path
RAW Performance
Disk Group
Allocation
File
- Update Statistics
}
Some Important Notes on ASM:
} Oracle ASM Storage Limits
– Oracle ASM provides near unlimited capacity for future growth, but does have some storage limits.
For example, Oracle ASM has the following limits on the number of disk groups, disks, and files:
} 63 disk groups in a storage system
} 10,000 Oracle ASM disks in a storage system
} 1 million files for each disk group
} Without any Oracle Exadata Storage, Oracle ASM has these storage limits:
} 2 terabytes (TB) maximum storage for each Oracle ASM disk
} 20 petabytes (PB) maximum for the storage system
} With all Oracle Exadata Storage, Oracle ASM has these storage limits:
} 4 PB maximum storage for each Oracle ASM disk
} 40 exabytes (EB) maximum for the storage system
} The maximum size limit of a disk group equals the maximum disk size multiplied by the maximum number
of disks in a disk group (10,000).
} File size limits are dependent on the value of the disk group compatibility attributes. Oracle ASM supports
file sizes greater than 128 TB in any redundancy mode when the COMPATIBLE.RDBMS disk group
attribute is set greater than10.1.
} If COMPATIBLE.RDBMS is set to 10.1, the file size limits are less. For example, with
COMPATIBLE.RDBMS equal to 10.1 and the AU size equal to 1 MB, Oracle ASM file size limits are:
} External redundancy: 35 TB
} Normal redundancy: 5.8 TB
– High redundancy: 3.9 TB
}
R1 – New Disk Group Compatibility Attributes
} Oracle 11g ASM includes two new compatibility attributes that determine the version of
the ASM and database software that can use specific disk groups:
} COMPATIBLE.ASM - The minimum version of the ASM software that can access the disk group. In 11g, the
default setting is 10.1.
} COMPATIBLE.RDBMS - The minimum COMPATIBLE database initialization parameter setting for any database instance
that uses the disk group. In 11g, the default setting is 10.1.
} SQL> CREATE DISKGROUP data DISK '/dev/raw/*' ATTRIBUTE 'compatible.asm' = '11.1';
} SQL> CREATE DISKGROUP data DISK '/dev/raw/*' ATTRIBUTE 'compatible.rdbms' = '11.1', 'compatible.asm' =
'11.1';
Note:- The compatibility versions of a disk group can only be increased, not decreased. If you have increased the version by mistake, you will need to
create a new disk group.
} SELECT group_number, name, compatibility, database_compatibility FROM
v$asm_diskgroup;
GROUP_NUM# NAME
COMPATIBILITY DATABASE_COMPATIBILI
--------------------- --------------------------------------1
DATA
11.1.0.0.0
11.1.0.0.0
}
R1 - Fast Mirror Resync
} During transient disk failures within a failure group, ASM keeps track
of the changed extents that need to be applied to the offline disk.
Once the disk is available, only the changed extents are written to
resynchronize the disk, rather than overwriting the contents of the
entire disk. This can speed up the resynchronization process
considerably.
} Applicable only when Disk Compatable Attribute set to 11.1.0 or
higher
} Default time to repair the disk is 3.6 hrs determine by
DISK_REPAIR_TIME attribute
} Can override by using Alter disk offline disk clause.
}
R1 - Scalability and Performance Enhancements
} ASM files are stored in a disk group as a collection of extents
} Oracle 10g each extent mapped directly to one allocation unit (AU)
} In 11G,
– an extent can be made up of one or more allocation units
– As files get larger, the extent size can grow to reduce the size of the
extent map describing the file
– When the disk group compatibility attributes are set to 11.1 or higher,
} The first 20,000 extents match the allocation unit size (1*AU)
} The next 20,000 extents are made up of 8 allocation units (8*AU).
} Beyond that point, the extent size becomes 64 allocation units (64*AU).
} Also controls or enhances the AU size by specifying 'au_size' disk
attribute
} CREATE DISKGROUP disk_group_2 EXTERNAL REDUNDANCY DISK
'/dev/sde1' ATRRIBUTE 'au_size' = '32M';
} Values can be ranging from 1M to 64M
}
R1 - Preferred Read Failure Groups
} In Oracle 10g, ASM always reads the primary copy of the mirrored
extent set.
} This isn't a problem when both nodes and both failure groups are all
located in the same site, but it can be inefficient for extended
clusters, causing needless network traffic.
} Oracle 11g allows each node to define a preferred failure group,
allowing nodes in extended clusters to access local failure groups in
preference to remote ones
} Instance Level Parameter ASM_PREFERRED_READ_FAILURE_GROUPS
must be set for each node
Example:SQL> ALTER SYSTEM SET ASM_PREFERRED_READ_FAILURE_GROUPS =
'data.data_0000', 'data.data_0001', 'data.data_0002';
}
R1 - Fast Rebalance
} The "ALTER DISKGROUP ... MOUNT" statement allows disk groups to be mounted in restricted
mode.
} Using RESTRICTED mode improves the performance of rebalance operations in a RAC
environment as it elimitates the need for lock and unlock extent map messaging that occurs
between ASM instances
SQL> SELECT name FROM v$asm_diskgroup;
NAME
-----------------------------DATA
SQL> ALTER DISKGROUP data DISMOUNT;
Diskgroup altered.
SQL> ALTER DISKGROUP data MOUNT RESTRICTED;
Diskgroup altered.
SQL> ALTER DISKGROUP data DISMOUNT;
Diskgroup altered.
SQL> ALTER DISKGROUP data MOUNT;
Diskgroup altered.
}
R1 - Disk Group Maintenance Enhancements
} The CHECK clause of the ALTER DISKGROUP command has been simplified so there are only
two options, NOREPAIR and REPAIR, available, with NOREPAIR as the default. Summarized
errors are displayed, with full error messages writen to the alert log.
– ALTER DISKGROUP data CHECK; -- Like NOREPAIR
– ALTER DISKGROUP data CHECK NOREPAIR;
– ALTER DISKGROUP data CHECK REPAIR;
} The ALTER DISKGOUP command now includes ONLINE and OFFLINE clauses so disks can be
taken offline for repair before being brought back online.
– -- Individual disks.
}
}
ALTER DISKGROUP data OFFLINE DISK 'disk_0000', 'disk_0001';
ALTER DISKGROUP data ONLINE DISK 'disk_0000', 'disk_0001';
– -- Failure groups.
}
}
ALTER DISKGROUP data OFFLINE DISKS IN FAILGROUP 'fg_0000';
ALTER DISKGROUP data ONLINE DISKS IN FAILGROUP 'fg_0000';
– -- Bring online all disks in disk group.
}
ALTER DISKGROUP data ONLINE ALL;
} Disk groups that can't be mounted by ASM can now be dropped using the FORCE keyword of the
DROP DISKGROUP command.
}
DROP DISKGROUP data FORCE;
}
R1-ASMCMD new commands
}
}
}
}
}
Md_backup:MD_Restore
CP
Startup
remap
}
ASM – Extending to Manage ALL DATA
}
R2 - ASM Dynamic Volume Manager (ADVM)
} The ASM Dynamic Volume Manager (DVM) is a kernel-loadable
device driver that provides a standard device driver interface to
clients (for example, ACFS).
} The ASM Dynamic Volume Manager (DVM) provides a standard I/O
interface allowing general purpose file systems to leverage the full
functionality of ASM as a volume manager
} Oracle database files as well as non-Oracle database files, for
example Oracle binaries, can now reside on ACFS eliminating the
need for third-party file systems or volume managers to host general
purpose files.
}
R2 – ASM Cluster File System
} a robust, modern, general purpose file system for files beyond the
Oracle database files.
} ACFS provides support for files such as Oracle binaries, report files,
trace files, alert logs, and other application data files.
} ACFS is highly available leveraging the ASM mirroring and striping
features in addition to hardware Redundant Array of Inexpensive
Disks (RAID) functionality.
} ACFS supports large files with 64-bit file and file system data
structure sizes leading to exabyte-capable file and file system
capacities
}
R2 – ASM Snapshots
} ASM FS Snapshot is a point-in-time copy of a file system and can provide up to 64
snapshot images. ASM FS Snapshot performs fast creation of persistent ASM FS
images at a specific point-in-time with low overhead leveraging the Copy on Write
technology.
} Read-only ASM FS Snapshots can be generated on an interval basis. They may reside
in existing ASM FS storage or in an additional storage device and persist following a
system restart.
} Even as the file system changes, the snapshot does not, giving you the ability to view
the file system as it was at the time the snapshot was created. Initially, snapshots are
read-only, which preserves their point-in-time capture. The following are the benefits of
ASM FS Snapshots:
– ASM FS Snapshots can be used as a source for backup. The original file system can continue
to change but the static nature of the snapshot makes them ideal as a source for backup
without keeping the original file system offline.
– ASM FS Snapshots can be used as a means for you to recover accidentally deleted or
modified files.
– ASM FS Snapshots can be used as a source for data mining or report applications which need
to work on a static, point-in-time data set.
}
R2 – Cluster Registry (OCR)/Voting Disk on ASM
} Automatic Storage Management (ASM) disks are used to store the Oracle
Cluster Registry (OCR) and the voting disks. ASM Partnership and Status
Table (PST) is replicated on multiple disks and is extended to store the OCR.
Consequently, the OCR tolerates loss of the same number of disks as the
underlying disk group. OCR is relocated in response to disk failures.
} ASM reserves a number of blocks at a fixed location of every ASM disk for
storing the voting disk. Should the disk holding the voting disk fail, ASM
selects another disk to store this data.
} Storing the OCR and the voting disk on ASM eliminates the need to use
expensive third-party cluster volume managers or deal with the complexity of
managing disk partitions for OCR and voting disks in Oracle RAC
configurations.
} Create DISKGROUP contains the option for REGULAR or QUORUM Disks
} The FAILGROUP_TYPE column in both the V$ASM_DISK and
V$ASM_DISK_STAT views specifies failure group type. The value for this
column is REGULAR for regular failure groups and QUORUM for quorum
failure groups.
}
R2 – Intelligent Data Placement
} Disk drives have higher transfer rates and bytes per track on the outer tracks. This
makes it preferable to keep the hotter data closer to the edge of the disk; that is, the
lower numbered blocks.
} This feature enables ASM to identify higher performance disk regions. Most frequently
accessed ASM files can be marked to be moved into the hot region and take
advantage of higher I/O performance (for example, hot tablespaces and indices) and
able to better meet the application I/O demand.
} This feature is only applicable when whole physical disks are presented to ASM versus
local unit numbers (LUN).
} Most frequently accessed Oracle database files in ASM disk groups (ASM files) can be
placed in hot disk regions to deliver higher bandwidth and reduce seek latency to meet
the application I/O performance requirements.
} Examples:} Volume
–
Ex:- volcreate –G Test -s 10G –primary hot/cold TEST_VOL
} Diskgroup
–
Ex:-alter diskgroup data add template hotfiles attributes (hot mirrorhot);
} Files
–
Ex:- ALTER DISKGROUP ASMDISK01 MODIFY FILE '+ASMDISK01/BDBE01/DATAFILE/APP_DATA.256.697380955'
ATTRIBUTES (HOT)
}
Practices/References
} Practice view
} ASMCMD references with releases
}
References:} Most useful information querying V$ views for ASM
– http://database.in2p3.fr/doc/oracle/Oracle_Database_11_Release_1_(11.
2)_Documentation/server.112/e10500/asmviews.htm
Storage Administrator Guide
http://database.in2p3.fr/doc/oracle/Oracle_Database_11_Release_1_(11.2)
_Documentation/server.112/e10500/asmviews.htm
Best book on ASM
Oracle Automatic Storage Management: Under-the-Hood & Practical
Deployment Guide by Nitin Vengurlekar, Murali Vallath, Rich Long itin
Vengulerkar – ASM
Q &A