mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-07-26 15:55:56 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
9
roles/zfs/files/z_resume_scrubs
Normal file
9
roles/zfs/files/z_resume_scrubs
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
# Resume all suspended pool scrubs
|
||||
for ZPOOL in $(zpool list -H -o name); do
|
||||
if [ $(zpool status $ZPOOL | grep -c 'scrub paused') -ge 1 ]; then
|
||||
echo scrub paused for pool $ZPOOL, resuming it
|
||||
zpool scrub $ZPOOL
|
||||
fi
|
||||
done
|
9
roles/zfs/files/z_suspend_scrubs
Normal file
9
roles/zfs/files/z_suspend_scrubs
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/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
|
Reference in New Issue
Block a user