您好,欢迎访问一九零五行业门户网

如何重命名asm中的磁盘组

今天是2014-03-24,介绍一个重命名oracle asm 磁盘组的工具renamedg the renamedg tool enables you to change the name of a cloned disk group. the disk group must be dismounted on all nodes in the cluster before running renamedg on the disk grou
今天是2014-03-24,介绍一个重命名oracle asm 磁盘组的工具renamedg
the renamedg tool enables you to change the name of a cloned disk group. the disk group must be dismounted on all nodes in the cluster before running renamedg on the disk group.
renamedg renames a disk group using a two-step process:
phase one
this phase generates a configuration file to be used in phase two.
phase two
this phase uses the configuration file to perform the renaming of the disk group.
the syntax is:
renamedg {-help | help=true}
renamedg
[phase={ one|two |both } ] dgname=diskgroup
newdgname=newdiskgroup [config=configfile]
[ asm_diskstring=discoverystring, discoverystring ... ]
[ clean={true|false} ] [ check={true|false} ]
[ confirm={true|false}] [ verbose={ true|false} ]
[ keep_voting_files={true|false}]
phase={one|two|both}
注意:
applies to:
oracle server - enterprise edition - version: 10.1.0.2 to 11.2.0.0
information in this document applies to any platform.
goal
the purpose of this document is to provide information about rename diskgroup in 10g and 11gr1 release
solution
rename diskgroup option is a new feature of 11gr2 .
you can use this tool to rename your 10g or 11gr1 asm diskgroup
you need to just install 11gr2 siha grid infrastructure software only installation.
cd /bin
renamedg
use renamedg tool to rename 10g or 11gr1 diskgroup.
diskgroup cannot be renamed under following conditions :
- the diskgroup is mounted
- the diskgroup is being used by css
- diskgroup contains offline disks
eg:
-bash-4.1$ sqlplus / as sysasmsql*plus: release 11.2.0.4.0 production on mon mar 24 15:33:16 2014copyright (c) 1982, 2013, oracle. all rights reserved.connected to:oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit productionwith the automatic storage management optionsql> alter diskgroup new_datagroup2 dismount;diskgroup altered.sql> sql> sql> exit-bash-4.1$ -bash-4.1$ renamedg -helpnote: no asm libraries found in the systemparsing parameters..phase phase to execute, (phase=one|two|both), default bothdgname diskgroup to be renamednewdgname new name for the diskgroupconfig intermediate config filecheck just check-do not perform actual operation, (check=true/false), default falseconfirm confirm before committing changes to disks, (confirm=true/false), default falseclean ignore errors, (clean=true/false), default trueasm_diskstring asm diskstring (asm_diskstring='discoverystring', 'discoverystring1' ...)verbose verbose execution, (verbose=true|false), default falsekeep_voting_files voting file attribute, (keep_voting_files=true|false), default false-bash-4.1$ renamedg dgname=new_datagroup2 newdgname=datagroup2 asm_diskstring='/dev/oracleasm/disks/*' verbose=truenote: no asm libraries found in the systemparsing parameters..parameters in effect: old dg name : new_datagroup2 new dg name : datagroup2 phases : phase 1 phase 2 discovery str : /dev/oracleasm/disks/* clean : true raw only : truerenamedg operation: dgname=new_datagroup2 newdgname=datagroup2 asm_diskstring=/dev/oracleasm/disks/* verbose=trueexecuting phase 1discovering the groupperforming discovery with string:/dev/oracleasm/disks/*identified disk ufs:/dev/oracleasm/disks/asmdisk5 with disk number:0 and timestamp (33001227 75905024)identified disk ufs:/dev/oracleasm/disks/asmdisk6 with disk number:1 and timestamp (33001227 75905024)identified disk ufs:/dev/oracleasm/disks/asmdisk7 with disk number:2 and timestamp (33001227 75905024)identified disk ufs:/dev/oracleasm/disks/asmdisk8 with disk number:5 and timestamp (33001229 -598404096)identified disk ufs:/dev/oracleasm/disks/asmdisk9 with disk number:3 and timestamp (33001229 -678575104)identified disk ufs:/dev/oracleasm/disks/asmdisk10 with disk number:4 and timestamp (33001229 -678575104)checking for hearbeat...re-discovering the groupperforming discovery with string:/dev/oracleasm/disks/*identified disk ufs:/dev/oracleasm/disks/asmdisk5 with disk number:0 and timestamp (33001227 75905024)identified disk ufs:/dev/oracleasm/disks/asmdisk6 with disk number:1 and timestamp (33001227 75905024)identified disk ufs:/dev/oracleasm/disks/asmdisk7 with disk number:2 and timestamp (33001227 75905024)identified disk ufs:/dev/oracleasm/disks/asmdisk8 with disk number:5 and timestamp (33001229 -598404096)identified disk ufs:/dev/oracleasm/disks/asmdisk9 with disk number:3 and timestamp (33001229 -678575104)identified disk ufs:/dev/oracleasm/disks/asmdisk10 with disk number:4 and timestamp (33001229 -678575104)checking if the diskgroup is mounted or used by css checking disk number:0checking disk number:1checking disk number:2checking disk number:5checking disk number:3checking disk number:4generating configuration file..completed phase 1executing phase 2looking for /dev/oracleasm/disks/asmdisk5modifying the headerlooking for /dev/oracleasm/disks/asmdisk6modifying the headerlooking for /dev/oracleasm/disks/asmdisk7modifying the headerlooking for /dev/oracleasm/disks/asmdisk8modifying the headerlooking for /dev/oracleasm/disks/asmdisk9modifying the headerlooking for /dev/oracleasm/disks/asmdisk10modifying the headercompleted phase 2terminating kgfd context 0x7f57a379b0a0-bash-4.1$ sqlplus / as sysasmsql*plus: release 11.2.0.4.0 production on mon mar 24 15:35:04 2014copyright (c) 1982, 2013, oracle. all rights reserved.connected to:oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit productionwith the automatic storage management optionsql> select name,state from v$asm_diskgroup;name state------------------------------ -----------datagroup1 mounteddatagroup2 dismountedsql> alter diskgroup datagroup2 mount;diskgroup altered.sql> select name,state from v$asm_diskgroup;name state------------------------------ -----------datagroup1 mounteddatagroup2 mountedsql> exitdisconnected from oracle database 11g enterprise edition release 11.2.0.4.0 - 64bit productionwith the automatic storage management option-bash-4.1$ crsctl stat res -t--------------------------------------------------------------------------------name target state server state_details --------------------------------------------------------------------------------local resources--------------------------------------------------------------------------------ora.datagroup1.dg online online oracle-one ora.datagroup2.dg online online oracle-one ora.listener.lsnr online online oracle-one ora.new_datagroup2.dg offline offline oracle-one ora.asm online online oracle-one started ora.ons offline offline oracle-one --------------------------------------------------------------------------------cluster resources--------------------------------------------------------------------------------ora.cssd 1 online online oracle-one ora.diskmon 1 offline offline ora.evmd 1 online online oracle-one ora.rhys.db 1 offline offline instance shutdown -bash-4.1$ srvctl remove diskgroup -g new_datagroup2-bash-4.1$ crsctl status res -t--------------------------------------------------------------------------------name target state server state_details --------------------------------------------------------------------------------local resources--------------------------------------------------------------------------------ora.datagroup1.dg online online oracle-one ora.datagroup2.dg online online oracle-one ora.listener.lsnr online online oracle-one ora.asm online online oracle-one started ora.ons offline offline oracle-one --------------------------------------------------------------------------------cluster resources--------------------------------------------------------------------------------ora.cssd 1 online online oracle-one ora.diskmon 1 offline offline ora.evmd 1 online online oracle-one ora.rhys.db 1 offline offline instance shutdown
其它类似信息

推荐信息