kdave / btrfsmaintenance

Scripts for btrfs maintenance tasks like periodic scrub, balance, trim or defrag on selected mountpoints or directories.
GNU General Public License v2.0
900 stars 79 forks source link

Balance period improvements (fate#325529); Removing python dependency (jsc#SLE-4130). #70

Closed jeffmahoney closed 4 years ago

jeffmahoney commented 5 years ago

This PR changes the periods for balance to "5 10" for data and "3" for metadata. It also adds support for systemd.time(7) calendar event format periods and ensures they're not allowed on cron-base systems.

jeffmahoney commented 5 years ago

Keep this one on hold for a bit. In testing, it seems like it's rejecting the calendar format anyway.

jeffmahoney commented 5 years ago

Ok, it's not a bug in this PR. The systemd.path stuff seems to be racy. I think it's possible for the event to be called while e.g. vim is still writing out the file, so it gets an empty sysconfig file and fills in empty timer OnCalendar values.

jeffmahoney commented 5 years ago

This should be set for inclusion now.

kdave commented 4 years ago

I've merged the README (with update about improvements in 5.2+ kernel), time spec as calendar event, and the shell plugn. I'll keep the .py version for now, and the null byte in the script has been replaced by `$'\0' so it does not appear as a binary file.

The remaining part are the balance filter defaults, I need to reread the past discussions, but in general reducing the numbers is agreed.

kdave commented 4 years ago

Balance usage filters have been updated, no more issues left, closing.