Looking at the code yourself is encouraged if you know basics of Python, no warranty comes with anything in this repository.
- Python3
- psutil library
- running Systemd
You can use automatic_install.sh if you want quick installation
-
Run
python3 main.py
and make sure it doesn't printcan't import psutil, you don't have this installed
-
Copy this program to your system with
sudo cp main.py /usr/local/bin/btrfs-cancel-all-scrub sudo chmod 700 /usr/local/bin/btrfs-cancel-all-scrub
You can also copy it to other directory, make sure to edit btrfs-auto-cancel-scrub.service
to reflect the change.
-
Copy service file and make sure it's registered.
sudo cp btrfs-auto-cancel-scrub.service /etc/systemd/system sudo systemctl daemon-reload
-
Try running this service once
This will cancel all your scrubbing process!
sudo systemctl start btrfs-auto-cancel-scrub.service
It shouldn't print any error messages. (I am 99 percent sure)
-
Enable the service
sudo systemctl enable btrfs-auto-cancel-scrub.service
Done