summaryrefslogtreecommitdiffstats
path: root/modules/partofme
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2018-11-29 23:02:35 -0500
committerJesse Luehrs <doy@tozt.net>2018-11-29 23:02:35 -0500
commit89f919d97912ba0312ec8921d47e62a2aa1db43b (patch)
treee3ddc1874d9b6960970d0cbe4610bffd41701d85 /modules/partofme
parentaba485dca78e05c5ae1881b245a821b4b89670f3 (diff)
downloadpuppet-tozt-89f919d97912ba0312ec8921d47e62a2aa1db43b.tar.gz
puppet-tozt-89f919d97912ba0312ec8921d47e62a2aa1db43b.zip
add a raid scrubbing cron job
Diffstat (limited to 'modules/partofme')
-rw-r--r--modules/partofme/files/raid-scrub3
-rw-r--r--modules/partofme/manifests/persistent.pp8
2 files changed, 10 insertions, 1 deletions
diff --git a/modules/partofme/files/raid-scrub b/modules/partofme/files/raid-scrub
new file mode 100644
index 0000000..739ceae
--- /dev/null
+++ b/modules/partofme/files/raid-scrub
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+echo check >> /sys/block/md127/md/sync_action
diff --git a/modules/partofme/manifests/persistent.pp b/modules/partofme/manifests/persistent.pp
index 95e1ef6..fdc5601 100644
--- a/modules/partofme/manifests/persistent.pp
+++ b/modules/partofme/manifests/persistent.pp
@@ -1,10 +1,16 @@
class partofme::persistent {
+ include cron
+
file {
"/media":
ensure => directory;
"/media/persistent":
ensure => directory,
- require => File["/media"],
+ require => File["/media"];
+ "/etc/cron.weekly/raid-scrub":
+ source => 'puppet:///modules/partofme/raid-scrub',
+ mode => '0755',
+ require => Class['cron'];
}
$fstab_line = "/dev/partofme/data /media/persistent ext4 rw,relatime,noauto 0 2"