Adding / Dropping Disks From a ASM Disk Group
来源:互联网 发布:java运行原理 编辑:程序博客网 时间:2024/06/16 14:48
磁盘组规划出现问题,需要踢出磁盘,具体添加删除步骤如下:
Adding / Dropping Disks From a ASM Disk Group
by Jeff Hunter, Sr. Database Administrator
Contents
- Introduction
- Identify Candidate Disks
- Add Disks to a Disk Group
- Drop Disks from a Disk Group
- About the Author
Introduction
This short article provides the steps necessary to add a candidate disk to an already existing disk group on the Linux platform. It also documents the steps necessary to remove disks from a running disk group.
For the purpose of this document, I already have an existing disk group named TESTDB_DATA1. I am not using the ASMLib libraries.
Identify Candidate Disks
The current disk group configuration, (TESTDB_DATA1 and candidate disks not assigned to any disk group) has the following configuration:
$ ORACLE_SID=+ASM; export ORACLE_SID$ sqlplus "/ as sysdba"SELECT NVL(a.name, '[CANDIDATE]') disk_group_name , b.path disk_file_path , b.name disk_file_name , b.failgroup disk_file_fail_groupFROM v$asm_diskgroup a RIGHT OUTER JOIN v$asm_disk b USING (group_number)ORDER BY a.name;Disk Group Name Path File Name Fail Group --------------- --------------- -------------------- ---------------TESTDB_DATA1 /dev/raw/raw1 TESTDB_DATA1_0000 CONTROLLER1 /dev/raw/raw2 TESTDB_DATA1_0001 CONTROLLER1 /dev/raw/raw3 TESTDB_DATA1_0002 CONTROLLER2 /dev/raw/raw4 TESTDB_DATA1_0003 CONTROLLER2[CANDIDATE] /dev/raw/raw5 /dev/raw/raw6 /dev/raw/raw7
In this example, I will be adding two new disks (/dev/raw/raw5 and /dev/raw/raw6) to the current disk group.
Add Disks to a Disk Group
Finally, let's add the two new disks to the disk group. This needs to be done within the ASM instance and connected as a user with SYSDBA privileges:
$ ORACLE_SID=+ASM; export ORACLE_SID$ sqlplus "/ as sysdba"SQL> ALTER DISKGROUP testdb_data1 ADD 2 FAILGROUP controller1 DISK '/dev/raw/raw5' 3 FAILGROUP controller2 DISK '/dev/raw/raw6' REBALANCE POWER 11;Diskgroup altered.
After submitting the SQL to add the new disks to the disk group, query the dynamic performance view V$ASM_OPERATION in the ASM instance to check the status of the rebalance operation. The V$ASM_OPERATION view will return one row for every active Automatic Storage Management long running operation executing in the Automatic Storage Management instance.
SQL> SELECT group_number, operation, state, power, est_minutes FROM v$asm_operation;GROUP_NUMBER OPERATION STATE POWER EST_MINUTES------------ --------- ------ ------ ----------- 1 REBAL RUN 11 9
Continue to query this view to monitor the rebalance operation. When this row is gone, the ASM rebalance operation will be complete.
After adding the new disks, this is a new view of the disk group configuration:
Disk Group Name Path File Name Fail Group --------------- --------------- -------------------- ---------------TESTDB_DATA1 /dev/raw/raw1 TESTDB_DATA1_0000 CONTROLLER1 /dev/raw/raw2 TESTDB_DATA1_0001 CONTROLLER1 /dev/raw/raw3 TESTDB_DATA1_0002 CONTROLLER2 /dev/raw/raw4 TESTDB_DATA1_0003 CONTROLLER2 /dev/raw/raw5 TESTDB_DATA1_0004 CONTROLLER1 /dev/raw/raw6 TESTDB_DATA1_0005 CONTROLLER2[CANDIDATE] /dev/raw/raw7
Drop Disks from a Disk Group
Now, let's drop the same two new disks from the disk group. This needs to be done within the ASM instance and connected as a user with SYSDBA privileges:
$ ORACLE_SID=+ASM; export ORACLE_SID$ sqlplus "/ as sysdba"SQL> ALTER DISKGROUP testdb_data1 DROP 2 DISK testdb_data1_0004, testdb_data1_0005 REBALANCE POWER 11;Diskgroup altered.
The current disk group configuration, (TESTDB_DATA1 and candidate disks not assigned to any disk group) now has the following configuration:
Disk Group Name Path File Name Fail Group --------------- --------------- -------------------- ---------------TESTDB_DATA1 /dev/raw/raw1 TESTDB_DATA1_0000 CONTROLLER1 /dev/raw/raw2 TESTDB_DATA1_0001 CONTROLLER1 /dev/raw/raw3 TESTDB_DATA1_0002 CONTROLLER2 /dev/raw/raw4 TESTDB_DATA1_0003 CONTROLLER2 [CANDIDATE] /dev/raw/raw5 /dev/raw/raw6 /dev/raw/raw7
About the Author
Jeffrey Hunter is an Oracle Certified Professional, Java Development Certified Professional, Author, and an Oracle ACE. Jeff currently works as a Senior Database Administrator for The DBA Zone, Inc. located in Pittsburgh, Pennsylvania. His work includes advanced performance tuning, Java and PL/SQL programming, developing high availability solutions, capacity planning, database security, and physical / logical database design in a UNIX / Linux server environment. Jeff's other interests include mathematical encryption theory, tutoring advanced mathematics, programming language processors (compilers and interpreters) in Java and C, LDAP, writing web-based database administration tools, and of course Linux. He has been a Sr. Database Administrator and Software Engineer for over 20 years and maintains his own website site at: http://www.iDevelopment.info. Jeff graduated from Stanislaus State University in Turlock, California, with a Bachelor's degree in Computer Science and Mathematics.
- Adding / Dropping Disks From a ASM Disk Group
- Adding new storage disks and Dropping old storage disks from OCR ,Vote diskgroup
- How to move ASM spfile to a different disk group
- How to move ASM spfile to a different disk group
- 31 Which of the following is a benefit of ASM fast disk resync? A. Failed disks are taken offline im
- Rebalance Disk Group + ASM Disk Discovery
- How to move ASM spfile to a different disk group [ID 1082943.1]
- [INS-30507] Empty ASM disk group
- [INS-30502] No ASM disk group found.
- Adding ASM disk after ORA-15041: diskgroup space exhausted
- Adding ASM disk after ORA-15041: diskgroup space exhausted .
- Adding ASM disk after ORA-15041: diskgroup space exhausted
- Add a disk to ASM diskgroup.
- ORA-15260: permission denied on ASM disk group
- ORA-15260: permission denied on ASM disk group
- #ASM 翻译系列第三十四弹:ASM INTERNAL ASM Disk Group Attributes
- ASM disk group mount fails with ORA-15036: disk is truncated [ID 1077175.1]
- ASM添加磁盘报错:ORA-15260: permission denied on ASM disk group
- 九度1178
- 4.3 服务器上的 Git - 生成 SSH 公钥
- while(--t)与while(t--)的区分
- Velocity语法
- HDU5024 2014 ACM-ICPC亚洲区域赛广州赛区网络赛C题 Wang Xifeng's Little Plot
- Adding / Dropping Disks From a ASM Disk Group
- hdu2045不容易系列之(3)—— LELE的RPG难题
- Linux(Ubuntu14.04LTS) 安装配置MPICH-3.1.2
- Mysql 存储引擎
- C++构造函数调用虚函数
- 杭电2524 矩形A + B(找规律,递推 水题)
- 64位WIN7+oracle11g+plsql安装
- 4.4 服务器上的 Git - 架设服务器
- java web中图片验证码功能实现