]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/recipes/default.rb
Don't do SMART checks on spun down disks
[chef.git] / cookbooks / hardware / recipes / default.rb
index 0b7b3e6f3f88dfa03f1b656cc4304b3d9f223c17..d929bbf5746f3ae6927bcd05529bb7ded68175b4 100644 (file)
@@ -298,6 +298,8 @@ end
 end
 
 disks = node[:hardware][:disk][:disks].map do |disk|
+  next if disk[:state] == "spun_down"
+
   if disk[:smart_device]
     controller = node[:hardware][:disk][:controllers][disk[:controller]]
     device = controller[:device].sub("/dev/", "")