]>
git.proxmox.com Git - mirror_zfs-debian.git/blob - cmd/zed/zed.d/resilver_finish-start-scrub.sh
2 # resilver_finish-start-scrub.sh
3 # Run a scrub after a resilver
7 # 2: Script wasn't enabled in zed.rc
8 [ -f "${ZED_ZEDLET_DIR}/zed.rc" ] && .
"${ZED_ZEDLET_DIR}/zed.rc"
9 .
"${ZED_ZEDLET_DIR}/zed-functions.sh"
11 [ "${ZED_SCRUB_AFTER_RESILVER}" = "1" ] ||
exit 2
12 [ -n "${ZEVENT_POOL}" ] ||
exit 1
13 [ -n "${ZEVENT_SUBCLASS}" ] ||
exit 1
14 zed_check_cmd
"${ZPOOL}" ||
exit 1
16 zed_log_msg
"Starting scrub after resilver on ${ZEVENT_POOL}"
17 "${ZPOOL}" scrub
"${ZEVENT_POOL}"