ansible-personal/roles/common/templates/etc/udev/rules.d/60-scheduler.rules.j2

11 lines
641 B
Django/Jinja

# set noop scheduler for non-rotating disks (SSD)
# the glob matches sd* on physical hosts, xvd* on Xen hosts, and vd* on KVM hosts
ACTION=="add|change", KERNEL=="xvd[a-z]|[sv]d[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="noop"
# set deadline scheduler for rotating disks
# the glob matches sd* on physical hosts, xvd* on Xen hosts, and vd* on KVM hosts
#
# newer KVM guests (Ubuntu 14.04 at least, so Linux >=3.13) using virtio vda don't
# allow it to be set, but it's non fatal so let's just set it for now
ACTION=="add|change", KERNEL=="xvd[a-z]|[sv]d[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="deadline"