We have moved to a new Sailfish OS Forum. Please start new discussions there.
1 | initial version | posted 2015-04-17 13:50:11 +0200 |
Tipped off by the mega btrfs thread, I was checking out the new-in-1.1.4 btrfs-balance command.
It works great when run manually. No longer blocks and wastes CPU with a silent failure if there isn't enough space (forcing you to do a scary reboot), and I didn't get any angry system watchdogs restarting services during the process either.
But I notice that the script is set to not run if the device battery is below 25%. This check appears to be ignored though, when I run the task manually. If I prefix the "if test check_balance_need; then" block with a direct call to "check_balance_need" it seems to work as expected.
I'm aware that I'm running it manually, and not triggering it as a systemd task, so the shell env may be slightly different when it's run "for real", but it worried me anyway.
Also, should the battery level check not be done before each of the -dusage iterations? On a highly fragmented device each iteration takes a little while and could potentially run the device to nearly empty overnight, especially if the user leaves IM clients or something active.
And finally! Should a "no space left on device" failure (as I got at the second-to-last iteration when my device claimed to be 11gb full in settings) push a notification or something? "Not enough room to perform system maintenance, please free up some space"? Although I thought an alleged 2.7gb free would be enough? Freed up down to 10.4gb and it was happier.
2 | retagged |
Tipped off by the mega btrfs thread, I was checking out the new-in-1.1.4 btrfs-balance command.
It works great when run manually. No longer blocks and wastes CPU with a silent failure if there isn't enough space (forcing you to do a scary reboot), and I didn't get any angry system watchdogs restarting services during the process either.
But I notice that the script is set to not run if the device battery is below 25%. This check appears to be ignored though, when I run the task manually. If I prefix the "if test check_balance_need; then" block with a direct call to "check_balance_need" it seems to work as expected.
I'm aware that I'm running it manually, and not triggering it as a systemd task, so the shell env may be slightly different when it's run "for real", but it worried me anyway.
Also, should the battery level check not be done before each of the -dusage iterations? On a highly fragmented device each iteration takes a little while and could potentially run the device to nearly empty overnight, especially if the user leaves IM clients or something active.
And finally! Should a "no space left on device" failure (as I got at the second-to-last iteration when my device claimed to be 11gb full in settings) push a notification or something? "Not enough room to perform system maintenance, please free up some space"? Although I thought an alleged 2.7gb free would be enough? Freed up down to 10.4gb and it was happier.