Ask / Submit

[bug] [feature-request] Btrfs allocation on 100%, there is no Autobalancer [deleted]

asked 2016-01-22 11:18:00 +0200

evo3de gravatar image

updated 2016-04-18 15:53:13 +0200

Moo-Crumpus gravatar image

I check our (3) Jollas regulary and every time i must see that the btrfs allocation is at 100%. Why is ther no automatic balancer who run for example every night at 03:00 if on charging or on Systemstartup ?

A unbalanced btrfs have poor performance and can block device (space is full)

Edit: Btrfs seems to be the reason for a lot of bugs and misbehavior

Edit: Could a admin remove the [deleted] tag?

edit retag flag offensive close delete



It would be great if maintenance tasks could also be started each time you connect your phone to your charger, as requested here.

lakutalo ( 2016-01-22 18:38:04 +0200 )edit

should work with situations. you can start any cli staetement and there is an event for charger plugin

pawel ( 2016-04-18 20:00:40 +0200 )edit

if your allocation is constantly at 100% you should delete some stuff ob internal ram. balancer never worked on my jolla when allocation was that high, without some clean up

pawel ( 2016-04-18 20:03:37 +0200 )edit

@pawel, I have ceased to use Situations due to lack of use cases of mine and because of its nasty battery consumtion, from my point of view.

lakutalo ( 2016-04-18 20:41:12 +0200 )edit

4 Answers

Sort by » oldest newest most voted

answered 2016-04-22 22:55:45 +0200

Schturman gravatar image

I updated my package:
Now it can run balancer when your phone need it. Read description on openrepos or inside the app.
* If you can't install because of this package (lipstick-qt5-tools), open terminal as ROOT and run:

pkcon refresh

When it finish, run:

pkcon install lipstick-qt5-tools

After this try to install my package again.

P.S. Like @lakutalo said, official timer (/lib/systemd/system/btrfs-balancer.timer) disabled. Why don't know, but you can enable it as root:

systemctl enable btrfs-balancer.timer
systemctl start btrfs-balancer.timer

You don't need to do this if you use my app...

edit flag offensive delete publish link more


Jolly well done, schturman! It really seems to work now from the look of it. +1 :)

lakutalo ( 2016-04-23 00:05:52 +0200 )edit

Thanks @schturman, but how can i see that the balancer is runing / finished. You may could ad a nofitication if it is finished (optionally) - Allocation before, allocation now and duration ;-)

evo3de ( 2016-04-26 10:58:02 +0200 )edit
  1. When it check allocation and it's MORE than 89%, you will get warning notification and balancer will start it self. When it finish, it will check allocation again and you will get confirmation notification with the current result.

  2. When it check allocation and it's LESS than 89%, you will NOT get any notification, script will check if option of auto-balancer is checked and if yes, it will check your slider value, and if slider value less then current allocation, it will start balancer and at the end you will get confirmation notification with the current result.
Schturman ( 2016-04-26 11:23:13 +0200 )edit

@schturman then in my chase the balancer don´t start. I get the first notification, but not a second one. Options: check every day 23:00 enable autostart run balancer when needed 89%

Service is active

brtfs-balancer allocation before manual btrfs-balancer balance is 100% after about 92% 11 of 13,7 GB is used


evo3de ( 2016-04-27 13:58:18 +0200 )edit

It should work... Before posting update I tested it a many times on my phone and now my allocation is 66%.
To check it, connect to your phone via WinSCP as ROOT and edit this 2 files:

Change this at the beginning of script:
#set -x
to this:
set -x
Save files and open terminal (Putty), run as ROOT:
Wait when it finish, copy all output and post it on, and share it here..
You also can do it directly on the phone, but it more convenient to do on PC (big screen, easy to copy).

P.S. Also show me outputs of this commands (as ROOT):
cat /usr/lib/systemd/user/btrfschecker.timer
systemctl-user status btrfschecker.timer
systemctl-user status btrfschecker.service

Schturman ( 2016-04-27 19:11:40 +0200 )edit

answered 2016-01-22 11:32:14 +0200

virgi26 gravatar image

updated 2016-01-22 18:37:11 +0200

actually, there is autobalancer that is being run every tuesday night (03:00 i think) if on charging=)

PS as of 1.1.9 i think

UPDATE: it seems that it actually does not work the way it should =(

edit flag offensive delete publish link more


@virgi26 than it does not work probably, do it run once or repeat until there is nothing to balance?

evo3de ( 2016-01-22 11:55:35 +0200 )edit

@virgi26 please verify your info, this feature has only worked during one version (1.1.4). Since then, it is only done before OS upgrades (which is probably not enough). I'm also wondering why they have not let it in place.

Sthocs ( 2016-01-22 12:26:07 +0200 )edit

According to /lib/systemd/system/btrfs-balancer.timer btrfs_balancer should be run each Tue, 3:00. But I failed to enable and start that entry. Neither did it run when I set it to every 2min. So I guess it is no longer active. As I wanted to automatically repeat this action more often myself, I will try to activate it again, playing around with systemd.

lakutalo ( 2016-01-22 18:23:49 +0200 )edit

answered 2016-01-22 16:21:34 +0200

evo3de gravatar image

@admin coult you remove the [deleted] flag?

edit flag offensive delete publish link more

answered 2016-01-22 16:56:50 +0200

pawel gravatar image

you can use the tool in harbour from schturman that checks the balancer allocation every night and informs you about the need for ballancing

edit flag offensive delete publish link more


unfortunally the installation fails

evo3de ( 2016-01-22 16:59:27 +0200 )edit
Login/Signup to Answer

Question tools



Asked: 2016-01-22 11:18:00 +0200

Seen: 961 times

Last updated: Apr 22 '16