The purpose of this document is to provide information about the ASM rolling upgrade feature and Step by Step to install a patchset or patch in ASM Home without downtime.
Solution
The following conditions should be met for to perform ASM rolling upgrade
(*) An ASM rolling upgrade applies only to clustered ASM instances.
(*) Separate ASM Home. (ASM and DB Home should not be same)
(*) You can perform rolling upgrades only in environments with 11g release 1 (11.1) and later release
ie The following combination is possible
11g CRS ,11g ASM with 11g Database
or
11g CRS.11g ASM with 10g Database
(*) ASM SID format should be +ASM[1-9]
/etc/oratab
+ASM1:/oracle/asm/product/11.1.0/asm_1:N
db11g:/oracle/asm/product/11.1.0/db_1:N
ASM Rolling Upgrade (Step by Step)
1) To perform a rolling upgrade ,you should have separate ASM Home
To enable the ASM instance for rolling migration mode,you can use this command to start the rolling migration to <database version>.
ALTER SYSTEM START ROLLING MIGRATION TO '11.1.0.7.0';
You can run this command from any one of the ASM instance in the Cluster.This command does not actually perform the rolling migration but communicates with all the ASM instances in the cluster.This command informs the other ASM instances of RAC that it is preparing to perform an upgrade.Once the rolling migration is enabled ,you can query each ASM instance to view current state of the ASM;
SQL> select sys_context ('sys_cluster_properties','cluster_state') from dual;
SYS_CONTEXT('SYS_CLUSTER_PROPERTIES','CLUSTER_STATE')
--------------------------------------------------------------------------------
In Rolling Upgrade
The above output shows ASM instance in Rolling Upgrade status.Once you confirm the state of the ASM instance in rolling Upgrade ,you can now safely perform the below steps to Upgrade ASM home in Rolling method.
2) Shutdown the DB Instance,ASM instance and listener
srvctl stop instance -d <db name> -i <instance name>
srvctl stop asm -n <node name>
srvctl stop listener -n <node name> -l <listener name>
3) Apply the software upgrade to the ASM Home.
Select the current node from the Node Selection Page ("Specify Hardware Cluster Installation Mode")
Node Selection Page does not allow to deselect the remote node(s) for the following reason
ASM and Database Homes are same
ASM SID 的格式不是 +ASM[1-9]
4) 在本地应用补丁7436280(*此步骤仅在从 11.1.0.6 升级到 11.1.0.7 补丁集时需要*)
cd 7436280
opatch apply -local
5) 启动 ASM 实例、数据库实例、监听器
srvctl 启动 asm -n <node name>
srvctl 启动实例 -d <db 名称> -i <实例名称>
srvctl 启动侦听器 -n <node name> -l <listener name>
6) 对群集中剩余的 ASM 实例重复步骤 2 到 5。
7) 在所有节点上成功升级 ASM 后,需要结束 ASM 滚动迁移操作,并向 ASM 实例新版本状态发出信号。
更改系统停止滚动迁移;
* 验证集群的所有成员是否都使用相同的软件版本。如果存在一个或多个具有不同版本的 ASM 实例,则 Oracle 将显示错误,并且群集将继续处于滚动升级模式。
* 如果 ASM_POWER_LIMIT 参数的设置启用了重新平衡操作,则会重新启动挂起的重新平衡操作。
* ASM 实例开始支持完整的群集 ASM 功能。
ASM 滚动降级
您需要有一个 ASM Home 软件和中央清单备份(在应用补丁集之前)才能降级。
执行以下步骤以删除 11.1.0.7 修补程序集
1) 要为 ASM 实例启用滚动降级模式,您可以使用此命令启动滚动迁移以<数据库版本>。
更改系统开始滚动迁移到 '11.1.0.7.0'
此命令实际上不执行滚动降级,而是与群集中的所有 ASM 实例进行通信。此命令通知 RAC 的其他 ASM 实例它正准备执行降级。开启滚动降级后,您可以查询每个ASM实例查看ASM的当前状态;
SQL>从对偶中选择sys_context(“sys_cluster_properties”,“cluster_state”);
SYS_CONTEXT('SYS_CLUSTER_PROPERTIES','CLUSTER_STATE')
--------------------------------------------------------------------------------
在滚动降级中
上面的输出显示处于“滚动降级”状态的 ASM 实例。在滚动降级中确认 ASM 实例的状态后,您现在可以安全地执行以下步骤,在滚动方法中降级 ASM 主页。
2) 关闭实例、ASM 实例和侦听器。
srvctl stop instance -d <db name> -i <instance name>
srvctl stop asm -n <node name>
srvctl stop listener -n <node name> -l <listener name>
3) 还原在应用修补程序集之前备份的 Oracle 11g 安装和中央清单。(请参阅 /etc/oraInst.loc。
4)启动ASM实例并检查v$版本信息显示以前的版本,即11.1.0.6
srvctl start asm -n <node name>
srvctl start instance -d <db name> -i <instance name>
srvctl start listener -n <node name> -l <listener name>
5) 对群集中剩余的 ASM 实例重复步骤 2 到 4。
6) 在所有节点上成功降级 ASM 后,需要结束 ASM 滚动降级操作,并向 ASM 实例新版本状态发出信号。
更改系统停止滚动迁移;
在 ASM 升级/降级模式下,只允许执行以下操作。
* 挂载磁盘组
* 卸载磁盘组
* 数据库文件打开、关闭、调整大小和删除
* 对固定视图和固定包的有限访问,即只有本地视图可用;在滚动升级/降级模式下
不允许所有全局视图,不允许执行操作
* 重新平衡
* 添加/删除/联机/脱机磁盘
请检查 ASM 滚动升级的已知问题。
注意.742647.1 在 KSXPCINI()
中使用 SIGSEGV 时 ASM 滚动升级失败 注意.746816.1 Ora-15160:在升级到 11.1.0.7.0
期间滚动迁移内部致命错误 bug 7673203 如果 SID 格式不是 +ASM,则无法执行 ASM 滚动升级[1-9]