Wednesday, August 6, 2014

ADDING NEW DISK TO THE EXISTING DISK GROUP/REBALANCING EXISTING DISK GROUP

Things to consider while adding new disk/ Rebalancing existing Disk Group

1)         Make sure the disk are visible on all the cluster nodes; Disk readiness purely depend on the Os & version;

For ex:
Linux 5 – we will be using oracleasm as utility
Linux 6 – we will be using udev utility

2)         When you are planning to add disk to the disk group on the primary database, try to do it when database is having less load.

3)         Increase the ASM power limit to 9 or 10, depending on your environment. Once the rebalancing is completed, bring it to the original value.
Parameter è asm_power_limit
To increase or decrease the asm_power_limit

SQL> alter system set asm_power_limit=9; -- you need to issue it in the ASM instance.

4)         Add disks to one disk group at a time because rebalancing might cause the slowness to the database.

5)         Have a eye on the alert log of the ASM instance. If you are using cluster databases then you need to have a eye on all the instances in the cluster.

6)         You can monitor the rebalancing on the ASM instance using the below query
select group_number, operation, state, power, actual, sofar, est_work, est_rate, est_minutes from gv$asm_operation;

7)         you can check the size of the diskgroup before & after adding the Diskgroup in the ASM.
$ asmcmd –p
ASMCMD> lsdg BHU_B_SYSTEM

8)         Messages in the alert, when the rebalancing starts & when it completes
Disk added on the Node#1 and final status updates on the Node#2

-On Node One
Wed Aug 06 17:09:43 2014
SQL> ALTER DISKGROUP BHU_B_SYSTEM ADD  DISK '/dev/mapper/BHU_B_SYSTEM_05' SIZE 51200M /* ASMCA */
NOTE: GroupBlock outside rolling migration privileged region
NOTE: Assigning number (21,4) to disk (/dev/mapper/BHU_B_SYSTEM_05)
NOTE: requesting all-instance membership refresh for group=21
NOTE: initializing header on grp 21 disk BHU_B_SYSTEM_0004
NOTE: requesting all-instance disk validation for group=21
Wed Aug 06 17:09:45 2014
NOTE: skipping rediscovery for group 21/0xdb38ead3 (BHU_B_SYSTEM) on local instance.
NOTE: requesting all-instance disk validation for group=21
NOTE: skipping rediscovery for group 21/0xdb38ead3 (BHU_B_SYSTEM) on local instance.
NOTE: initiating PST update: grp = 21
Wed Aug 06 17:09:51 2014
GMON updating group 21 at 9546 for pid 73, osid 16865
NOTE: PST update grp = 21 completed successfully
NOTE: membership refresh pending for group 21/0xdb38ead3 (BHU_B_SYSTEM)
GMON querying group 21 at 9547 for pid 18, osid 101970
NOTE: cache opening disk 4 of grp 21: BHU_B_SYSTEM_0004 path:/dev/mapper/BHU_B_SYSTEM_05
Wed Aug 06 17:09:56 2014
NOTE: Attempting voting file refresh on diskgroup BHU_B_SYSTEM
GMON querying group 21 at 9548 for pid 18, osid 101970
SUCCESS: refreshed membership for 21/0xdb38ead3 (BHU_B_SYSTEM)
Wed Aug 06 17:09:56 2014
SUCCESS: ALTER DISKGROUP BHU_B_SYSTEM ADD  DISK '/dev/mapper/BHU_B_SYSTEM_05' SIZE 51200M /* ASMCA */
NOTE: starting rebalance of group 21/0xdb38ead3 (BHU_B_SYSTEM) at power 9
Starting background process ARB0
Wed Aug 06 17:09:56 2014
ARB0 started with pid=74, OS id=91751
NOTE: assigning ARB0 to group 21/0xdb38ead3 (BHU_B_SYSTEM) with 9 parallel I/Os
NOTE: Attempting voting file refresh on diskgroup BHU_B_SYSTEM
Wed Aug 06 17:11:01 2014

-On Second One
NOTE: disk validation pending for group 21/0xdb38cf46 (BHU_B_SYSTEM)
SUCCESS: validated disks for 21/0xdb38cf46 (BHU_B_SYSTEM)
NOTE: disk validation pending for group 21/0xdb38cf46 (BHU_B_SYSTEM)
NOTE: Assigning number (21,4) to disk (/dev/mapper/BHU_B_SYSTEM_05)
SUCCESS: validated disks for 21/0xdb38cf46 (BHU_B_SYSTEM)
NOTE: membership refresh pending for group 21/0xdb38cf46 (BHU_B_SYSTEM)
Wed Aug 06 17:09:54 2014
GMON querying group 21 at 9721 for pid 18, osid 84704
NOTE: cache opening disk 4 of grp 21: BHU_B_SYSTEM_0004 path:/dev/mapper/BHU_B_SYSTEM_05
GMON querying group 21 at 9722 for pid 18, osid 84704
SUCCESS: refreshed membership for 21/0xdb38cf46 (BHU_B_SYSTEM)
Wed Aug 06 17:09:58 2014
NOTE: Attempting voting file refresh on diskgroup BHU_B_SYSTEM

Adding disk
1)         I am using asmca to add the disk to the existing Diskgroup.
2)         You need to plan what kind of redundancy you are opting for, if you are going for a new diskgroup.
3)   As soon as you added the disk in the asmca, you will be shown an output as “Disks added successfully to disk group DISK_GROUP_NAME”. You need to see it in the sql prompt(on ASM instance) to know about the rebalancing status.

Happy Learning :)

No comments:

Post a Comment