当前位置:  数据库>论坛 iis7站长之家

如何重命名ASM 中的磁盘组

    来源: 互联网  发布时间:2017-06-02

    本文导语: 介绍一个重命名Oracle asm 磁盘组的工具renamedg Therenamedgtool enables you to change the name of a cloned disk group. The disk group must be dismounted on all nodes in the cluster before runningrenamedgon the disk group. renamedgrenames a disk group using a two-step process: Phase one ...

介绍一个重命名Oracle asm 磁盘组的工具renamedg

Therenamedgtool enables you to change the name of a cloned disk group. The disk group must be dismounted on all nodes in the cluster before runningrenamedgon the disk group.

renamedgrenames 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 sysasm

    SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 24 15:33:16 2014

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.


    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Automatic Storage Management option

    SQL> alter diskgroup new_datagroup2 dismount;

    Diskgroup altered.

    SQL>
    SQL>
    SQL> exit

    -bash-4.1$
    -bash-4.1$ 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

    -bash-4.1$ renamedg dgname=NEW_DATAGROUP2 newdgname=datagroup2 asm_diskstring='/dev/oracleasm/disks/*' verbose=true
    NOTE: No asm libraries found in the system

    Parsing 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          : TRUE
    renamedg operation: dgname=NEW_DATAGROUP2 newdgname=datagroup2 asm_diskstring=/dev/oracleasm/disks/* verbose=true
    Executing phase 1
    Discovering the group
    Performing 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 group
    Performing 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:0
    Checking disk number:1
    Checking disk number:2
    Checking disk number:5
    Checking disk number:3
    Checking disk number:4
    Generating configuration file..
    Completed phase 1
    Executing phase 2
    Looking for /dev/oracleasm/disks/ASMDISK5
    Modifying the header
    Looking for /dev/oracleasm/disks/ASMDISK6
    Modifying the header
    Looking for /dev/oracleasm/disks/ASMDISK7
    Modifying the header
    Looking for /dev/oracleasm/disks/ASMDISK8
    Modifying the header
    Looking for /dev/oracleasm/disks/ASMDISK9
    Modifying the header
    Looking for /dev/oracleasm/disks/ASMDISK10
    Modifying the header
    Completed phase 2
    Terminating kgfd context 0x7f57a379b0a0
    -bash-4.1$ sqlplus / as sysasm

    SQL*Plus: Release 11.2.0.4.0 Production on Mon Mar 24 15:35:04 2014

    Copyright (c) 1982, 2013, Oracle.  All rights reserved.


    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With the Automatic Storage Management option

    SQL> select name,state from v$asm_diskgroup;

    NAME                          STATE
    ------------------------------ -----------
    DATAGROUP1                    MOUNTED
    DATAGROUP2                    DISMOUNTED

    SQL> alter diskgroup datagroup2 mount;

    Diskgroup altered.

    SQL> select name,state from v$asm_diskgroup;

    NAME                          STATE
    ------------------------------ -----------
    DATAGROUP1                    MOUNTED
    DATAGROUP2                    MOUNTED

    SQL> exit
    Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
    With 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 

     

     


        
     
     

    您可能感兴趣的文章:

     
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • java命名空间javax.naming类namingexception的类成员方法: getrootcause定义及介绍
  • java文件重命名(文件批量重命名)实例程序代码分享
  • java命名空间javax.xml.soap接口name成员方法: getqualifiedname定义参考
  • 大家讨论一下Linux的命名规则
  • java命名空间javax.naming.event类namingevent的类成员方法: object_renamed定义及介绍
  • 请问何时删除命名管道哪?
  • java命名空间javax.naming接口context的类成员方法: getnameparser定义及介绍
  • 批量重命名工具 Krename
  • java命名空间javax.naming.directory类searchcontrols的类成员方法: subtree_scope定义及介绍
  • 命名管道open时被阻塞了
  • java命名空间javax.swing类jtextpane的类成员方法: addstyle定义及介绍
  • solaris 安装 命名服务
  • java命名空间javax.naming接口namingenumeration<t>的类成员方法: hasmore定义及介绍
  • 搞不懂TI的demo的线程命名,请教
  • java命名空间javax.swing.text接口styleddocument的类成员方法: addstyle定义及介绍
  • c# 命名空间和程序集
  • java命名空间javax.swing.text类stylecontext的类成员方法: addstyle定义及介绍
  • 如何批量重命名
  • java命名空间javax.swing.text类styleconstants的类成员方法: nameattribute定义及介绍
  • 日志写入命名管道的权限问题
  • java命名空间javax.xml.soap接口name成员方法: geturi定义参考
  • 命名管道问题


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,