You are on page 1of 8

Changing ASM Rebalance Power of an Ongoing Operation

Alejandro Vargas
Principal Support Consultant
Oracle Advanced Support Services

INDEX
Check the Mapping of The ASM disks to remove...............................................................................................................2
Removing ASM Disks from DATA diskgroup for IO test.....................................................................................................3
Drop ASM disks..............................................................................................................................................................3
Check the rate of rebalance............................................................................................................................................4
Change the Rebalance Power........................................................................................................................................4
Check the Progress of the Rebalance Operation............................................................................................................5
Check the rbal Processes Spawned at the OS...............................................................................................................6
Check status once removal finish...................................................................................................................................6
Removing the Devices from ASM.......................................................................................................................................7
Check the Physical devices before removing them from ASM........................................................................................7
Remove the disks from ASM...........................................................................................................................................8

Page 1 of 8
7/2/2008

Changing ASM Rebalance Power of an Ongoing Operation


Check the Mapping of The ASM disks to remove
To check the mapping of your ASM disks on Linux you can use this script:
---------- start here -----------#!/bin/ksh
for i in `/etc/init.d/oracleasm listdisks`
do
v_asmdisk=`/etc/init.d/oracleasm querydisk $i | awk '{print $2}'`
v_minor=`/etc/init.d/oracleasm querydisk $i | awk -F[ '{print $2}'| awk -F] '{print $1}' |
awk '{print $1}'`
v_major=`/etc/init.d/oracleasm querydisk $i | awk -F[ '{print $2}'| awk -F] '{print $1}' |
awk '{print $2}'`
v_device=`ls -la /dev | grep $v_minor | grep $v_major | awk '{print $10}'`
echo "ASM disk $v_asmdisk based on /dev/$v_device [$v_minor $v_major]"
done
---------- finish here ------------

ASM
ASM
ASM
ASM

Page 2 of 8
7/2/2008

disk
disk
disk
disk

"VOL15"
"VOL16"
"VOL17"
"VOL18"

based
based
based
based

on
on
on
on

/dev/sda1
/dev/sdb1
/dev/sdc1
/dev/sdd1

[94,
[94,
[94,
[94,

173]
177]
181]
185]

Changing ASM Rebalance Power of an Ongoing Operation


Removing ASM Disks from DATA diskgroup for IO test

Drop ASM disks


Once you have checked which are the ASM disks you need to remove you can remove them using the Alter
Diskgroup Command
SQL>

ALTER DISKGROUP DataDG drop disk VOL18, VOL17, VOL16, VOL15;

Diskgroup altered.
Once the ASM disks are dropped the data on them is rebalanced over to the remaining disks, until this operation is
completed you should not touch the underlying physical devices.

Page 3 of 8
7/2/2008

Changing ASM Rebalance Power of an Ongoing Operation


Check the rate of rebalance.
SQL> select sysdate, GROUP_NUMBER, OPERATION,
STATE, POWER, ACTUAL, SOFAR, EST_WORK,
EST_RATE, EST_MINUTES
from v$asm_operation;

SYSDATE
GROUP_NUMBER OPERA STAT
POWER
ACTUAL
SOFAR
EST_WORK
EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------02/07/08 16:32
2 REBAL RUN
1
1
2364
15437
300
43

SQL> /
SYSDATE
GROUP_NUMBER OPERA STAT
POWER
ACTUAL
SOFAR
EST_WORK
EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------02/07/08 16:38
2 REBAL RUN
1
1
3910
20912
287
59

Change the Rebalance Power


Having noticed that performance was bad, the total amount of space of these disks was 12 GB so the rebalance
should have finished quickly, instead the estimated minutes increased, so I have decided to change the rebalance
power to 6. With 6 processes the rebalance did finish much faster.
SQL> alter diskgroup MOE_DATA rebalance power 6;
Diskgroup altered.

Page 4 of 8
7/2/2008

Changing ASM Rebalance Power of an Ongoing Operation


Check the Progress of the Rebalance Operation
SQL> select sysdate, GROUP_NUMBER, OPERATION,
STATE, POWER, ACTUAL, SOFAR, EST_WORK,
EST_RATE, EST_MINUTES
from v$asm_operation;

