]> git.openstreetmap.org Git - chef.git/commitdiff
Use a udev rule to enable request merging for NVME devices
authorTom Hughes <tom@compton.nu>
Wed, 3 Apr 2019 18:20:26 +0000 (19:20 +0100)
committerTom Hughes <tom@compton.nu>
Wed, 3 Apr 2019 18:20:26 +0000 (19:20 +0100)
cookbooks/devices/templates/default/udev.rules.erb
roles/dulcy.rb
roles/eddie.rb
roles/karm.rb
roles/odin.rb

index 2d58f21869398c594284c9c7d3e29ee32f95eabb..9c703409dc82e0d1d087272a6bcaef367b7cc778 100644 (file)
@@ -52,3 +52,6 @@ ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV
 ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="ST31000340NS", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,100,100 $env{DEVNAME}"
 ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="HGST_HTS725050A7E630", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,100,100 $env{DEVNAME}"
 ACTION=="add", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", ENV{ID_BUS}=="ata", ENV{ID_MODEL}=="HGST_HTE721010A9E630", RUN+="/usr/sbin/smartctl -q errorsonly -l scterc,100,100 $env{DEVNAME}"
+
+# Enable request merging for NVME devices
+ACTION=="add", SUBSYSTEM=="block", DRIVERS=="nvme", ATTR{queue/nomerges}="1"
index 694c84f93d4674d197f39206455237d3aae10022..35c811f3533109f4a61f5fced107590cdfaf3ef2 100644 (file)
@@ -61,15 +61,6 @@ default_attributes(
       "daux" => "/ssd/tablespaces/daux",
       "iaux" => "/ssd/tablespaces/iaux"
     }
-  },
-  :sysfs => {
-    :md_tune => {
-      :comment => "Enable request merging for NVMe devices",
-      :parameters => {
-        "block/nvme0n1/queue/nomerges" => "1",
-        "block/nvme1n1/queue/nomerges" => "1"
-      }
-    }
   }
 )
 
index 8e9c7c1a87e7f744c761e4210a5fe18d2af4cc52..d900fbb4f41dfe7d1d0809cf6680d2f5596ffdf3 100644 (file)
@@ -38,21 +38,6 @@ default_attributes(
         "kernel.shmall" => 66 * 1024 * 1024 * 1024 / 4096
       }
     }
-  },
-  :sysfs => {
-    :md_tune => {
-      :comment => "Enable request merging for NVMe devices",
-      :parameters => {
-        "block/nvme0n1/queue/nomerges" => "1",
-        "block/nvme1n1/queue/nomerges" => "1",
-        "block/nvme2n1/queue/nomerges" => "1",
-        "block/nvme3n1/queue/nomerges" => "1",
-        "block/nvme4n1/queue/nomerges" => "1",
-        "block/nvme5n1/queue/nomerges" => "1",
-        "block/nvme6n1/queue/nomerges" => "1",
-        "block/nvme7n1/queue/nomerges" => "1"
-      }
-    }
   }
 )
 
index 9f1fc2a9a6ac9d535c8a7280a5b42f3a17c03291..8f0ce7a234de14536cf422a0bbc8028ad677c389 100644 (file)
@@ -41,21 +41,6 @@ default_attributes(
         "kernel.shmall" => 66 * 1024 * 1024 * 1024 / 4096
       }
     }
-  },
-  :sysfs => {
-    :md_tune => {
-      :comment => "Enable request merging for NVMe devices",
-      :parameters => {
-        "block/nvme0n1/queue/nomerges" => "1",
-        "block/nvme1n1/queue/nomerges" => "1",
-        "block/nvme2n1/queue/nomerges" => "1",
-        "block/nvme3n1/queue/nomerges" => "1",
-        "block/nvme4n1/queue/nomerges" => "1",
-        "block/nvme5n1/queue/nomerges" => "1",
-        "block/nvme6n1/queue/nomerges" => "1",
-        "block/nvme7n1/queue/nomerges" => "1"
-      }
-    }
   }
 )
 
index 32791077da47f9069346d201500407cb9b332978..b6c64a1b1a8d8a946392913a3a6aaf297a8d74ac 100644 (file)
@@ -49,15 +49,6 @@ default_attributes(
       }
     }
   },
-  :sysfs => {
-    :md_tune => {
-      :comment => "Enable request merging for NVMe devices",
-      :parameters => {
-        "block/nvme0n1/queue/nomerges" => "1",
-        "block/nvme1n1/queue/nomerges" => "1"
-      }
-    }
-  },
   :tile => {
     :database => {
       :cluster => "10/main",