Follow

Test Description

The tools checks that all NFINIDAT scsi-disk devices uses the noop I/O scheduler.

Linux provides a mechanism over sysfs to control the current I/O scheduler for every block devices, but no mechanism to make this change persistent.

To make it stick for all NFINIDAT devices, current and future ones, and across reboots, a udev rule must be added.



This test case fails if:

  • The tool checks our udev rule exists for setting the noop I/O scheduler for NFINIDAT sd devices and dm (multipath) devices
  • The tool checks that active I/O scheduler for all NFINIDAT sd devices is noop


This test case passes if:

  • All NFINIDAT sd devices and dm devices use the noop I/O scheduler
  • The udev rule exists, or the kernel is configured to use the noop I/O scheduler by default (elevator=noop is in the kernel load parameters)


How to fix this test

Automatic fix

The tool follows the instructions mentioned below in the manual fix

Manual fix

To install the udev rule:

  • on legacy udev systems, such as redhat-5, suse-11 and their equivalents: write the following contents to /etc/udev/rules.d/39-infinidat-io-scheduler.rules:

    ACTION=="add|change", KERNEL=="sd[a-z]*", SYSFS{vendor}=="NFINIDAT", RUN+="/bin/sh -c 'echo noop > /sys$DEVPATH/queue/scheduler'"
    ACTION=="add|change", KERNEL=="dm-*", RUN+="/bin/bash -c 'export DEV=`/bin/basename $DEVPATH`; export MPATH=`cat /sys/block/$$DEV/slaves/sd*/device/vendor`; if [[ $$MPATH == *NFINIDAT* ]] && [[ -f /sys/block/$$DEV/queue/scheduler ]]; then echo noop > /sys/block/$$DEV/queue/scheduler; fi'"

     

  • on systemd-based systems, such as redhat-7, ubuntu-14.04 and their equivalents:rite the following contents to /lib/udev/rules.d/99-infinidat-io-scheduler.rules:

    ACTION=="add|change", KERNEL=="sd[a-z]*", ENV{ID_VENDOR}=="NFINIDAT" RUN+="/bin/sh -c 'echo noop > /sys$env{DEVPATH}/queue/scheduler'"
    ACTION=="add|change", KERNEL=="dm-*", RUN+="/bin/bash -c 'export DEV=`/bin/basename $env{DEVNAME} || /usr/bin/basename $env{DEVNAME}`; export MPATH=`cat /sys/block/$DEV/slaves/sd*/device/vendor`; if [[ $MPATH == *NFINIDAT* ]] && [[ -f /sys$env{DEVPATH}/queue/scheduler ]]; then echo noop > /sys$env{DEVPATH}/queue/scheduler; fi'"
    
    

To change the active I/O scheduler for sd devices, run 

echo noop > /sys/block/sdX/queue/scheduler

for every NIFNIDAT device.

Was this article helpful?
0 out of 0 found this helpful

0 out of 0 found this helpful

Comments