Follow

Test Description

Host PowerTools checks that all NFINIDAT SCSI-disk devices use the noop I/O scheduler.

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

To enforce the configuration on all future NFINIDAT devices and also across all reboots, a udev rule must be added/modified as described below.

This test fails when Host PowerTools finds that:

  • A udev rule exists for setting the noop I/O scheduler for NFINIDAT sd devices and dm (multipath) devices
  • An active I/O scheduler for all NFINIDAT sd devices is set as noop

This test passes when Host PowerTools finds the following:

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

How to apply the required fix

Automatic fix

Host PowerTools follows the same instructions (automatically) as described below in the manual fix.

Manual fix

On legacy udev systems, such as redhat-5, suse-11 and their equivalent

To install the udev rule:

  1. 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'"
  2. For every NFINIDAT device, run the following to change the active I/O scheduler for sd devices:

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

On systemd-based systems, such as redhat-7, ubuntu-14.04 and their equivalent

To install the udev rule:

  1. Write 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 '/opt/infinidat/host-power-tools/src/infi/vendata/powertools/settings/cases/linux/base_cases/io_scheduler/scsi-io-scheduler.sh' $env{DEVPATH}"
    ACTION=="add|change", KERNEL=="dm-*", RUN+="/bin/bash '/opt/infinidat/host-power-tools/src/infi/vendata/powertools/settings/cases/linux/base_cases/io_scheduler/dm-io-scheduler.sh' $env{DEVPATH}"
    
  2. Add the "elevator" option to the existing GRUB_CMDLINE_LINUX line in /etc/default/grub:

    GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap elevator=none" <<= RHEL8 or later
    GRUB_CMDLINE_LINUX="crashkernel=auto rd.lvm.lv=rhel00/root rd.lvm.lv=rhel00/swap elevator=noop" <<= RHEL7 
  3. Rebuild grub.cfg:

    On BIOS based systems: grub2-mkconfig -o /boot/grub2/grub.cfg
    On UEFI based systems: grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

Reference: https://access.redhat.com/solutions/109223


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

0 out of 0 found this helpful

Last edited: 2022-08-06 08:28:06 UTC

Comments