Friday, October 28, 2022

Oracle ASM Rebalancing ETA Script

Oracle ASM tries to keep a rebalance I/O for each unit of power. Each I/O requires PGA memory for the extent involved in the relocation. If a rebalance is in progress because a disk is manually or automatically dropped, then increasing the power of the rebalance shortens the time frame during which redundant copies of that data on the dropped disk are reconstructed on other disks. Following shell script embeds the query to obtain the ETA for your ASM rebalancing operation.

#!/bin/sh

export ORACLE_SID=+ASM1

export ORACLE_HOME=/u01/app/11.2.0.2/grid

export PATH=$ORACLE_HOME/bin:$PATH


export pct=0

while [ $pct -lt 99 ]

do

export pct=`sqlplus -S / as sysdba<<EOF

set echo off feed off head off

select trunc(sofar/est_work*100) from gv\\$asm_operation;

exit

EOF

`

echo $pct

sleep 60

done


I hope this helps.

No comments: