Don't try and monitor spun down hot spare disks
authorTom Hughes <tom@compton.nu>
Fri, 13 Mar 2015 11:33:18 +0000 (11:33 +0000)
committerTom Hughes <tom@compton.nu>
Fri, 13 Mar 2015 11:33:18 +0000 (11:33 +0000)
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