How to move ASM spfile to a different disk group

本文介绍如何在Oracle RAC环境中使用ASM命令将spfile从一个磁盘组迁移到另一个磁盘组,并更新GPnP配置文件。文章包括具体步骤,如复制spfile、重启HA堆栈验证更改、移除原始spfile等。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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

[grid@zhongwc1 ~]$ 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  EXTERN  N         512   4096  1048576      5120     4716                0            4716              0             Y  CRS/
MOUNTED  NORMAL  N         512   4096  1048576     61440    56882                0           28441              0             N  DATADG/
MOUNTED  NORMAL  N         512   4096  1048576     51200    48726                0           24363              0             N  FRADG/
[grid@zhongwc1 ~]$ 
[grid@zhongwc1 ~]$ 
[grid@zhongwc1 ~]$ asmcmd spget
+CRS/cluster/asmparameterfile/registry.253.805303687
[grid@zhongwc1 ~]$ 
[grid@zhongwc1 ~]$ 
[grid@zhongwc1 ~]$ asmcmd spcopy -u +CRS/cluster/asmparameterfile/registry.253.805303687 +DATADG/spfileASM.ora
[grid@zhongwc1 ~]$ 
[grid@zhongwc1 ~]$ asmcmd
ASMCMD> ls -l
State    Type    Rebal  Name
MOUNTED  EXTERN  N      CRS/
MOUNTED  NORMAL  N      DATADG/
MOUNTED  NORMAL  N      FRADG/
ASMCMD> cd datadg
ASMCMD> ls -l
Type              Redund  Striped  Time             Sys  Name
                                                    Y    ZHONGWC/
                                                    Y    cluster/
                                                    N    spfileASM.ora => +DATADG/cluster/ASMPARAMETERFILE/REGISTRY.253.805563565

Restart the HA stack to verify that ASM starts up fine with copiedspfile

