Disclaimer

Wednesday, 27 November 2024

ASM Scrubbing Overview

 

ASM Scrubbing Overview

ASM Scrubbing is a feature in Oracle Automatic Storage Management (ASM) designed to detect and repair logical data corruption. 

It ensures data integrity by using the redundancy of disk groups, such as normal or high redundancy, to repair corrupted blocks by reading the data from mirror copies.





Key Points About ASM Scrubbing

  1. Repair Mechanism:

    • Repairs logical corruptions using mirror copies.
    • Detects issues even without the "repair" option, allowing for manual intervention if needed.
  2. Levels of Scrubbing:

    • Data File Level:
      ALTER DISKGROUP DATA01 SCRUB FILE '+DATA01/orcl/datafile/example.266.806582193' REPAIR POWER HIGH FORCE;
    • Specific Disk Level:
      ALTER DISKGROUP DATA01 SCRUB DISK data_0005 REPAIR POWER HIGH FORCE;
    • Disk Group Level:
      ALTER DISKGROUP DATA01 SCRUB POWER LOW;
  3. Scrub Options:

    • REPAIR: Automatically fixes detected corruptions.
    • POWER: Controls the priority and resources for scrubbing.
      • Options: LOW, AUTO (default), HIGH, MAX.
    • WAIT: Ensures the command completes before returning control.
    • FORCE: Forces scrubbing to proceed even under high system load.
  4. Monitoring Progress:

    • Use the V$ASM_OPERATION view to track ongoing scrubbing tasks:
      SELECT * FROM V$ASM_OPERATION;
  5. Background Processes Involved:

    • SCRB: Master process that coordinates scrubbing.
    • SCCn: Slave processes for checking operations (SCC0 to SCC9).
    • SCRn: Slave processes for repair operations (SCR0 to SCR9).
    • SCVn: Slave processes for verification operations (SCV0 to SCV9).




Example: ASM Scrubbing in Action

1. Initiate Scrubbing on a Specific File

ALTER DISKGROUP DATA01 SCRUB FILE '+DATA01/WDTESTDBA/DATAFILE/TRACE_DATA.256.984068463';


ASM Alert Log Output:

2024-08-16T12:33:10.586097+02:00
SCRB started with pid=30, OS id=25618 SUCCESS: alter diskgroup TEST_DATA scrub file '++DATA01/WDTESTDBA/DATAFILE/TRACE_DATA.256.984068463' NOTE: Corrupted block 132 found in file ++DATA01/WDTESTDBA/DATAFILE/TRACE_DATA.256.984068463 NOTE: Corrupted block 133 found in file +DATA01/WDTESTDBA/DATAFILE/TRACE_DATA.256.984068463


2. Repair Corruption

ALTER DISKGROUP DATA01 SCRUB FILE '+DATA01/WDTESTDBA/DATAFILE/TRACE_DATA.256.984068463' REPAIR;

ASM Alert Log Output:


SUCCESS: alter diskgroup DATA01 scrub file '++DATA01/WDTESTDBA/DATAFILE/TRACE_DATA.256.984068463' repair NOTE: Scrubbing repair block 132 in file 256.984068463 in slave NOTE: Scrubbing repair block 133 in file 256.984068463 in slave





Summary

ASM Scrubbing provides a robust mechanism to maintain data integrity in Oracle ASM environments by leveraging redundancy and proactive checks. Understanding its options and monitoring tools ensures efficient handling of disk group health and performance.




No comments:

Post a Comment

How to recovery PDB when PDB database is dropped in Oracle

  How to recovery PDB when PDB database is dropped :) [oracle@rac01 ~]$ sqlplus '/as sysdba' SQL*Plus: Release 21.0.0.0.0 - Product...