ASM Fast Mirror Resync
Enabled when COMPATIBLE.RDBMS >=11.1
ASM fast mirror resync is used to deal with transient disk failures. When a disk goes offline, ASM tracks the extents that are modified during the outage. When the transient failure is repaired, ASM can quickly resynchronize only the disk extents that have been modified during the outage. Note that the tracking mechanism uses one bit for each modified extent and is very efficient.
When using ASM fast mirror resync, the failed disk is taken offline and if you set the
DISK_REPAIRE_TIME attribute for the correponding disk group, the disk won't be dropped. The setting for this attribute determines the duration of disk outages that ASM will tolerate while still being able to resynchronize after the failed disk is repaired. The default setting for the DISK_REPAIR_TIME attribute is
3.6 hours. If a disk remains offline longer than the DISK_REPAIR_TIME setting, the disk is dropped from the diskgroup and the diskgroup is rebalanced.
Controlling the Resources Used by Resync
Power limit an set for disk resync operations: It is conceptually similar to the power limit setting for disk group rebalance. The Range is 1 to 1024, and if not specified the default setting s 1
alter diskgroup DATA ONLINE DISK data_000 POWER 99;
asmcmd > online -g DATA -D data_000 --power 99
alter diskgroup DATA ONLINE ALL POWER 500
More Efficient Disk Replacement
Administrators have the option to replace disk as a fast and efficient operation. The replacement disk is populated with mirror copies of the ASM extents from from other disks and there is no need for reorganization or rebalancing of the disk group. The replacement disk takes the same name as the original disk and becomes part of the same failure group as the original disk.
alter diskgroup GLS_DATA replace disk DATA_0001 with '/dev/disk002';
Dealing with Transient Falure on a Failure Group
SQL> alter diskgroup DBA_GLS set attribute 'failgroup_repair_time'='48h';
Diskgroup altered.
With Oracle 12c, ASM provides administrators with the ability to specify a failure group repair time in addition to the disk repair time. The failure group repair time can be set by using a new disk group attribuute, FAILGROUP_REPAIRT_TIME. The default failure group repair time is 24 hours. Now by default, if all disks in a failure group fail simultaneously, ASM will not drop the disks when the disk repair time expires after 3.6 hrs. Rather, the administrator will have 24 hours to correct the failure. If the failure is corrected before the time expires, the disks are updated wusing a fast mirror resync. If the failure is not corrected in time, ASM must automatically drop all disks in the failure group.
Resync Time Estimate
Check v$ASM_OPERTION for resync operation estimate
select pass, state, est_minutes from v$asm_operation;
Resync Checkpoint and Auto-Restart
With Oracle 12c ASM interrupted resync operations are automatically restarted. The resync operations are broken into phases: A checkpoint marks the end of each resync phase, and stale extent metadata is cleared. Interrupted resync operations restart from the last checkpoint prior to the interruption.
Rebalance Work Estimates
Oracle 12c ASM, a more detailed and more accurate work plan is created at the begining of each rebalance operation. The admin can generate the work plan by using the EXPLAN WORK command and the work can be viewed in v$ASM_ESTIMATE view (EST_WORK column shows the ASM allocateion units to be moved).
SQL>
explain work set statement_id='Drop DATA_DISK15' for alter diskgroup DBA_DATA501 drop disk DATA_DISK15;
Explained.
SQL>
select est_work from v$asm_estimate where statement_id='Drop DATA_DISK15';
EST_WORK
----------
111168
Priority Ordered Rebalance
With Oracle 12c ASM, priority ordered rebalance is implemented. This capability helps to restoring the redundancy of critical files like control files and online redo logs to ensure that they're protected in case of a secondary failure occurs.
Proactively Validating Data Integrity
ASM 12c provides proactive scrubbing capabilities that check for logical corruptions and automatically repair them where possible. Two ways of scrubbing: On-demand by administrator on specific area, Occur as part of rebalance operation
SQL>
alter diskgroup DBA_GLS501 scrub repair;
Diskgroup altered.
SQL> a
lter diskgroup DBA_DATA501 scrub file '+DATA_DISK/GLSLAB/DATAFILE/system.553.826023617' repair wait;
Diskgroup altered.
SQL>
alter diskgroup DBA_DATA501 scrub disk DATA_DISK15 repair power max force;
Diskgroup altered
REPAIR: If the repair option is not specified, ASM only check and report logical corruption
POWER: LOW, HIGH, or MAX. If power is not specified, the scrubbing power is controlled based on the system I/O load
FORCE: Command is processed immediately regarless of system load
Proactive Content Checking during rebalance
Checks are automatic with automatic error correction for mirrored data and checks are enabled with the disk group attribute content.check
SQL>
alter diskgroup DBA_DATA501 set attribute 'content.check' = 'TRUE';
Diskgroup altered.
Managing Password Files in ASM
Create ASM password file
+ASM1 >
orapwd asm=y file='+GLS_DATA501' password='Password4dba'
Create database password file
ASMCMD>
pwcreate --dbuniquename GLSLAB +DBA_DATA laga4me
Locate password file
+ASM1 >
crsctl stat res ora.glslab.db -f | grep PWFILE
PWFILE=+DATA_DISK/GLSLAB/PASSWORD/pwdglslab.464.827084721
Specifying Content Type for a Disk Group
Possible values: data, recovery or system