]> git.proxmox.com Git - zfsonlinux.git/blob - zfs/debian/tree/zfsutils-linux/usr/lib/zfs-linux/scrub
29b7709617a308ed959cf759b0a7b6fba4509e4e
[zfsonlinux.git] / zfs / debian / tree / zfsutils-linux / usr / lib / zfs-linux / scrub
1 #!/bin/sh -eu
2
3 # Scrub all healthy pools.
4 zpool list -H -o health,name 2>&1 | \
5 awk 'BEGIN {FS="\t"} {if ($1 ~ /^ONLINE/) print $2}' | \
6 while read pool
7 do
8 zpool scrub "$pool"
9 done