Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
256 B

#!/bin/bash -e
# Suspend any running pool scrubs
for ZPOOL in $(zpool list -H -o name); do
if [ $(zpool status $ZPOOL | grep -c 'scrub in progress') -ge 1 ]; then
echo scrub running for pool $ZPOOL, suspending it
zpool scrub -p $ZPOOL
fi
done