aix7.1 + 双节点oracle rac 11.2.0.3,由于此套rac并非自己部门安装,是开发部安装,现交由运维部分来管理,客户需要要将asm di
交代环境:
aix7.1 + 双节点oracle rac 11.2.0.3
由于此套rac并非自己部门安装,是开发部安装,现交由运维部分来管理,客户需要要将asm diskgroup name 安装部门规范来命令。遂需要将oasmdgdata1更改为datadg。
幸好oracle的版本是11gr2,在11gr2中,oracle有一项新特性,可以直接使用renamedg命令更改diskgroup的名称。
下面是具体的操作步骤。
grid@sundb01:/home/grid>asmcmd
asmcmd> lsdg
state type rebal sector block au total_mb free_mb req_mir_free_mb usable_file_mb offline_disks voting_files name
mounted normal n 512 4096 1048576 358400 358192 0 179096 0 n oasmdgdata01/
mounted normal n 512 4096 1048576 15360 14434 5120 4657 0 y ocrdg/
asmcmd> umount oasmdgdata01
asmcmd> lsdg
state type rebal sector block au total_mb free_mb req_mir_free_mb usable_file_mb offline_disks voting_files name
mounted normal n 512 4096 1048576 15360 14434 5120 4657 0 y ocrdg/
grid@sundb01:/home/grid>renamedg -help
note: no asm libraries found in the system
parsing parameters..
phase phase to execute,
(phase=one|two|both), default both
dgname diskgroup to be renamed
newdgname new name for the diskgroup
config intermediate config file
check just check-do not perform actual operation,
(check=true/false), default false
confirm confirm before committing changes to disks,
(confirm=true/false), default false
clean ignore errors,
(clean=true/false), default true
asm_diskstring asm diskstring (asm_diskstring='discoverystring',
'discoverystring1' ...)
verbose verbose execution,
(verbose=true|false), default false
keep_voting_files voting file attribute,
(keep_voting_files=true|false), default false
利用renamedg来更改diskgroup的名称:
grid@sundb01:/home/grid>renamedg phase=both dgname=oasmdgdata01 newdgname=datadg verbose=true
note: no asm libraries found in the system
parsing parameters..
parameters in effect:
old dg name : oasmdgdata01
new dg name : datadg
phases :
phase 1
phase 2
discovery str :
clean : true
raw only : true
renamedg operation: phase=both dgname=oasmdgdata01 newdgname=datadg verbose=true
executing phase 1
discovering the group
performing discovery with string:
identified disk ufs:/dev/rhdisk2 with disk number:1 and timestamp (33002374 -296274944)
identified disk ufs:/dev/rhdisk1 with disk number:0 and timestamp (33002374 -296274944)
checking for hearbeat...
re-discovering the group
performing discovery with string:
identified disk ufs:/dev/rhdisk2 with disk number:1 and timestamp (33002374 -296274944)
identified disk ufs:/dev/rhdisk1 with disk number:0 and timestamp (33002374 -296274944)
checking if the diskgroup is mounted or used by css
checking disk number:1
checking disk number:0
generating configuration file..
completed phase 1
executing phase 2
looking for /dev/rhdisk2
modifying the header
looking for /dev/rhdisk1
modifying the header
completed phase 2
terminating kgfd context 110285ba0
grid@sundb01:/home/grid>
grid@sundb01:/home/grid>sqlplus / as sysasm
sql*plus: release 11.2.0.3.0 production on fri oct 10 12:33:31 2014
copyright (c) 1982, 2011, oracle. all rights reserved.
connected to:
oracle database 11g enterprise edition release 11.2.0.3.0 - 64bit production
with the real application clusters and automatic storage management options
sql> select name,state from v$asm_diskgroup;