Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 682660 - sys-fs/btrfs-progs - add support for systemd scrub service and timers
Summary: sys-fs/btrfs-progs - add support for systemd scrub service and timers
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sergei Trofimovich (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-06 08:39 UTC by Sebastian Pucilowski
Modified: 2019-05-22 09:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Pucilowski 2019-04-06 08:39:18 UTC
Archlinux provides a set of systemd units for automating regular btrfs scrubs on local file systems:

https://git.archlinux.org/svntogit/packages.git/tree/trunk?h=packages/btrfs-progs

Currently we need to manually write (or copy) these systemd units to automate regular file system scrubs.

It would be nice if we could do the same with a USE=systemd flag on btrfs-progs.
Comment 1 Ingo Brunberg 2019-04-06 09:13:45 UTC
Why would one want to pollute packages with arbitrary services? Then you could do the same for cron users. And if you want other scrub intervals, you have to edit the files yourself anyway.
Comment 2 Sebastian Pucilowski 2019-04-06 09:27:03 UTC
The same argument could be said for many packages which provide helpful systemd units, for example zfs.

They are included with USE=systemd and it's your prerogative to use them.
Comment 3 Harris Landgarten 2019-04-06 12:55:16 UTC
All of this is in sys-fs/btrfsmaintenance. Which contains all these services:

/lib64/systemd/system/btrfs-balance.service
/lib64/systemd/system/btrfs-defrag.service
/lib64/systemd/system/btrfs-scrub.service
/lib64/systemd/system/btrfs-trim.service
/lib64/systemd/system/btrfsmaintenance-refresh.service
/lib64/systemd/system/btrfs-balance.timer
/lib64/systemd/system/btrfs-defrag.timer
/lib64/systemd/system/btrfs-scrub.timer
/lib64/systemd/system/btrfs-trim.timer
Comment 4 Sebastian Pucilowski 2019-04-07 00:07:15 UTC
That looks great.

Maybe the better fix is to instead emit a message when emerging with USE=systemd alerting that sys-fs/btrfsmaintenance exists if needed.