How to move ASM spfile to a different disk group [ID 1082943.1]

 

How to move ASM spfile to a different disk group [ID 1082943.1]

Goal
The goal is to move ASM spfile from one disk group to another.

During initial ASM setup the spfile might have been created in a default disk group (e.g. DATA).  The requirement is now to move the ASM spfile to another disk group.

According to Oracle ASM documentation it should be possible to use 'asmcmd spmove' command to move ASM spfile:

Oracle Database Storage Administrator's Guide 11g Release 2 (11.2)
Section ASMCMD Instance Management Commands

spmove

Purpose: Moves an Oracle ASM SPFILE from source to destination and automatically updates the GPnP profile.

But an attempt to move the ASM spfile fails as follows:

$ asmcmd spmove +DATA/asm/asmparameterfile/REGISTRY.253.715881237 +PLAY/spfileASM.ora
ORA-15032: not all alterations performed
ORA-15028: ASM file '+DATA/asm/asmparameterfile/REGISTRY.253.715881237' not dropped; currently being accessed (DBD ERROR: OCIStmtExecute)

Solution

To move ASM spfile to another disk group, either make use of intermediate pfile:

1.Create intermediate pfile from the current spfile
2.Create spfile in a new disk group from the intermediate pfile
3.Restart the HA stack to verify that ASM starts up fine with moved spfile
4.Remove the original spfile

or use 'asmcmd spcopy' command

1.Copy spfile with -u option - to update GPnP profile in RAC environment
2.Restart the HA stack to verify that ASM starts up fine with copiedspfile
3.Remove the original spfile
This is an example of moving ASM spfile in a single instance environment, by making use intermediate pfile

1. Create intermediate pfile from the current spfile

$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on <date>
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option

SQL> show parameter spfile

NAME    TYPE    VALUE
------- ------- --------------------------------------------------
spfile  string  +DATA/asm/asmparameterfile/registry.253.715881237

SQL> create pfile='/tmp/pfile+ASM.ora' from spfile;

File created.

2. Create spfile in a new disk group from the intermediate pfile

SQL> create spfile='+PLAY' from pfile='/tmp/pfile+ASM.ora';

File created.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option

3. Restart the HA stack to verify that ASM starts up fine with moved spfile

$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on '<server>'
...
CRS-4133: Oracle High Availability Services has been stopped.

$ crsctl start has
CRS-4123: Oracle High Availability Services has been started.

Verify that the new spfile is being used

$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.1.0 Production on <date>
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option

SQL> show parameter spfile

NAME    TYPE    VALUE
------- ------- --------------------------------------------------
spfile  string  +PLAY/asm/asmparameterfile/registry.253.715963539

SQL> select name, state from v$asm_diskgroup;

NAME  STATE
----- -----------
DATA  MOUNTED
PLAY  MOUNTED

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option
The use of new spfile can also be verified with asmcmd as follows:

$ asmcmd spget
+PLAY/asm/asmparameterfile/registry.253.715963539
4. Remove the original spfile

$ asmcmd rm +DATA/asm/asmparameterfile/registry.253.715881237

And this is an example of moving ASM spfile with 'asmcmd spcopy'

1. Copy spfile with -u option - to update GPnP profile in RAC environment

$ asmcmd spget
+DATA/asm/asmparameterfile/registry.253.722601213

$ asmcmd lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Votin g_files Name
MOUNTED EXTERN N 512 4096 1048576 14658 9814 0 9814 0 N DATA/
MOUNTED EXTERN N 512 4096 1048576 9772 8507 0 8507 0 N PLAY/
MOUNTED EXTERN N 512 4096 1048576 9772 9212 0 9212 0 N RECO/

$ asmcmd spcopy -u +DATA/asm/asmparameterfile/registry.253.722601213 +PLAY/spfileASM.ora
2. Restart the HA stack to verify that ASM starts up fine with copiedspfile

$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on '<server>'
...
CRS-4133: Oracle High Availability Services has been stopped.

$ crsctl start has
CRS-4123: Oracle High Availability Services has been started.

$ asmcmd spget
+PLAY/spfileASM.ora
3. Remove the original spfile

$ asmcmd ls -l +DATA/asm/asmparameterfile
Type Redund Striped Time Sys Name
ASMPARAMETERFILE UNPROT COARSE JUN 25 10:00:00 Y REGISTRY.253.722601213

$ asmcmd rm +DATA/asm/asmparameterfile/registry.253.722601213
NOTE: The disk group that holds ASM spfile has to have COMPATIBLE.ASM value of 11.2 or higher.

References
Oracle Database Storage Administrator's Guide 11g Release 2 (11.2), Chapter 3 Administering Oracle ASM Instances, Section Initialization Parameter Files for an Oracle ASM Instance
Oracle Database Storage Administrator's Guide 11g Release 2 (11.2), Section ASMCMD Instance Management Commands

 相关内容

 