SYSDATE
GROUP_NUMBER OPERA STAT
POWER
ACTUAL
SOFAR
EST_WORK
EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------02/07/08 16:44
2 REBAL RUN
6
6
4584
24524
974
20
SQL> /
SYSDATE
GROUP_NUMBER OPERA STAT
POWER
ACTUAL
SOFAR
EST_WORK
EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------02/07/08 16:57
2 REBAL RUN
6
6
17942
35812
1175
15
SQL> /
SYSDATE
GROUP_NUMBER OPERA STAT
POWER
ACTUAL
SOFAR
EST_WORK
EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------02/07/08 17:06
2 REBAL RUN
6
6
27084
38004
960
11
SQL> /
SYSDATE
GROUP_NUMBER OPERA STAT
POWER
ACTUAL
SOFAR
EST_WORK
EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------02/07/08 17:09
2 REBAL RUN
6
6
29619
38650
962
9
SQL> /
SYSDATE
GROUP_NUMBER OPERA STAT
POWER
ACTUAL
SOFAR
EST_WORK
EST_RATE EST_MINUTES
-------------- ------------ ----- ---- ---------- ---------- ---------- ---------- ---------- ----------02/07/08 17:13
2 REBAL RUN
6
6
33519
39601
934
6

Page 5 of 8
7/2/2008

Changing ASM Rebalance Power of an Ongoing Operation


Check the rbal Processes Spawned at the OS
avargas-il:~ # ps -efa | grep asm_arb
oracle
5642
1 0 16:38 ?
oracle
5644
1 0 16:38 ?
oracle
5646
1 0 16:38 ?
oracle
5648
1 0 16:38 ?
oracle
5650
1 0 16:38 ?
oracle
5652
1 0 16:38 ?

00:00:00
00:00:00
00:00:00
00:00:00
00:00:00
00:00:00

asm_arb0_+ASM
asm_arb1_+ASM
asm_arb2_+ASM
asm_arb3_+ASM
asm_arb4_+ASM
asm_arb5_+ASM

Check status once removal finish


SQL> select NAME,PATH,MOUNT_STATUS,STATE from v$asm_disk
where path in ('ORCL:VOL18','ORCL:VOL17','ORCL:VOL16','ORCL:VOL15');
NAME
PATH
MOUNT_S STATE
---------- -------------------- ------- -------ORCL:VOL15
CLOSED NORMAL
ORCL:VOL18
CLOSED NORMAL
ORCL:VOL17
CLOSED NORMAL
ORCL:VOL16
CLOSED NORMAL

Page 6 of 8
7/2/2008

Changing ASM Rebalance Power of an Ongoing Operation


Removing the Devices from ASM
avargas-il > su Password:
avargas-il:~
Disk "VOL15"
avargas-il:~
Disk "VOL16"
avargas-il:~
Disk "VOL17"
avargas-il:~
Disk "VOL18"

# /etc/init.d/oracleasm querydisk VOL15


is a valid ASM disk on device [94, 173]
# /etc/init.d/oracleasm querydisk VOL16
is a valid ASM disk on device [94, 177]
# /etc/init.d/oracleasm querydisk VOL17
is a valid ASM disk on device [94, 181]
# /etc/init.d/oracleasm querydisk VOL18
is a valid ASM disk on device [94, 185]

Check the Physical devices before removing them from ASM


avargas-il:~
brw-rw---avargas-il:~
brw-rw---avargas-il:~
brw-rw---avargas-il:~
brw-rw----

Page 7 of 8
7/2/2008

#
1
#
1
#
1
#
1

ls -l /dev/| grep 94, | grep 173


root disk 94, 273 Jun 12 2007 dsda1
ls -l /dev/| grep 94, | grep 177
root disk 94, 277 Jun 12 2007 dsdb1
ls -l /dev/| grep 94, | grep 181
root disk 94, 281 Jun 12 2007 dsdc1
ls -l /dev/| grep 94, | grep 185
root disk 94, 285 Jun 12 2007 dsde1

Changing ASM Rebalance Power of an Ongoing Operation


Remove the disks from ASM
avargas-il:~ # /etc/init.d/oracleasm
Removing ASM disk "VOL15":
avargas-il:~ # /etc/init.d/oracleasm
Removing ASM disk "VOL16":
avargas-il:~ # /etc/init.d/oracleasm
Removing ASM disk "VOL17":
avargas-il:~ # /etc/init.d/oracleasm
Removing ASM disk "VOL18":
avargas-il:~ # /etc/init.d/oracleasm
Scanning system for ASM disks:
End of Report

Page 8 of 8
7/2/2008

deletedisk VOL15
done
deletedisk VOL16
done
deletedisk VOL17
done
deletedisk VOL18
done
scandisks
done

You might also like