How to add / drop disk in ASM
http://sanoralife.blogspot.in/2012/02/how-to-adddrop-disk-in-asm.html
Its not that quite often your SA asks you to release one of the disks that you been using it for a while for your database but if they do then you need to know how to remove the disk and add a new disk from your ASM.
Here are the steps to Add and Drop a Disk from ASM Diskgroup. Note that asm_power_limit parameter once set is permanent as it writes to both spfile as well (check alert log when you do alter session set asm_power_limit = 10 command to see that it converts it into scope=both).
asm_power_limit parameter
-------------------------
In simple words, Think that you are increasing the work force to finish the job (re-balancing the disk(s)) quicker. You can read more in Oracle Docs.
Steps to Add a Disk:
--------------------
1.Assign the disk to ORACLEASM
/etc/init.d/oracleasm createdisk ASM_DATA_10 /dev/mapper/mpath1p1
2.ScanDisk in ALL NODES
/etc/init.d/oracleasm scandisks
3.Check the header_status in v$asm_disks to make sure that the disk can be added (check below for each status description).
a.Login as sqlplus / as sysasm – note SYSASM here… (for 11g)
b.set lines 200
select group_number, substr(path,1,20) path, substr(name,1,20) disk_name, total_mb, free_mb, state, header_status, mode_status from v$asm_disk;
4.Now Add the Disk to diskgroup.
alter diskgroup ASM_DATA_DISK add disk 'ORCL:ASM_DATA_DISK'; --At this point the new disk is added to the group and Re-Balancing is occurring in the background (basically spreading the data across all the disks along with the new one in that diskgroup)
5.Check the status in v$asm_operations for rebalancing action.
select * from gv$asm_operation;
Now, You are ready to start using the new disk.
Steps to Drop a Disk:
---------------------
6.Drop the old Disk
a.alter diskgroup ASM_DATA__DISK drop disk ASM_DATA_01; --At this point, all the data on disk that you are dropping is being distributed to other disks within that diskgroup.
b.select *from gv$asm_operation; --to check the status on rebalancing while dropping the disk
7.Once dropped from ASM, delete from oracleasm library:
# /etc/init.d/oracleasm deletedisk ASM_DATA_01
8.ScanDisk in ALL NODES
/etc/init.d/oracleasm scandisks
http://sanoralife.blogspot.in/2012/02/how-to-adddrop-disk-in-asm.html
Its not that quite often your SA asks you to release one of the disks that you been using it for a while for your database but if they do then you need to know how to remove the disk and add a new disk from your ASM.
Here are the steps to Add and Drop a Disk from ASM Diskgroup. Note that asm_power_limit parameter once set is permanent as it writes to both spfile as well (check alert log when you do alter session set asm_power_limit = 10 command to see that it converts it into scope=both).
asm_power_limit parameter
-------------------------
In simple words, Think that you are increasing the work force to finish the job (re-balancing the disk(s)) quicker. You can read more in Oracle Docs.
Steps to Add a Disk:
--------------------
1.Assign the disk to ORACLEASM
/etc/init.d/oracleasm createdisk ASM_DATA_10 /dev/mapper/mpath1p1
2.ScanDisk in ALL NODES
/etc/init.d/oracleasm scandisks
3.Check the header_status in v$asm_disks to make sure that the disk can be added (check below for each status description).
a.Login as sqlplus / as sysasm – note SYSASM here… (for 11g)
b.set lines 200
select group_number, substr(path,1,20) path, substr(name,1,20) disk_name, total_mb, free_mb, state, header_status, mode_status from v$asm_disk;
4.Now Add the Disk to diskgroup.
alter diskgroup ASM_DATA_DISK add disk 'ORCL:ASM_DATA_DISK'; --At this point the new disk is added to the group and Re-Balancing is occurring in the background (basically spreading the data across all the disks along with the new one in that diskgroup)
5.Check the status in v$asm_operations for rebalancing action.
select * from gv$asm_operation;
Now, You are ready to start using the new disk.
Steps to Drop a Disk:
---------------------
6.Drop the old Disk
a.alter diskgroup ASM_DATA__DISK drop disk ASM_DATA_01; --At this point, all the data on disk that you are dropping is being distributed to other disks within that diskgroup.
b.select *from gv$asm_operation; --to check the status on rebalancing while dropping the disk
7.Once dropped from ASM, delete from oracleasm library:
# /etc/init.d/oracleasm deletedisk ASM_DATA_01
8.ScanDisk in ALL NODES
/etc/init.d/oracleasm scandisks
No comments:
Post a Comment