--------------------------------------------------------------------------------
产品
--------------------------------------------------------------------------------

•Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition

关键字
--------------------------------------------------------------------------------
ASM; AUTOMATIC STORAGE MANAGEMENT; DESTINATION; DISK GROUP; PFILE; SPFILE
错误
--------------------------------------------------------------------------------
ORA-15028; ORA-15032; CRS-2673; CRS-2791; CRS-2677; CRS-2793; CRS-4133; CRS-4123

 

 

时间: 2024-09-08 11:45:10

How to move ASM spfile to a different disk group [ID 1082943.1]的相关文章

ASM disk group mount fails with ORA-15036: disk is truncated [ID 1077175.1]

  ASM disk group mount fails with ORA-15036: disk is truncated [ID 1077175.1] --------------------------------------------------------------------------------     修改时间 05-OCT-2011     类型 PROBLEM     状态 PUBLISHED   In this Document   Symptoms   Change

ORACLE 12C RAC修改ocr/votedisk/asm spfile所在磁盘组名称

今天看着我这个单节点的12C rac,突然觉得ocr所在的磁盘组叫做+DG_SYS有点不舒服,想改成+SYS_DG.处理方法是先把ocr/votedisk/asm spfile迁移到已经存在的asm中,然后修改磁盘组名称,最后迁移到新名称磁盘组中(本次处理流程+DG_SYS->+DATA->+SYS_DG) 当前运行情况 [grid@xifenfei ~]$ crsctl status res -t -----------------------------------------------

ASM 翻译系列第三十五弹:ASM 253号文件——ASM spfile

ASM spfile in a disk group 从ASM版本11.2开始,ASM spfile可以储存在ASM磁盘组里.事实上,在安装ASM时,OUI就已经把ASM spfile放在了磁盘组中.对于单实例环境和集群环境都是这样.在安装过程中创建的第一个磁盘组是spfile的默认位置,但这不是必要的.ASM spfile还是可以放在文件系统上,就是$ORACLE_HOME/dbs目录下. New ASMCMD commands 为支持该特性,ASMCMD引入了新的命令用来备份,复制和移动AS

Oracle 11g RAC安装时的INS-30507错误:Empty ASM disk group

最近的Oracle 11g RAC安装碰到了INS-30507错误,也就是在grid安装到创建ASM磁盘组的时候找不到任何候选磁盘,google了N多安装指导也没有找到蛛丝马迹.如果你碰到这个问题,不妨往下瞧. 1.错误信息与解释 SEVERE: [FATAL] [INS-30507] Empty ASM disk group. CAUSE: No disks were selected from a managed ASM disk group. ACTION: Select appropri

ASMCA fails to create 11.2 ASM instance when upgrading from 10.2 [ID 1125053.1]

ASMCA fails to create 11.2 ASM instance when upgrading from 10.2 [ID 1125053.1]   修改时间 20-DEC-2011     类型 PROBLEM     状态 PUBLISHED   In this Document  Symptoms   Cause   Solution Applies to: Oracle Server - Enterprise Edition - Version: 11.2.0.1.0 to

[INS-30507] Empty ASM disk group

    最近的Oracle 11g RAC安装碰到了INS-30507错误,也就是在grid安装到创建ASM磁盘组的时候找不到任何候选磁盘,google了N多安装指导也没有找到蛛丝马迹.如果你碰到这个问题,不妨往下瞧. 1.错误信息与解释 SEVERE: [FATAL] [INS-30507] Empty ASM disk group. CAUSE: No disks were selected from a managed ASM disk group. ACTION: Select appr

Rebalance Disk Group + ASM Disk Discovery

Disk discovery is the mechanism used to find the operating system names for disks Oracle ASM can access. It is used tofind all the disks that comprise a disk group to be  mounted, the disks an administrator wants to add to a disk group, or the disks

【ASM 翻译系列第二弹:ASM 12C 版本新特性】

随着Oracle 12c的发布,也就意味着全新版本的ASM面世了.已知的重大新特性有Flex ASM,数据预校验和更加便捷的磁盘管理操作.下面针对这几个方面进行详细介绍. Flex ASM Flex ASM特性可以允许ASM实例只运行在集群中某些节点上.默认安装将会创建3个ASM实例,而不管集群中节点的数量.一个ASM实例可以为本地和远端数据库提供服务.如果一个ASM实例crash,数据库实例会fail over到另一个ASM实例,而不会crash. 随着Flex ASM的引入,又出现了一个新的

asm磁盘组的冗余级别+Voting Disk and OCR

1.Specify the redundancy level of the disk group. For Oracle ASM to mirror files, specify the redundancy level as NORMAL REDUNDANCY (2-way mirroring by default for most file types) or HIGH REDUNDANCY (3-way mirroring for all files).  Specify EXTERNAL