The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/openzfs/cmd/zed/zed.d/resilver_finish-start-scrub.sh

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #!/bin/sh
    2 # shellcheck disable=SC2154
    3 # resilver_finish-start-scrub.sh
    4 # Run a scrub after a resilver
    5 #
    6 # Exit codes:
    7 # 1: Internal error
    8 # 2: Script wasn't enabled in zed.rc
    9 # 3: Scrubs are automatically started for sequential resilvers
   10 [ -f "${ZED_ZEDLET_DIR}/zed.rc" ] && . "${ZED_ZEDLET_DIR}/zed.rc"
   11 . "${ZED_ZEDLET_DIR}/zed-functions.sh"
   12 
   13 [ "${ZED_SCRUB_AFTER_RESILVER}" = "1" ] || exit 2
   14 [ "${ZEVENT_RESILVER_TYPE}" != "sequential" ] || exit 3
   15 [ -n "${ZEVENT_POOL}" ] || exit 1
   16 [ -n "${ZEVENT_SUBCLASS}" ] || exit 1
   17 zed_check_cmd "${ZPOOL}" || exit 1
   18 
   19 zed_log_msg "Starting scrub after resilver on ${ZEVENT_POOL}"
   20 "${ZPOOL}" scrub "${ZEVENT_POOL}"

Cache object: 2cebc384070216c4b3e4f981e2fc4801


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.