my @out;
my $drives;
my $pci;
-my $scsi;
my $type;
my $mdadm;
my $fullcommand;
my $hostname = `uname -n`;
chomp $hostname;
my $pci = `lspci | /bin/grep -i raid | /bin/grep -v PATA | /usr/bin/head -1`;
-my $scsi = `lspci | /bin/grep -i scsi | /bin/grep -v PATA | /usr/bin/head -1`;
my $smartctl = "/usr/sbin/smartctl";
}
}
-#1068 IT controller OR Intel SAS.
-if ( $scsi =~ /SAS1068E/i || $scsi =~ /Patsburg/i )
-{
- open(BLOCK,"cat /proc/partitions | grep -w sd[a-z] |");
- while (<BLOCK>)
- {
- my @output = split;
- my $blockdevice = $output[3];
- foreach ( $blockdevice )
- {
- $drives++;
- smartctl("$smartctl","none",$blockdevice,"none");
- }
- }
-}
-
-
# software raid!
if (-e "/proc/mdstat")
{
}
}
+# assume JBOD/direct access if not areca or hw raid
+if ( $mdadm == 0 && $pci !~ /areca/i )
+{
+ open(BLOCK,"cat /proc/partitions | grep -w sd[a-z] |");
+ while (<BLOCK>)
+ {
+ my @output = split;
+ my $blockdevice = $output[3];
+ foreach ( $blockdevice )
+ {
+ $drives++;
+ smartctl("$smartctl","none",$blockdevice,"none");
+ }
+ }
+}
+
# show results
my $result = 0;
$result = 1 if $warn;