Because btrfs needs periodic maintenance which is (currently) not being done automatically, it would be nice to have the tools from btrfsmaintenance.
+1 sys-fs/mdadm installs a checkarray cron job, but btrfs has nothing comparable currently available in Gentoo, despite advice by Google engineers that "[d]aily or weekly btrfs scrub (..) is a must have with btrfs": http://marc.merlins.org/perso/btrfs/post_2014-03-19_Btrfs-Tips_-Btrfs-Scrub-and-Btrfs-Filesystem-Repair.html
Created attachment 459280 [details] btrfsmaintenance-0.3.ebuild I created simple ebuild for this.
Created attachment 459284 [details] btrfs-defrag.timer
Created attachment 459288 [details] btrfs-trim.timer
Created attachment 459290 [details] btrfs-scrub.timer
Created attachment 459292 [details] btrfs-balance.timer
Created attachment 459294 [details] btrfs-trim.service
Created attachment 459296 [details] btrfs-scrub.service
Created attachment 459298 [details] btrfs-defrag.service
Created attachment 459300 [details] btrfs-balance.service
I already created and published an ebuild in my overlay: https://github.com/samuelbernardo/ssnb-overlay/tree/9ca9fec3fe7d8bab961fdbf8fe8a45c803b1449b/sys-fs/btrfsmaintenance I only miss the pull request to the gentoo tree. I thought the right way was to publish to my overlay at git.gentoo.org/repo/user/ssnb.git and then gentoo maintainers will push it to main tree if needed.
> I already created and published an ebuild in my overlay: > https://github.com/samuelbernardo/ssnb-overlay/tree/ > 9ca9fec3fe7d8bab961fdbf8fe8a45c803b1449b/sys-fs/btrfsmaintenance > > I only miss the pull request to the gentoo tree. I thought the right way was > to publish to my overlay at git.gentoo.org/repo/user/ssnb.git and then > gentoo maintainers will push it to main tree if needed. Thanks for your contribution Samuel. I think creating a pull request (for the main tree) right away will attract more attention to these new ebuilds. Gentoo GitHub guide says that a bug must be filled before creating a PR for a new ebuild - that's this bug, so this requirement is already fulfilled.
Github pull request: https://github.com/gentoo/gentoo/pull/5003
Github Pull request is merged, package is in tree now, bug can be closed.
Great job Martin, thanks!