linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Menzel <pmenzel@molgen.mpg.de>
To: Theodore Ts'o <tytso@mit.edu>,
	"Darrick J. Wong" <darrick.wong@oracle.com>
Cc: linux-ext4@vger.kernel.org
Subject: New service e2scrub_reap
Date: Mon, 18 Mar 2019 12:24:55 +0100	[thread overview]
Message-ID: <fb05730f-c078-ec94-72d3-83a398f936a7@molgen.mpg.de> (raw)

[-- Attachment #1: Type: text/plain, Size: 2489 bytes --]

Dear Ted, dear Darrick,


On Debian Sid/unstable, I noticed the new service `scrub/e2scrub_reap.service`
installed in the default target [1][2].

> E2fsprogs now has an e2scrub script which will allow e2fsck to be run on
> volumes that are mounted on an LVM device.  The e2scrub_all will find
> all ext* file systems and run them using e2scrub (if possible).

```
$ nl -ba scrub/e2scrub_reap.service.in
     1	[Unit]
     2	Description=Remove Stale Online ext4 Metadata Check Snapshots
     3	Documentation=man:e2scrub_all(8)
     4	
     5	[Service]
     6	Type=oneshot
     7	WorkingDirectory=/
     8	PrivateNetwork=true
     9	ProtectSystem=true
    10	ProtectHome=read-only
    11	PrivateTmp=yes
    12	AmbientCapabilities=CAP_SYS_ADMIN CAP_SYS_RAWIO
    13	NoNewPrivileges=yes
    14	User=root
    15	IOSchedulingClass=idle
    16	CPUSchedulingPolicy=idle
    17	ExecStart=@root_sbindir@/e2scrub_all -A -r
    18	SyslogIdentifier=%N
    19	RemainAfterExit=no
    20	
    21	[Install]
    22	WantedBy=default.target
```

As this is installed in the default target, it increases the boot time of
my target system, which does not have any LVM volumes. Especially, as a
shell script is started, and on my system resources are scarce during
boot-up.

```
$ systemctl status -o short-precise e2scrub_reap.service
● e2scrub_reap.service - Remove Stale Online ext4 Metadata Check Snapshots
   Loaded: loaded (/lib/systemd/system/e2scrub_reap.service; enabled; vendor preset: enabled)
   Active: inactive (dead) since Mon 2019-03-18 12:17:13 CET; 1min 1s ago
     Docs: man:e2scrub_all(8)
  Process: 447 ExecStart=/sbin/e2scrub_all -A -r (code=exited, status=0/SUCCESS)
 Main PID: 447 (code=exited, status=0/SUCCESS)

Mar 18 12:17:08.223560 plumpsklo systemd[1]: Starting Remove Stale Online ext4 Metadata Check Snapshots...
Mar 18 12:17:13.996465 plumpsklo systemd[1]: e2scrub_reap.service: Succeeded.
Mar 18 12:17:13.996808 plumpsklo systemd[1]: Started Remove Stale Online ext4 Metadata Check Snapshots.
```

Reading the manual, the switch `-r` “removes e2scrub snapshots but do not
check anything”.

Does this have to be done during boot-up, or could it be done after the
default target was reached, or even during shutting down?


Kind regards,

Paul


[1]: https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/tree/scrub
[2]: https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/tree/doc/RelNotes/v1.45.0.txt


[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5174 bytes --]

             reply	other threads:[~2019-03-18 11:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-18 11:24 Paul Menzel [this message]
2019-03-18 21:47 ` New service e2scrub_reap Theodore Ts'o
2019-03-18 22:03   ` Paul Menzel
2019-03-18 23:32     ` Darrick J. Wong
2019-03-19 15:02       ` Theodore Ts'o

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb05730f-c078-ec94-72d3-83a398f936a7@molgen.mpg.de \
    --to=pmenzel@molgen.mpg.de \
    --cc=darrick.wong@oracle.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).