]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/hardware/recipes/default.rb
Only monitor the first cciss device on each controller
[chef.git] / cookbooks / hardware / recipes / default.rb
index a81e0966c3df05dc6385f30dfdf0ee6df2555e89..a561681ac32c2d0ee233f95501b2f556ee9947d2 100644 (file)
@@ -172,8 +172,8 @@ end
 
 node[:block_device].each do |name,attributes|
   if attributes[:vendor] == "HP" and attributes[:model] == "LOGICAL VOLUME"
-    if name =~ /^cciss!(.*)$/
-      status_packages["cciss-vol-status"] |= [ "cciss/#{$1}" ]
+    if name =~ /^cciss!(c[0-9]+)d[0-9]+$/
+      status_packages["cciss-vol-status"] |= [ "cciss/#{$1}d0" ]
     else
       Dir.glob("/sys/block/#{name}/device/scsi_generic/*").each do |sg|
         status_packages["cciss-vol-status"] |= [ File.basename(sg) ]