Defined Type: zfs::scrub

Defined in:
manifests/scrub.pp

Overview

Set up a zpool scrub cron entry.

Examples:

Scrub a zpool once a month

include zfs

zfs::scrub { 'test':
  hour     => '1',
  minute   => '0',
  month    => '*',
  monthday => '1',
  weekday  => '*',
}

Parameters:

  • zpool (String) (defaults to: $title)

    The name of the zpool.

  • hour (Any)

    See the cron resource type.

  • minute (Any)

    See the cron resource type.

  • month (Any)

    See the cron resource type.

  • monthday (Any)

    See the cron resource type.

  • weekday (Any)

    See the cron resource type.

  • user (String) (defaults to: 'root')

    See the cron resource type.

See Also:

Since:

  • 2.2.0



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'manifests/scrub.pp', line 25

define zfs::scrub (
  Any    $hour,
  Any    $minute,
  Any    $month,
  Any    $monthday,
  Any    $weekday,
  String $zpool    = $title,
  String $user     = 'root',
) {

  include zfs

  cron { "zpool scrub ${zpool}":
    command     => "zpool scrub ${zpool}",
    environment => "PATH=${facts['path']}",
    hour        => $hour,
    minute      => $minute,
    month       => $month,
    monthday    => $monthday,
    weekday     => $weekday,
    user        => $user,
  }
}