Disclaimer

Sunday 11 July 2021

What is ASM Scrubbing

ASM Scrubbing is a process of checking logical data corruption and repair them automatically. obviously this works with normal and high redundancy disks groups.

The scrubbing process repairs logical corruptions using the mirror disks


ASM disk scrubbing can be done at following levels:

- data file level:
SQL> alter diskgroup data scrub file '+data/orcl/datafile/example.266.806582193' repair power high force;

- specific disk level:
SQL> alter diskgroup data scrub disk data_0005 repair power high force;

- ASM disk group level:
SQL> alter diskgroup data scrub power low;


The "scrub" argument takes the following options:
scrub  . . . repair:   
This option automatically repairs disk corruptions. If the "repair" keywords is not used, Oracle will only identify corruptions and will not fix them:

scrub . . . power:  
If the "power" argument is specified with data scrubbing, you can have several levels of power:
power low
power auto --> default
power high
power max

scrub . . . wait: the command returns after the scrubbing operation has completed If the WAIT option is not specified, the scrubbing operation is added into the scrubbing queue and the command returns immediately

scrub . . . force: If the optional FORCE option is specified, the command is processed even if the system I/O load is high or scrubbing has been disabled internally at the system level


How to Monitor ASM Scrubbing

You can monitor the scrubbing progress from V$ASM_OPERATION view.

Which Background Processes are Responsible to Perform ASM Scrubbing Operations


SCCn - ASM disk scrubbing slave check process responsible to performs the checking operations. The possible processes are SCC0-SCC9.
SCRn - ASM disk scrubbing slave repair process this process performs actual repair operation. The possible processes are SCR0-SCR9. 
SCVn - ASM disk scrubbing slave verify process. It performs the verifying operations. The possible processes are SCV0-SCV9.

Lets quickly wrap up the post with an example
Check Out Corrupting Oracle Database Block Intensely to corrupt an Oracle Database Block

SQL> alter diskgroup TEST_DATA scrub file '+TEST_DATA/WDTESTDBA/DATAFILE/TRACE_DATA.256.984068463';
Diskgroup altered.


👉ASM Alert Log Extract
Starting background process SCRB
2018-08-16T12:33:10.586097+02:00
SCRB started with pid=30, OS id=25618
2018-08-16T12:33:10.587580+02:00
SUCCESS: alter diskgroup TEST_DATA scrub file '+TEST_DATA/WDTESTDBA/DATAFILE/TRACE_DATA.256.984068463'
2018-08-16T12:33:24.032471+02:00
NOTE: Corrupted block 132 found in file +TEST_DATA/WDTESTDBA/DATAFILE/TRACE_DATA.256.984068463
2018-08-16T12:33:24.834625+02:00
NOTE: Corrupted block 133 found in file +TEST_DATA/WDTESTDBA/DATAFILE/TRACE_DATA.256.9840684632018-08-16T12:37:08.635287+02:00


SQL> alter diskgroup TEST_DATA scrub file '+TEST_DATA/WDTESTDBA/DATAFILE/TRACE_DATA.256.984068463' repair;
Diskgroup altered.

👉ASM Alert Log Extract
2018-08-16T12:50:03.547059+02:00
SUCCESS: alter diskgroup TEST_DATA scrub file '+TEST_DATA/WDTESTDBA/DATAFILE/TRACE_DATA.256.984068463' repair
2018-08-16T12:50:16.772754+02:00
NOTE: Corrupted block 132 found in file +TEST_DATA/WDTESTDBA/DATAFILE/TRACE_DATA.256.984068463
2018-08-16T12:50:17.759785+02:00
NOTE: Scrubbing repair block 132 in file 256.984068463 in slave
2018-08-16T12:50:17.798021+02:00
NOTE: Corrupted block 133 found in file +TEST_DATA/WDTESTDBA/DATAFILE/TRACE_DATA.256.984068463
2018-08-16T12:50:18.786455+02:00
NOTE: Scrubbing repair block 133 in file 256.984068463 in slave





No comments:

Post a Comment

100 Oracle DBA Interview Questions and Answers

  Here are 100 tricky interview questions tailored for a Senior Oracle DBA role. These questions span a wide range of topics, including perf...