raid: Added Linux software raid tools support.
This commit is contained in:
parent
956a224453
commit
532e48ba2c
1 changed files with 45 additions and 0 deletions
|
@ -8,6 +8,9 @@ class raid::tools {
|
||||||
if "smartarray" in $controllers {
|
if "smartarray" in $controllers {
|
||||||
include raid::tools::hpacucli
|
include raid::tools::hpacucli
|
||||||
}
|
}
|
||||||
|
if "linux-md" in $controllers {
|
||||||
|
include raid::tools::mdadm
|
||||||
|
}
|
||||||
if "megaraid" in $controllers {
|
if "megaraid" in $controllers {
|
||||||
include raid::tools::megacli
|
include raid::tools::megacli
|
||||||
}
|
}
|
||||||
|
@ -36,6 +39,48 @@ class raid::tools::hpacucli {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Install Linux software raid tools (mdadm).
|
||||||
|
#
|
||||||
|
class raid::tools::mdadm {
|
||||||
|
|
||||||
|
if $::kernel != "Linux" {
|
||||||
|
fail("raid::tools::mdadm not supported in ${::operatingsystem}")
|
||||||
|
}
|
||||||
|
|
||||||
|
package { "mdadm":
|
||||||
|
ensure => installed,
|
||||||
|
}
|
||||||
|
|
||||||
|
case $::operatingsystem {
|
||||||
|
"centos", "fedora": {
|
||||||
|
file { "/etc/mdadm.conf":
|
||||||
|
ensure => present,
|
||||||
|
content => "MAILADDR root\n",
|
||||||
|
mode => "0644",
|
||||||
|
owner => "root",
|
||||||
|
group => "root",
|
||||||
|
require => Package["mdadm"],
|
||||||
|
notify => Service["mdadm"],
|
||||||
|
}
|
||||||
|
}
|
||||||
|
default: { }
|
||||||
|
}
|
||||||
|
|
||||||
|
service { "mdadm":
|
||||||
|
ensure => running,
|
||||||
|
name => $::operatingsystem ? {
|
||||||
|
"centos" => "mdmonitor",
|
||||||
|
"fedora" => "mdmonitor",
|
||||||
|
default => "mdadm",
|
||||||
|
},
|
||||||
|
enable => true,
|
||||||
|
hasstatus => true,
|
||||||
|
require => Package["mdadm"],
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Install MegaCli.
|
# Install MegaCli.
|
||||||
#
|
#
|
||||||
# Download MegaCli RPM from:
|
# Download MegaCli RPM from:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue