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
897 stars 79 forks source link

Safely stopping a maintenance script? #77

Open ghost opened 4 years ago

ghost commented 4 years ago

Is there a way to safely stop a running maintenenance script? Sometimes they are long running, especially if combined with other I/O. Is there a way to tell systemd to stop the scripts after a specific amount of time, or if system utilisation becomes too high?

kdave commented 4 years ago

I think it should be possible to do with some systemd.service magic and script handling eg. signals.