]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/recipes/default.rb
Don't try and monitor spun down hot spare disks
[chef.git] / cookbooks / hardware / recipes / default.rb
index c9da86168f4fe00eebcc0aabaa02dd967c1d33cc..914ff6d73e183c73bb958d5d41d92f2e27f626ae 100644 (file)
@@ -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