Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Nov 2023 20:19:52 +0000
From:      bugzilla-noreply@freebsd.org
To:        fs@FreeBSD.org
Subject:   [Bug 229829] [zfs] scrubbing prevents shutdown and slows down startup
Message-ID:  <bug-229829-3630-Ffhl0jq0X8@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-229829-3630@https.bugs.freebsd.org/bugzilla/>

index | next in thread | previous in thread | raw e-mail

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229829

J.R. Oldroyd <fbsd@opal.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fbsd@opal.com

--- Comment #7 from J.R. Oldroyd <fbsd@opal.com> ---
This issue appears to be happening to me on 13.2-RELEASE-p1.

For me, I do suspend/resumes regularly. Mostly with no problems, but
occasionally the suspend blocks at the point where you'd expect the power off
and it requires a hard power off shutdown. (Or possibly it requires you to wait
for the scrub to complete - obviously not practical when you're suspending a
laptop.)

I am experimenting with these additions in rc.suspend and rc.resume:

rc.suspend:
# pause any zpool scrub in progress
zpool status | while read KEY VALUE; do
        case "$KEY" in
        pool:)  POOL=$VALUE ;;
        scan:)  case "$VALUE" in
                "scrub in progress since "*)
                        echo "$POOL" >>/var/db/zpool.scrub.resume
                        zpool scrub -p $POOL
                        ;;
                esac
        esac
done

rc.resume:
# resume any scrub that was in progress on suspend
if [ -f /var/db/zpool.scrub.resume ]; then
        cat /var/db/zpool.scrub.resume | while read POOL; do
                zpool scrub $POOL
        done
        rm /var/db/zpool.scrub.resume
fi

Something similar may also be needed in rc.shutdown with a suitable
rc.d/zpool_scrub_resume script for the shutdown/reboot sequence.

-- 
You are receiving this mail because:
You are the assignee for the bug.

help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-229829-3630-Ffhl0jq0X8>