asm 降级实验
2015-06-15 11:42
387 查看
--降级实验
--1 环境确认
[grid@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Jun 15 11:24:32 2015
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> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Automatic Storage Management option
[grid@localhost ~]$ asmcmd
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 20473 17502 0 17502 0 N DG1/
ASMCMD>
--2 关闭服务
[grid@localhost ~]$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'localhost'
CRS-2673: Attempting to stop 'ora.DG1.dg' on 'localhost'
CRS-2677: Stop of 'ora.DG1.dg' on 'localhost' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'localhost'
CRS-2677: Stop of 'ora.asm' on 'localhost' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'localhost'
CRS-2677: Stop of 'ora.cssd' on 'localhost' succeeded
CRS-2673: Attempting to stop 'ora.evmd' on 'localhost'
CRS-2677: Stop of 'ora.evmd' on 'localhost' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'localhost' has completed
CRS-4133: Oracle High Availability Services has been stopped.
--卸载集群【命令清楚集群信息】
[root@localhost ~]# /app/app/11.2.0/grid_1/crs/install/rootcrs.pl -verbose -deconfig -force
Using configuration parameter file: /app/app/11.2.0/grid_1/crs/install/crsconfig_params
Usage: srvctl <command> <object> [<options>]
commands: enable|disable|start|stop|status|add|remove|modify|getenv|setenv|unsetenv|config|upgrade
objects: database|service|asm|diskgroup|listener|home|ons
For detailed help on each command and object and its options use:
srvctl <command> -h or
srvctl <command> <object> -h
PRKO-2012 : nodeapps object is not supported in Oracle Restart
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Modify failed, or completed with errors.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Delete failed, or completed with errors.
CRS-4013: This command is not supported in a single-node configuration.
CRS-4000: Command Stop failed, or completed with errors.
################################################################
# You must kill processes or reboot the system to properly #
# cleanup the processes started by Oracle clusterware #
################################################################
error: package cvuqdisk is not installed
Successfully deconfigured Oracle clusterware stack on this node
[root@localhost ~]# reboot
Broadcast message from root (pts/1) (Mon Jun 15 11:31:48 2015):
The system is going down for reboot NOW!
[root@localhost ~]#
--恢复还原11g gi
[root@localhost ~]# /app/app/grid/product/11.2.0/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /app/app/grid/product/11.2.0
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
: y
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:
/app/app/grid/product/11.2.0/perl/bin/perl -I/app/app/grid/product/11.2.0/perl/lib -I/app/app/grid/product/11.2.0/crs/install /app/app/grid/product/11.2.0/crs/install/roothas.pl
To configure Grid Infrastructure for a Cluster perform the following steps:
1. Provide values for Grid Infrastructure configuration parameters in the file - /app/app/grid/product/11.2.0/crs/install/crsconfig_params. For details on how to do this, see the installation guide.
2. Run the following command as the root user:
/app/app/grid/product/11.2.0/perl/bin/perl -I/app/app/grid/product/11.2.0/perl/lib -I/app/app/grid/product/11.2.0/crs/install /app/app/grid/product/11.2.0/crs/install/rootcrs.pl
To update inventory properties for Grid Infrastructure, perform the following
steps. If a pre-11.2 home is already configured, execute the following:
11.2_Home/oui/bin/runInstaller -updateNodeList -silent -local CRS=false ORACLE_HOME=pre-11.2_Home
Always execute the following to register the current home:
11.
4000
2_Home/oui/bin/runInstaller -updateNodeList -silent -local CRS=true ORACLE_HOME=11.2_Home.
If either home is shared, provide the additional argument -cfs.
[root@localhost ~]# /app/app/grid/product/11.2.0/perl/bin/perl -I/app/app/grid/product/11.2.0/perl/lib -I/app/app/grid/product/11.2.0/crs/install /app/app/grid/product/11.2.0/crs/install/roothas.pl
2015-06-15 11:36:07: Checking for super user privileges
2015-06-15 11:36:07: User has super user privileges
2015-06-15 11:36:07: Parsing the host name
Using configuration parameter file: /app/app/grid/product/11.2.0/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node localhost successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
ADVM/ACFS is not supported on oraclelinux-release-5-7.0.2
localhost 2015/06/15 11:36:37 /app/app/grid/product/11.2.0/cdata/localhost/backup_20150615_113637.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
--查看验证
[grid@localhost ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.cssd ora.cssd.type OFFLINE OFFLINE
ora.diskmon ora....on.type OFFLINE OFFLINE
[grid@localhost ~]$ srvctl add asm
[grid@localhost ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.asm ora.asm.type OFFLINE OFFLINE
ora.cssd ora.cssd.type OFFLINE OFFLINE
ora.diskmon ora....on.type OFFLINE OFFLINE
[grid@localhost ~]$ srvctl start asm
[grid@localhost ~]$ ps -ef|grep asm
grid 4960 1 0 11:41 ? 00:00:00 asm_pmon_+ASM
grid 4964 1 0 11:41 ? 00:00:00 asm_vktm_+ASM
grid 4970 1 0 11:41 ? 00:00:00 asm_gen0_+ASM
grid 4974 1 0 11:41 ? 00:00:00 asm_diag_+ASM
grid 4978 1 0 11:41 ? 00:00:00 asm_psp0_+ASM
grid 4982 1 0 11:41 ? 00:00:00 asm_dia0_+ASM
grid 4986 1 0 11:41 ? 00:00:00 asm_mman_+ASM
grid 4990 1 0 11:41 ? 00:00:00 asm_dbw0_+ASM
grid 4994 1 0 11:41 ? 00:00:00 asm_lgwr_+ASM
grid 4998 1 0 11:41 ? 00:00:00 asm_ckpt_+ASM
grid 5002 1 0 11:41 ? 00:00:00 asm_smon_+ASM
grid 5006 1 0 11:41 ? 00:00:00 asm_rbal_+ASM
grid 5010 1 0 11:41 ? 00:00:00 asm_gmon_+ASM
grid 5014 1 0 11:41 ? 00:00:00 asm_mmon_+ASM
grid 5018 1 0 11:41 ? 00:00:00 asm_mmnl_+ASM
grid 5035 4646 0 11:41 pts/1 00:00:00 grep asm
[grid@localhost ~]$ asmcmd
ASMCMD> lsdg
ASMCMD>
--asmca 添加dg
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 20473 17502 0 17502 0 N DG1/
ASMCMD>
总结:升级的时候对asm底层修改 并不是很大...
基于安全要求,我还是决定备份元数据信息*****
ASMCMD> md_backup /tmp/oradgbackup20110322
[grid@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 15 11:45:07 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Automatic Storage Management option
SQL>
--1 环境确认
[grid@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Mon Jun 15 11:24:32 2015
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> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Automatic Storage Management option
[grid@localhost ~]$ asmcmd
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 20473 17502 0 17502 0 N DG1/
ASMCMD>
--2 关闭服务
[grid@localhost ~]$ crsctl stop has
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'localhost'
CRS-2673: Attempting to stop 'ora.DG1.dg' on 'localhost'
CRS-2677: Stop of 'ora.DG1.dg' on 'localhost' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'localhost'
CRS-2677: Stop of 'ora.asm' on 'localhost' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'localhost'
CRS-2677: Stop of 'ora.cssd' on 'localhost' succeeded
CRS-2673: Attempting to stop 'ora.evmd' on 'localhost'
CRS-2677: Stop of 'ora.evmd' on 'localhost' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'localhost' has completed
CRS-4133: Oracle High Availability Services has been stopped.
--卸载集群【命令清楚集群信息】
[root@localhost ~]# /app/app/11.2.0/grid_1/crs/install/rootcrs.pl -verbose -deconfig -force
Using configuration parameter file: /app/app/11.2.0/grid_1/crs/install/crsconfig_params
Usage: srvctl <command> <object> [<options>]
commands: enable|disable|start|stop|status|add|remove|modify|getenv|setenv|unsetenv|config|upgrade
objects: database|service|asm|diskgroup|listener|home|ons
For detailed help on each command and object and its options use:
srvctl <command> -h or
srvctl <command> <object> -h
PRKO-2012 : nodeapps object is not supported in Oracle Restart
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Stop failed, or completed with errors.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Modify failed, or completed with errors.
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Delete failed, or completed with errors.
CRS-4013: This command is not supported in a single-node configuration.
CRS-4000: Command Stop failed, or completed with errors.
################################################################
# You must kill processes or reboot the system to properly #
# cleanup the processes started by Oracle clusterware #
################################################################
error: package cvuqdisk is not installed
Successfully deconfigured Oracle clusterware stack on this node
[root@localhost ~]# reboot
Broadcast message from root (pts/1) (Mon Jun 15 11:31:48 2015):
The system is going down for reboot NOW!
[root@localhost ~]#
--恢复还原11g gi
[root@localhost ~]# /app/app/grid/product/11.2.0/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= grid
ORACLE_HOME= /app/app/grid/product/11.2.0
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n)
: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n)
: y
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
To configure Grid Infrastructure for a Stand-Alone Server run the following command as the root user:
/app/app/grid/product/11.2.0/perl/bin/perl -I/app/app/grid/product/11.2.0/perl/lib -I/app/app/grid/product/11.2.0/crs/install /app/app/grid/product/11.2.0/crs/install/roothas.pl
To configure Grid Infrastructure for a Cluster perform the following steps:
1. Provide values for Grid Infrastructure configuration parameters in the file - /app/app/grid/product/11.2.0/crs/install/crsconfig_params. For details on how to do this, see the installation guide.
2. Run the following command as the root user:
/app/app/grid/product/11.2.0/perl/bin/perl -I/app/app/grid/product/11.2.0/perl/lib -I/app/app/grid/product/11.2.0/crs/install /app/app/grid/product/11.2.0/crs/install/rootcrs.pl
To update inventory properties for Grid Infrastructure, perform the following
steps. If a pre-11.2 home is already configured, execute the following:
11.2_Home/oui/bin/runInstaller -updateNodeList -silent -local CRS=false ORACLE_HOME=pre-11.2_Home
Always execute the following to register the current home:
11.
4000
2_Home/oui/bin/runInstaller -updateNodeList -silent -local CRS=true ORACLE_HOME=11.2_Home.
If either home is shared, provide the additional argument -cfs.
[root@localhost ~]# /app/app/grid/product/11.2.0/perl/bin/perl -I/app/app/grid/product/11.2.0/perl/lib -I/app/app/grid/product/11.2.0/crs/install /app/app/grid/product/11.2.0/crs/install/roothas.pl
2015-06-15 11:36:07: Checking for super user privileges
2015-06-15 11:36:07: User has super user privileges
2015-06-15 11:36:07: Parsing the host name
Using configuration parameter file: /app/app/grid/product/11.2.0/crs/install/crsconfig_params
LOCAL ADD MODE
Creating OCR keys for user 'grid', privgrp 'oinstall'..
Operation successful.
CRS-4664: Node localhost successfully pinned.
Adding daemon to inittab
CRS-4123: Oracle High Availability Services has been started.
ohasd is starting
ADVM/ACFS is not supported on oraclelinux-release-5-7.0.2
localhost 2015/06/15 11:36:37 /app/app/grid/product/11.2.0/cdata/localhost/backup_20150615_113637.olr
Successfully configured Oracle Grid Infrastructure for a Standalone Server
--查看验证
[grid@localhost ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.cssd ora.cssd.type OFFLINE OFFLINE
ora.diskmon ora....on.type OFFLINE OFFLINE
[grid@localhost ~]$ srvctl add asm
[grid@localhost ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.asm ora.asm.type OFFLINE OFFLINE
ora.cssd ora.cssd.type OFFLINE OFFLINE
ora.diskmon ora....on.type OFFLINE OFFLINE
[grid@localhost ~]$ srvctl start asm
[grid@localhost ~]$ ps -ef|grep asm
grid 4960 1 0 11:41 ? 00:00:00 asm_pmon_+ASM
grid 4964 1 0 11:41 ? 00:00:00 asm_vktm_+ASM
grid 4970 1 0 11:41 ? 00:00:00 asm_gen0_+ASM
grid 4974 1 0 11:41 ? 00:00:00 asm_diag_+ASM
grid 4978 1 0 11:41 ? 00:00:00 asm_psp0_+ASM
grid 4982 1 0 11:41 ? 00:00:00 asm_dia0_+ASM
grid 4986 1 0 11:41 ? 00:00:00 asm_mman_+ASM
grid 4990 1 0 11:41 ? 00:00:00 asm_dbw0_+ASM
grid 4994 1 0 11:41 ? 00:00:00 asm_lgwr_+ASM
grid 4998 1 0 11:41 ? 00:00:00 asm_ckpt_+ASM
grid 5002 1 0 11:41 ? 00:00:00 asm_smon_+ASM
grid 5006 1 0 11:41 ? 00:00:00 asm_rbal_+ASM
grid 5010 1 0 11:41 ? 00:00:00 asm_gmon_+ASM
grid 5014 1 0 11:41 ? 00:00:00 asm_mmon_+ASM
grid 5018 1 0 11:41 ? 00:00:00 asm_mmnl_+ASM
grid 5035 4646 0 11:41 pts/1 00:00:00 grep asm
[grid@localhost ~]$ asmcmd
ASMCMD> lsdg
ASMCMD>
--asmca 添加dg
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 20473 17502 0 17502 0 N DG1/
ASMCMD>
总结:升级的时候对asm底层修改 并不是很大...
基于安全要求,我还是决定备份元数据信息*****
ASMCMD> md_backup /tmp/oradgbackup20110322
[grid@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on Mon Jun 15 11:45:07 2015
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Automatic Storage Management option
SQL>
相关文章推荐
- js 中的 prototype
- 字节流与字符流
- [POI 2011]Lightning Conductor(DP优化)
- tsm 客户端密码过期处理
- 进阶排序算法
- jsp 中 request.getHeader() 相关详细
- Leetcode_220 Contains Duplicate III
- 浅谈网络文案的用户体验
- 【Pytest】python单元测试框架pytest简介
- 集群添加节点失败
- 正则表达式的使用
- CDNPlus的作用和架构
- Ubuntu 12.04 安装 skype
- 如何查看和分析IIS日志
- 第八章:sharding 分片
- 索引键的唯一性(4/4):非唯一聚集索引上的唯一和非唯一非聚集索引
- 第七章:管理维护Replica Sets(读写分离&故障转移&增删节点)
- Vijava (模板部署虚拟机,并指定自定义规范(终极版本))
- Jenkins部分插件介绍
- Linux 安装Maven和nexus代理仓库