据库其中一个节点的OCR和Votedisk所在的磁盘组变得不可访问,导致ora.crsd服务脱机,但是该节点的数据库实例不受影响,部分业务可以连接,在这个过程中另外一个节点完全不受影响。下面是相关的日志信息
1. 操作系统日志:
从操作系统看
Aug 5 23:58:45testdb2 kernel: rport-2:0-0: blocked FC remote port time out:removing target and saving binding
Aug 5 23:58:45testdb2 kernel: sd 2:0:0:0:rejecting I/O to offline device
Aug 5 23:58:45testdb2 kernel: sd 2:0:0:5:rejecting I/O to offline device
Aug 5 23:58:45testdb2 kernel: sd 2:0:0:0: [sdb] Result: hostbyte=DID_TRANSPORT_DISRUPTEDdriverbyte=DRIVER_OK
Aug 5 23:58:45testdb2 kernel: sd 2:0:0:0: [sdb] CDB: Write(10)
Aug 5 23:58:45testdb2 kernel: device-mapper:multipath: Failing path 8:16.
Aug 5 23:58:45testdb2 kernel: : 2a 00 00 08 00 12 00 00 01 00
Aug 5 23:58:45testdb2 kernel: end_request: I/O error, dev sdb, sector 524306
Asm 日志
SunAug 05 23:58:48 2018
WARNING:Waited 15 secs for write IO to PST disk 0 in group 1.
WARNING:Waited 15 secs for write IO to PST disk 1 in group 1.
WARNING:Waited 15 secs for write IO to PST disk 2 in group 1.
WARNING:Waited 15 secs for write IO to PST disk 0 in group 1.
WARNING:Waited 15 secs for write IO to PST disk 1 in group 1.
WARNING:Waited 15 secs for write IO to PST disk 2 in group 1.
SunAug 05 23:58:48 2018
NOTE: process _b000_+asm2 (44940) initiating offline of disk0.1825508359 (CRS_0000) with mask 0x7e in group 1
NOTE: process _b000_+asm2 (44940) initiating offline of disk1.1825508360 (CRS_0001) with mask 0x7e in group 1
NOTE: process _b000_+asm2 (44940) initiating offline of disk 2.1825508358(CRS_0002) with mask 0x7e in group 1
Logical corruptioncheck bypassed due to non-privileged user
PATH NAME
---------------------------------------------------------------------------
/dev/asmmpathb CRS_0002
/dev/asmmpathf DATA_0001
/dev/asmmpathd CRS_0000
/dev/asmmpathe DATA_0000
/dev/asmmpathc CRS_0001
疑问一:
OCR
、Votedisk 磁盘组不可用
,而数据dg还正常mount
分析如下:
ASM 特有的心跳超时检测,ASMinstance会定期检查每个asm disk是不是能正常反馈。
1. ASM
实例会定期检查每一个磁盘组的磁盘状态,是否通信正常
2.
这个检查,只是针对normal和high冗余模式,对于external冗余,不会遇到这个错误
3.
默认情况是15s超时,也就是说15s磁盘组还是没有对ASM实例响应的话,就会dismount磁盘组
OCR 、Votedisk 磁盘组一般在安装是都会采用 normal ,保证crs的安全性。本案例中disk 如下:
出现上边的问题是共享的 ASM 磁盘,不在物理主机的本地,而是在存储网络中, ASM 发出去的检测信息,不能及时被反馈,才会出现这个错误。那 ASM 就要 dismount 这个磁盘组了,而目前环境中刚好用的是 svc 管理,并使用了多路径软件, svc 在管理存储时切换路径时,导致 ocr dismount 。
为避免这个问题方案如下:
1. 修改 asm 参数
alter system set"_asm_hbeatiowait"=30 scope=spfile sid='*';
注意:需要重启 ASM/CRS 来时生效( 12.1.0.2 开始,该参数默认值被增加到了 120 秒)。
2. 配置多路径软件(像用 svc 管理、 emc )
Red Hat Linux versions 6.2 and higher and 7.x
product "2145"
path_grouping_policy "group_by_prio"
path_selector "round-robin 0"
prio "alua"
path_checker "tur"
failback "immediate"
no_path_retry 5
rr_weight uniform
rr_min_io_rq "1"
dev_loss_tmo 30
3.OC R 镜像到不同的 ASM 磁盘组
疑问二:
为什么 ora.crsd 挂掉,但是 ora.cssd 没有 OFFLINE (通过 crsctl stat res -t -init 可以确认 ora.cssd 没有挂掉,数据库实例还正常运行,节点并没有被踢出去)而数据库实例还能正常提供服务那?
1. 虽然 OCR 磁盘组异常,但是 voting file 物理上还是可以被 CSS 访问
2. OCR 磁盘组异常,导致 CRS 直接重启,没有做任何资源的关闭清理动作。 CRS 尝试重启了,没有起来。 各资源在物理上仍然存在,只是 crs 异常,无法侦测到他们的状态。
这个跟直接杀掉 crsd.bin 是一样的,并不影响已经存在的数据库实例, vip , listener 等。
grid 48126 1 0 15:23 ? 00:00:00/u01/app/12.2.0/grid/bin/tnslsnr LISTENER -no_crs_notify -inherit
grid 48128 1 0 15:23 ? 00:00:00/u01/app/12.2.0/grid/bin/tnslsnr MGMTLSNR -no_crs_notify -inherit
root 90881 1 1 16:07 ? 00:00:12 /u01/app/12.2.0/grid/bin/crsd.binreboot crsd 进程
grid 91787 1 0 16:08 ? 00:00:00/u01/app/12.2.0/grid/bin/tnslsnr LISTENER_SCAN1 -no_crs_notify -inherit
root 114758 92020 0 16:22 ? 00:00:00 sh -c for i in {1..3}; doprintf "zzz "; date; /usr/bin/pstack 90881; sleep 5; done >>"/u01/app/grid/diagsnap/host01/evt_1_20180808-162236/pstack_90881_crsd_bin.trc"2>&1
root 115011 104640 0 16:22 pts/0 00:00:00 grep crs
[root@host01 ~]#ps -ef |grep smon
root 4738 1 1 11:54 ? 00:03:26/u01/app/12.2.0/grid/bin/osysmond.bin
grid 90840 1 0 16:07 ? 00:00:00 asm_smon_+ASM1
oracle 91906 1 0 16:08 ? 00:00:00 ora_smon_misdb1
root 115078 104640 0 16:22 pts/0 00:00:00 grep smon
[root@host01 ~]# kill-9 90881 ---KILL crsd
[root@host01 ~]#ps -ef |grep smon
root 4738 1 1 11:54 ? 00:03:27/u01/app/12.2.0/grid/bin/osysmond.bin
grid 90840 1 0 16:07 ? 00:00:00 asm_smon_+ASM1---- 没有变
oracle 91906 1 0 16:08 ? 00:00:00 ora_smon_misdb1 --- 没有变
root 115961 104640 0 16:24 pts/0 00:00:00 grep smon
[root@host01 ~]#ps -ef |grep smon
root 4738 1 1 11:54 ? 00:03:27/u01/app/12.2.0/grid/bin/osysmond.bin
grid 90840 1 0 16:07 ? 00:00:00 asm_smon_+ASM1
oracle 91906 1 0 16:08 ? 00:00:00 ora_smon_misdb1
root 116515 104640 0 16:24 pts/0 00:00:00 grep smon
root 115944 1 1 16:23 ? 00:00:14/u01/app/12.2.0/grid/bin/crsd.bin reboot ---crsd 重启
总结:
在11R2以后,OCR、Votedisk 磁盘组不可用后对CSS没有影响。
参考文档
ASM diskgroup dismount with "Waited 15 secs for write IO to PST" (文档 ID 1581684.1)
Why There's no Impact to CSS After ASM Diskgroup for Voting File is Dismounted? (文档 ID 1905378.1)
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10201716/viewspace-2689303/ ,如需转载,请注明出处,否则将追究法律责任。