问题描述:rhel 6.5安装oracle 12.2.0.1 rac时出现I/O scheduler告警,如下图所示:
1、问题重现

详细告警信息如下:
I/O scheduler - This task checks the I/O scheduler parameter configured
Verification WARNING result on node: cbdps01 Details:
PRVG-11975 : The I/O scheduler parameter of device "/dev/sdb1" did not match the expected value on nodes "cbdps02,cbdps01". [Expected scheduler = "deadline" ; Found scheduler = "cfq"]- Cause:The I/O scheduler parameter of the indicated device was not the expected value on the indicated nodes.- Action:Change the I/O scheduler parameter using ''echo deadline > /sys/block/<device>/queue/scheduler'' command of the indicated device to ensure it is the expected value.
Verification WARNING result on node: cbdps02 Details:
PRVG-11975 : The I/O scheduler parameter of device "/dev/sdb1" did not match the expected value on nodes "cbdps02,cbdps01". [Expected scheduler = "deadline" ; Found scheduler = "cfq"]- Cause:The I/O scheduler parameter of the indicated device was not the expected value on the indicated nodes.- Action:Change the I/O scheduler parameter using ''echo deadline > /sys/block/<device>/queue/scheduler'' command of the indicated device to ensure it is the expected value.
2、异常原因
安装Oracle RAC时出现关于I/O调度器的错误,根据提示信息了解到设备 /dev/sdb1 的 I/O调度器参数未设置为预期值。在该错误中预期的调度器是deadline,而实际找到的调度器是cfq.
I/O调度器(Input/Output Scheduler)是Linux内核用来控制磁盘I/O操作的顺序和优化策略的机制。Oracle RAC在安装时,要求特定的I/O调度器来确保高效的磁盘I/O操作和性能。错误信息中提到的调度器cfq(完全公平队列调度器)通常不适用于数据库应用,因为它会对I/O请求进行更加平等的调度,可能不符合数据库对性能的要求。而deadline调度器则更适合数据库负载,因为它会根据I/O请求的延迟和截止时间来调度I/O操作。因此导致该错误的原因是/dev/sdb1设备的I/O调度器设置为cfq,而Oracle RAC期望其为 deadline。
3、解决方案
按照错误提示所说,可以通过以下步骤来更改设备的 I/O 调度器为deadline.
a、查看当前 I/O 调度器设置: 通过以下命令查看/dev/sdb1设备当前的 I/O 调度器设置:
cat /sys/block/sdb1/queue/scheduler
b、 更改 I/O 调度器: 使用以下命令将设备的 I/O 调度器设置为deadline.
echo deadline > /sys/block/sdb1/queue/scheduler
c、 确保该设置在重启后生效: 这个更改是临时的,系统重启后可能会失效。为了在系统重启后依然生效,可以将其添加到启动脚本中,或者修改 /etc/rc.local 文件(如果存在)以执行这个命令,或者使用 udev 规则来确保在每次启动时设置 I/O 调度器。
在 /etc/rc.local 文件中添加以下行:
echo deadline > /sys/block/sdb1/queue/scheduler
d、 验证更改: 更改完毕后,可以再次使用以下命令来验证 I/O 调度器是否已经设置为 deadline:
cat /sys/block/sdb1/queue/scheduler
e、 在所有节点上执行相同的操作: 如果正在安装 Oracle RAC,确保在所有节点(例如 cbdps01 和 cbdps02)上执行相同的操作,以确保所有节点的 I/O 调度器一致。
执行完这些步骤后,你应该能够解决该问题并继续 Oracle RAC 的安装。
4、实际操作
[root@cbdps01 ~]# echo deadline > /sys/block/sdb/queue/scheduler
[root@cbdps01 ~]# cat /sys/block/sdb/queue/scheduler
noop anticipatory [deadline] cfq
[root@cbdps01 ~]# echo deadline > /sys/block/sdc/queue/scheduler
[root@cbdps01 ~]# cat /sys/block/sdc/queue/scheduler
noop anticipatory [deadline] cfq
[root@cbdps01 ~]# vi /etc/rc.local
[root@cbdps01 ~]# cat /etc/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo deadline > /sys/block/sdb/queue/scheduler
echo deadline > /sys/block/sdc/queue/scheduler