BTRFS balance checker

Rating: 
5
Your rating: None Average: 5 (2 votes)

BTRFS balance checker.

How it work:
It will daily (default interval) check your btrfs balance:
btrfs-balancer allocation
And if "used" is more than 12.25GiB or exactly 13.75GiB or more than 89%, that mean you have less than 1.5GiB of space or don't have at all, you will get notification (audio, led, lock & event screens).

NOTES:
* Default checking time interval is 1 day. You can change it by running this command as ROOT:
echo 5d > /usr/share/openrepos-btrfschecker/time
Where 5d mean 5 days. You also can do this changes with ROOT filemanager like FileTug.
 

v0.1-3
- More accurate. Used only "btrfs-balancer allocation" command.

v0.1-2
- Changed free space to 1.5GiB for notification.
- Also used allocated percentage.

Beware, use it on your own risk !!!

 

Donation are welcome :)

Screenshots: 
Application versions: 
AttachmentSizeDate
File btrfschecker-0.1-1.armv7hl.rpm40.91 KB06/11/2015 - 13:19
File btrfschecker-0.1-2.armv7hl.rpm41.04 KB07/11/2015 - 19:45
File btrfschecker-0.1-3.armv7hl.rpm41.12 KB08/11/2015 - 03:06
Changelog: 

- More accurate. Used only "btrfs-balancer allocation" command.

Comments

MoritzJT's picture

Can someone explain what it actually does? It gives me a warning that I'd have less free space than 1,5 GB or sth. while I clearly have MUCH more free space than that!

 

Do I misunderstand what this does?

Schturman's picture

Yes, this app only to inform you about used space. To be more exactly, if you have used more than this number: 13153337344, that mean you have less than 1.5GiB of space and this case phone send you one notification in the day. That all. Now you will decide if you want to do operation with balancer to fix this or not...

dalas_revo's picture

Hello,

Nice idea, Schturman. But I can't install it, it keeps complaining that lipstick-qt5-tools is missing. I'm on SFOS 2 and updated your repository. Any ideas?

Cheers!

 

Schturman's picture

Just enable dev mode and try again ;)

dalas_revo's picture

dev mode is enabled ,unless you mean what in german is called "entwickler-aktualisierungen" down at the bottom of the settings page (would be something like "developer-updates" in english) which I don't have enabled .

Schturman's picture

You don't need this. Just install this package manually:

pkcon install lipstick-qt5-tools

dalas_revo's picture

well, I think for now I'll give up and continue doing balancing by hand. lipstick-qt5-tools need lipstick -qt5 which can't be installed ,too...

Schturman's picture

Really didn't know what the problem... For me both packages installed without any problem. Maybe problem in the repo or something else?...

objectifnul's picture

I think this requires to be careful. This is my experience (maybe to be investigated futher):

- Running 1.1.7.28, BTRFS balance checker didn't install.

- Tried pkcon install lipstick-qt5-tools, which required to install first lipstick-qt5, what I did.

- Then BTRFS balance checker was installed successfully.

- After that, reboot failed => Recovery mode, factory reset and everything to be reconstructed.

By the way, I'll now be running SFOS 2.0.0.10 (probably no choice), although I didn't feel ready yet for the jump :-(

 

Schturman's picture

Don't know what was the problem with your device, but lipstick-qt5-tools need in my package only for removing notification from the event screen, nothing else...

coderus's picture

How do you install it? Warehouse will install all missing dependencies for you.

objectifnul's picture

No, missing or inadequate dependencies prevented from installing. Probably an issue with Warehouse (was wobbly before the incident, with repositories disappearing from time to time). Anyway I have to rebuild my environment from scratch now. Long night to come. Hopefully a brand new phone tomorrow.

Now I'm hesitating. Apparently I may stick to 1.1.7.28 instead of jumping to 2.0.0.10. Maybe I'll toss for it.

coderus's picture

btrfs fi show what? use btrfs-balancer allocation instead

and read https://together.jolla.com/question/30822/root-and-home-disks-full-and-c... for more information

Schturman's picture

It show notification only if used space more than 12.75GiB, that mean you have less than 1GiB.
I had read and used this thread a few times before my phone died :)
But nice idea, I will add the allocation percentage to notification too. Until which prercentage it is normal for the phone ? 70-80-90% ?
Thanks.

coderus's picture

the allocation (used) show higher value than 13153337344 bytes, you should run balance operation

Schturman's picture

Yep, exactly 13153337344 bytes = 12.25 GiB, This is exactly what I changed in the script instead 12.75.

Thanks for pointing me.

Schturman's picture

Doesn't matter, it should be 89% maximum, that mean we need 1.5GB :)

PawelSpoon's picture

nice idea! but 1gb is too late according to my experience.
the balancer was not able to balance with only 1gb left on my jolla