Skip to content

ansemjo/zpool-scrub-timers

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zpool-scrub-timers(8) -- scheduled zpool scrubbing

SYNOPSIS

systemctl enable --now [email protected]

or

systemctl enable --now [email protected]

DESCRIPTION

These unit files initiate a zpool scrub on a regular basis (weekly or monthly). For one-off scrubs you should simply use zpool scrub tank, where tank is the pool to be scrubbed.

See zpool(8) for documentation of zpool subcommands.

Note that some time ago zfsutils started packaging a cron job in /etc/cron.d/zfsutils-linux, which simply scrubs all pools on every 2nd Sunday of the month. So you might not actually need this separate unit anymore, unless you want finer granularity or just prefer to use a systemd timer.

USAGE

The only option to these timers is the pool name to be scrubbed. If your pool name is mypool and you want to schedule weekly scrubs use

systemctl enable --now [email protected]

INSTALLATION

After cloning the repository or downloading and extracting a release use make install to install the unit files in /etc/systemd/system.

Afterwards reload your daemon with systemd daemon-reload and enable the desired timer (see USAGE).

EXAMPLE

Clone the repository:

cd /tmp
git clone https://github.com/ansemjo/systemd-zpool-scrub-timers.git
cd systemd-zpool-scrub-timers/

Install unit files:

sudo make install

Enable timer:

sudo systemctl enable --now [email protected]

About

enable scheduled zpool scrubbing with a systemd timer

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Roff 52.7%
  • Makefile 47.3%