|
|
|
@ -18,7 +18,10 @@ if (-x '/opt/MegaRAID/MegaCli/MegaCli64'){ |
|
|
|
|
$megacli = '/opt/MegaRAID/MegaCli/MegaCli'; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
exit (0) unless($megacli); |
|
|
|
|
if (!$megacli){ |
|
|
|
|
print "MegaCli not installed, nothing to do\n"; |
|
|
|
|
exit 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
my $adapters = 0; |
|
|
|
|
foreach (qx($megacli -adpCount -NoLog)) { |
|
|
|
@ -42,6 +45,7 @@ foreach my $adp (0..$adapters-1){ |
|
|
|
|
next if ($hba && $failgrouplist); |
|
|
|
|
|
|
|
|
|
# Save the config in binary format |
|
|
|
|
print "Saving config for adapter $adp\n"; |
|
|
|
|
qx($megacli -CfgSave -f /home/lbkp/megaraid/cfg_$adp.bin -a$adp -NoLog); |
|
|
|
|
die "Failed to backup conf for adapter $adp\n" unless ($? == 0); |
|
|
|
|
|
|
|
|
|