[root@zhongwc1 ~]# /u01/app/11.2.0/grid/bin/crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'zhongwc1'
CRS-2673: Attempting to stop 'ora.crsd' on 'zhongwc1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'zhongwc1'
CRS-2673: Attempting to stop 'ora.cvu' on 'zhongwc1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'zhongwc1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'zhongwc1'
CRS-2673: Attempting to stop 'ora.CRS.dg' on 'zhongwc1'
CRS-2673: Attempting to stop 'ora.zhongwc.db' on 'zhongwc1'
CRS-2673: Attempting to stop 'ora.oc4j' on 'zhongwc1'
CRS-2677: Stop of 'ora.cvu' on 'zhongwc1' succeeded
CRS-2672: Attempting to start 'ora.cvu' on 'zhongwc2'
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'zhongwc1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'zhongwc1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'zhongwc1' succeeded
CRS-2673: Attempting to stop 'ora.zhongwc1.vip' on 'zhongwc1'
CRS-2677: Stop of 'ora.scan1.vip' on 'zhongwc1' succeeded
CRS-2672: Attempting to start 'ora.scan1.vip' on 'zhongwc2'
CRS-2677: Stop of 'ora.zhongwc1.vip' on 'zhongwc1' succeeded
CRS-2672: Attempting to start 'ora.zhongwc1.vip' on 'zhongwc2'
CRS-2676: Start of 'ora.cvu' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.zhongwc.db' on 'zhongwc1' succeeded
CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'zhongwc1'
CRS-2673: Attempting to stop 'ora.FRADG.dg' on 'zhongwc1'
CRS-2676: Start of 'ora.zhongwc1.vip' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.DATADG.dg' on 'zhongwc1' succeeded
CRS-2677: Stop of 'ora.FRADG.dg' on 'zhongwc1' succeeded
CRS-2676: Start of 'ora.scan1.vip' on 'zhongwc2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'zhongwc2'
CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'zhongwc1' succeeded
CRS-2672: Attempting to start 'ora.oc4j' on 'zhongwc2'
CRS-2676: Start of 'ora.oc4j' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.CRS.dg' on 'zhongwc1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'zhongwc1'
CRS-2677: Stop of 'ora.asm' on 'zhongwc1' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'zhongwc1'
CRS-2677: Stop of 'ora.ons' on 'zhongwc1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'zhongwc1'
CRS-2677: Stop of 'ora.net1.network' on 'zhongwc1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'zhongwc1' has completed
CRS-2677: Stop of 'ora.crsd' on 'zhongwc1' succeeded
CRS-2673: Attempting to stop 'ora.mdnsd' on 'zhongwc1'
CRS-2673: Attempting to stop 'ora.crf' on 'zhongwc1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'zhongwc1'
CRS-2673: Attempting to stop 'ora.evmd' on 'zhongwc1'
CRS-2673: Attempting to stop 'ora.asm' on 'zhongwc1'
CRS-2677: Stop of 'ora.mdnsd' on 'zhongwc1' succeeded
CRS-2677: Stop of 'ora.crf' on 'zhongwc1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'zhongwc1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'zhongwc1' succeeded
CRS-2677: Stop of 'ora.asm' on 'zhongwc1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'zhongwc1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'zhongwc1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'zhongwc1'
CRS-2677: Stop of 'ora.cssd' on 'zhongwc1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'zhongwc1'
CRS-2677: Stop of 'ora.gipcd' on 'zhongwc1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'zhongwc1'
CRS-2677: Stop of 'ora.gpnpd' on 'zhongwc1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'zhongwc1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@zhongwc2 ~]# /u01/app/11.2.0/grid/bin/crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'zhongwc2'
CRS-2673: Attempting to stop 'ora.crsd' on 'zhongwc2'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'zhongwc2'
CRS-2673: Attempting to stop 'ora.zhongwc2.vip' on 'zhongwc2'
CRS-2673: Attempting to stop 'ora.oc4j' on 'zhongwc2'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'zhongwc2'
CRS-2673: Attempting to stop 'ora.CRS.dg' on 'zhongwc2'
CRS-2673: Attempting to stop 'ora.zhongwc.db' on 'zhongwc2'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'zhongwc2'
CRS-2673: Attempting to stop 'ora.cvu' on 'zhongwc2'
CRS-2677: Stop of 'ora.zhongwc2.vip' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'zhongwc2' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'zhongwc2'
CRS-2677: Stop of 'ora.scan1.vip' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'zhongwc2' succeeded
CRS-2673: Attempting to stop 'ora.zhongwc1.vip' on 'zhongwc2'
CRS-2677: Stop of 'ora.zhongwc1.vip' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.zhongwc.db' on 'zhongwc2' succeeded
CRS-2673: Attempting to stop 'ora.DATADG.dg' on 'zhongwc2'
CRS-2673: Attempting to stop 'ora.FRADG.dg' on 'zhongwc2'
CRS-2677: Stop of 'ora.DATADG.dg' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.FRADG.dg' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.oc4j' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.cvu' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.CRS.dg' on 'zhongwc2' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'zhongwc2'
CRS-2677: Stop of 'ora.asm' on 'zhongwc2' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'zhongwc2'
CRS-2677: Stop of 'ora.ons' on 'zhongwc2' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'zhongwc2'
CRS-2677: Stop of 'ora.net1.network' on 'zhongwc2' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'zhongwc2' has completed
CRS-2677: Stop of 'ora.crsd' on 'zhongwc2' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'zhongwc2'
CRS-2673: Attempting to stop 'ora.evmd' on 'zhongwc2'
CRS-2673: Attempting to stop 'ora.asm' on 'zhongwc2'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'zhongwc2'
CRS-2677: Stop of 'ora.evmd' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.asm' on 'zhongwc2' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'zhongwc2'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'zhongwc2' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'zhongwc2' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'zhongwc2'
CRS-2677: Stop of 'ora.cssd' on 'zhongwc2' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'zhongwc2'
CRS-2677: Stop of 'ora.crf' on 'zhongwc2' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'zhongwc2'
CRS-2677: Stop of 'ora.gipcd' on 'zhongwc2' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'zhongwc2'
CRS-2677: Stop of 'ora.gpnpd' on 'zhongwc2' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'zhongwc2' has completed
CRS-4133: Oracle High Availability Services has been stopped.
[root@zhongwc1 ~]# /u01/app/11.2.0/grid/bin/crsctl start has
CRS-4123: Oracle High Availability Services has been started.
[root@zhongwc2 ~]# /u01/app/11.2.0/grid/bin/crsctl start has
CRS-4123: Oracle High Availability Services has been started.
[grid@zhongwc1 ~]$ asmcmd spget
+DATADG/spfileASM.ora


 Remove the original spfile
[grid@zhongwc1 ~]$ asmcmd ls -l +CRS/cluster/asmparameterfile
Type              Redund  Striped  Time             Sys  Name
ASMPARAMETERFILE  UNPROT  COARSE   JAN 21 15:00:00  Y    REGISTRY.253.805303687
[grid@zhongwc1 ~]$ asmcmd rm +CRS/cluster/asmparameterfile/REGISTRY.253.805303687

Verify that the new spfile is being used

[grid@zhongwc1 ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.3.0 Production on Thu Jan 24 16:04:11 2013

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> set line 200
SQL> show parameter spfile

NAME				     TYPE		    VALUE
------------------------------------ ---------------------- ------------------------------
spfile				     string		    +DATADG/spfileasm.ora
SQL> select name,state from v$asm_diskgroup;

NAME							     STATE
------------------------------------------------------------ ----------------------
CRS							     MOUNTED
DATADG							     MOUNTED
FRADG							     MOUNTED


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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值