From 75df66b6f12abec9b6d3859eea2375fa8bf4289e Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 13 Mar 2015 11:33:18 +0000 Subject: [PATCH] Don't try and monitor spun down hot spare disks --- cookbooks/hardware/recipes/default.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cookbooks/hardware/recipes/default.rb b/cookbooks/hardware/recipes/default.rb index c9da86168..914ff6d73 100644 --- a/cookbooks/hardware/recipes/default.rb +++ b/cookbooks/hardware/recipes/default.rb @@ -280,6 +280,8 @@ if status_packages["megaclisas-status"] IO.popen(["megacli", "-PDList", "-a#{controller}", "-NoLog"]).each do |line| disks << { :device => device, :driver => "megaraid", :id => Regexp.last_match[1] } if line =~ /^Device Id: ([0-9]+)$/ + + disks.pop if line =~ /^Firmware state: Hotspare, Spun down$/ end controller += 1 -- 2.43.2