现在的位置: 首页 > 综合 > 正文

How to move ASM spfile to a different disk group

2014年07月30日 ⁄ 综合 ⁄ 共 8273字 ⁄ 字号 评论关闭

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]

抱歉!评论已关闭.