oracle 11gR2 新特性asm diskgroup重命名
oracle 11gR2 新特性asm diskgroup磁盘组重命名
oracle 11gR2 版本开始,可以对已有的磁盘组进行重命名,这个特性目前对我来说,也没看出有多大的好处,磁盘组命名好了,一般就不会去更改它。 以下为具体解释和用法:
1.以下三种方式不可以进行重命名
- the Diskgroup is mounted
- the Diskgroup is being used by CSS
- Diskgroup contains offline disks
2.11gR2之前版本(10g,11gR1) 如果想用这个功能,必须安装选项目
install 11gR2 SIHA Grid Infrastructure software only
3.命令存放目录
cd <11gr2 grid home>/bin
renamedg
4.使用方法 比如我们把dgdata重命名dgdatatest
4.1 先dismount dgdata
alter diskgroup dgdata dismount;
4.2 renamedg
[grid@zjzxdb1:/grid/app/11.2.0/grid/bin]$renamedg dgdata dgdatatest
NOTE: No asm libraries found in the system
Parsing parameters..
renamedg operation: dgdata dgdatatest
Executing phase 1
Discovering the group
Checking for hearbeat...
Re-discovering the group
Generating configuration file..
Completed phase 1
Executing phase 2
Completed phase 2
4.3 查看结果
SQL> select name,state from v$asm_diskgroup;
NAME STATE
------------------------------ -----------
DGDATATEST DISMOUNTED
DGRECOVER MOUNTED
DGSYSTEM MOUNTED
SQL>
SQL> select name,state from v$asm_diskgroup;
NAME STATE
-------------------- -----------
DGDATATEST MOUNTED
DGRECOVER MOUNTED
DGSYSTEM MOUNTED
SQL> select name,path from v$asm_disk;
NAME PATH
-------------------- --------------------
DGDATA_0000 /dev/rhdisk10
DGSYSTEM_0000 /dev/rhdisk2
DGSYSTEM_0001 /dev/rhdisk3
DGRECOVER_0000 /dev/rhdisk4
DGRECOVER_0001 /dev/rhdisk5
DGDATA_0001 /dev/rhdisk6
DGDATA_0002 /dev/rhdisk7
DGDATA_0003 /dev/rhdisk8
DGDATA_0004 /dev/rhdisk9
9 rows selected.
可以看到磁盘组已经命名过来,但asm disk 名还是dgdata。