device: Fix QEMU udev
authorGrant Slater <git@firefishy.com>
Wed, 15 Jan 2020 13:47:36 +0000 (13:47 +0000)
committerGrant Slater <git@firefishy.com>
Wed, 15 Jan 2020 13:47:36 +0000 (13:47 +0000)
cookbooks/devices/templates/default/udev.rules.erb

index 3b5bab5ddc674f06bc4be2f82e290c4a521192ce..453357815af6124d4c35b3b80075752defe120e4 100644 (file)
@@ -93,8 +93,9 @@ ACTION=="add", SUBSYSTEM=="block", DRIVERS=="virtio_blk", ATTR{queue/read_ahead_
 # Note virtio sets scheduler to none automatically
 
 # QEMU Disk IO tune
-ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_VENDOR}=="QEMU", ENV{ID_MODEL}=="QEMU_HARDDISK", ATTR{queue/read_ahead_kb}="4096"
-# Note QEMU sets scheduler to none automatically
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_MODEL}=="QEMU_HARDDISK", ATTR{queue/read_ahead_kb}="4096"
+ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_MODEL}=="QEMU_HARDDISK", ATTR{queue/scheduler}="noop"
+# Vendor is sometimes missing
 
 # Increase default MD raid5/raid6 strip cache
 ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{MD_LEVEL}=="raid5", ATTR{md/stripe_cache_size}="8192"