On Sat, Jan 04, 2020 at 07:57:16PM -0800, Josh Triplett wrote:
> Package: e2fsprogs
> Version: 1.45.4-1
> Severity: important
> 
> The e2fsprogs package installs a service and timer to run e2scrub. That
> service sleeps for 2 seconds before exiting, delaying the boot by 2
> seconds.

It's not necessarily 2 seconds, and it's not directly sleeping.  It's
however long it takes to spin up any storage devices, caused by
running lvs.  The bulk of the time of running "e2scrub_all -A -r" is
the time to run 'lsblk' and 'lvs'.

I've already queued up a change (see below) so that we won't attempt
to clean up any left-over LVM snapshot volumes if e2scrub is not
enabled via /etc/e2scrub.conf, and even if scrubbing is enabled, we
check for snapshots via scanning /dev/mapper instead of using lvs.
This commit will be part of e2fsprogs 1.45.5, to be released in the
next few days.

> Second, please use ConditionPathExists or similar to check for the tools
> e2scrub needs (lsblk and lvcreate), rather than running a script that
> checks for them and then exits.

That's not the cause of most of the time needed to run e2scrub_all.
We also need to run these sanity checks when e2scrub_all is run by
hand, or run out of cron.

> And third, please consider *not* enabling this by default.

It wasn't enabled by default.  And the issue of lvs being slow is fixed by:

commit 333268d65d26fbb2d22f7a8b6ac797babcc69543
Author: Darrick J. Wong <darrick.w...@oracle.com>
Date:   Mon Nov 4 17:54:14 2019 -0800

    e2scrub_all: don't even reap if the config file doesn't allow it
    
    Dave Chinner complains that the automated on-boot e2scrub reaping takes
    a long time (because the lvs command can take a while to run) even
    though the automated e2scrub is disabled via e2scrub.conf on his
    systems.
    
    We still need the reaping service to kill off stale e2scrub snapshots
    after a crash, but it's unnecessary to annoy everyone with slow bootup.
    Because we can look for the e2scrub snapshots in /dev/mapper, let's
    skip reaping if periodic e2scrub is disabled unless we find evidence of
    e2scrub snapshots in /dev.
    
    Reported-by: Dave Chinner <da...@fromorbit.com>
    Signed-off-by: Darrick J. Wong <darrick.w...@oracle.com>
    Signed-off-by: Theodore Ts'o <ty...@mit.edu>

                                                        - Ted

Reply via email to