Files
zfsonlinux/debian/tree/zfsutils-linux/usr/lib/zfs-linux/scrub
T

10 lines
183 B
Bash
Raw Normal View History

2019-01-30 15:26:24 +01:00
#!/bin/sh -eu
# Scrub all healthy pools.
zpool list -H -o health,name 2>&1 | \
awk 'BEGIN {FS="\t"} {if ($1 ~ /^ONLINE/) print $2}' | \
while read pool
do
zpool scrub "$pool"
done