We have moved to a new Sailfish OS Forum. Please start new discussions there.
6

Need btrfs every day

asked 2015-11-16 12:59:27 +0300

austrian gravatar image

updated 2015-11-16 19:14:08 +0300

In paste I have trouble withe full disk and not working btrfs. After full reset, now I installed "BTRFS balance checker" from OpenRepos.net and I get permanently alert about less diskspace.

Input in my terminal shows:

[root@Jolla nemo]# btrfs fi show
ERROR: unable get label Inappropriate ioctl for device
Label: 'sailfish'  uuid: 04ae1499-2c1e-4541-a9df-159a1480c3b0
    Total devices 1 FS bytes used 9.71GiB
    devid    1 size 13.75GiB used 13.44GiB path /dev/mmcblk0p28

Btrfs v3.16

Then I tried:

[root@Jolla nemo]# btrfs balance start -dusage=5 /
Done, had to relocate 3 out of 18 chunks

The disk is now free:

[root@Jolla nemo]# btrfs fi show
ERROR: unable get label Inappropriate ioctl for device
Label: 'sailfish'  uuid: 04ae1499-2c1e-4541-a9df-159a1480c3b0
    Total devices 1 FS bytes used 9.71GiB
    devid    1 size 13.75GiB used 10.94GiB path /dev/mmcblk0p28

Btrfs v3.16

Why get my disk permanently full? Is there a spcript in cronjob working every day?

Thanks

edit retag flag offensive close delete

Comments

This is similar to the problem that Ive encountered https://together.jolla.com/question/121710/critical-problem-with-the-app-registry/ below. I gave up this morning..

Ryan ( 2015-11-16 15:35:38 +0300 )edit
2

9.71 GiBytes used for a factory reset phone is very high value especially, if you haven't filled up your phone with big android apps or videos afterwards. Normal figure would be ~6 GiB.

Factory reset is based on btrfs snapshots, so you may have leftovers from them still laying around. See https://together.jolla.com/question/14633/bug-factory-reset-no-storage-left/

Manatus ( 2015-11-16 19:14:25 +0300 )edit

4 Answers

Sort by » oldest newest most voted
5

answered 2015-11-16 14:18:08 +0300

ScumCoder gravatar image

updated 2015-11-16 16:58:37 +0300

BTRFS, this is @austrian. @austrian, this is BTRFS. Welcome to the world of pain and suffering.

1) Try to keep at least half of your internal memory free. Regularly move all your photos and videos to the uSD card.

2) Try to use higher values of dusage. Run btrfs balance several times, increasing the dusage value on 10 each time. Stop when the results of btrfs fi show are satisfying. If you have 10-12 hours of spare time, run btrfs balance without the dusage parameter.

edit flag offensive delete publish link more

Comments

Yes, I think so too :-(

So I am not alone with danger from btrfs.

I like my jolla and the new sailfish, but I calmed down if ext4 returns!!

Dear jolla-support: Please make a update to solve this problem!

austrian ( 2015-11-16 14:42:21 +0300 )edit

@austrian: Jolla Tablet has EXT4, at least we have that. However chances that we'll get that on phone are pretty slim.

ScumCoder ( 2015-11-16 14:51:59 +0300 )edit
2

answered 2015-11-16 14:33:41 +0300

Self-Perfection gravatar image

There is one more thing everyone seems to miss. Check btrfs fi df /. E.g.:

Data, single: total=10.86GiB, used=7.46GiB
System, DUP: total=40.00MiB, used=4.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=330.00MiB, used=214.54MiB
Metadata, single: total=8.00MiB, used=0.00

And consider used metadata space (215MB in my example). Used metadata space depends not on total files size, but on total count of files. And metadata is allocated in 256 MB chunks. Thus if all space on btrfs volume is allocated for Data chunks it might not be possible to allocate new chunk for metadata.

You may easily run of free metadata space if you use lots of snapshots, like I do. And by you output of btrfs fi sh it looks like you have lots of files and your metadata have already grown beyond one 256MB chunk.

edit flag offensive delete publish link more

Comments

:

[root@Jolla nemo]# btrfs fi df /
Data, single: total=12.37GiB, used=9.52GiB
System, DUP: total=64.00MiB, used=4.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=512.00MiB, used=206.65MiB

There seems no problem for me, is it?

But

[root@Jolla nemo]# btrfs fi sh 
ERROR: unable get label Inappropriate ioctl for device
Label: 'sailfish'  uuid: 04ae1499-2c1e-4541-a9df-159a1480c3b0
    Total devices 1 FS bytes used 9.72GiB
    devid    1 size 13.75GiB used 13.50GiB path /dev/mmcblk0p28

Btrfs v3.16

shows again a full disk.

btrfs is for my jolla a dangerous virus!

austrian ( 2015-11-16 14:50:23 +0300 )edit

Okay, I had issues with BTRFS once too and specifically reserved more space for metadata. Now I have my device reporting on settings > product information - 8,5 | 13,7 This suggest to me that I still have plenty of space left.

The BTRFS balance checker reports just as the command line does:

Using username "root".
Last login: Fri Oct 23 12:56:39 2015
,---
| SailfishOS 2.0.0.10 (Saimaa) (armv7hl)
'---
-bash-3.2# btrfs fi show
ERROR: unable get label Inappropriate ioctl for device
Label: 'sailfish'  uuid: 0f8a2490-53ed-4ff6-ba34-b81df3430387
        Total devices 1 FS bytes used 7.53GiB
        devid    1 size 13.75GiB used 12.62GiB path /dev/mmcblk0p28

Btrfs v3.16
-bash-3.2# btrfs fi df /
Data, single: total=11.49GiB, used=7.35GiB
System, DUP: total=64.00MiB, used=4.00KiB
System, single: total=4.00MiB, used=0.00
Metadata, DUP: total=512.00MiB, used=183.46MiB
-bash-3.2#

So why the disparity of free space reported to the user on product information with how BRTFS seems to see things?

Do I need to rebalance anything or what's going on?

Also any clue on what "ERROR: unable get label Inappropriate ioctl for device" means?

BR

MoritzJT ( 2015-11-16 14:52:45 +0300 )edit
2

Also we still have the infamous stale thumbnails issue. In my case they easily make for a half of all files in /home if I don't delete them regularly.

ScumCoder ( 2015-11-16 14:56:15 +0300 )edit
1

Also note that by default (because it was BTRFS's default back in the era of Jolla 1's design), metadata use "DUP" redundancy (which write 2 copies for each 256MiB allocated chunk of metadata - i.e.: using 512MiB on the flash media for a 256MiB of chunk).

Later, BTRFS started recommanding "single" for metadata on flash media, mostly because flash translation layers tend to group writes together: both copy will end up on the same eraseblock of the flash (unlike spinning HDD which will write each copy in a different part as asked). If the block dies, both copy will get simultaneously fried together, no benefit of writing "DUP" (unlike HDD where a bad sector will only afect 1 of the copies).

See here

DrYak ( 2017-08-08 18:04:32 +0300 )edit
1

answered 2015-11-16 21:54:02 +0300

rudi gravatar image

have look at
http://reviewjolla.blogspot.de/2015/02/step-by-step-guide-jolla-phone.html
for me, that was helpful

edit flag offensive delete publish link more

Comments

Thanks!

But if I forget on Tuesday to connect a power adapter, the cleaning process isn't working :-(

My jolla has 16GB, should I use now only 8GB?

I get a warning from "BTRFS balance checker", it would be nice for solution to start the automatic btrfs cleaning process. This problem is not only one time, it returns every day :-(

austrian ( 2015-11-16 23:54:12 +0300 )edit

i do so. i do try not to use more then 10 gb. music etc is all on sd card. when you clean up look also for hidden stuff. run balancer once a week then you are out of trouble. my experience is that balancer did not help once you have more then 13-14 gb used. i needed to get below 10 gb to get goox allocation value again (68%) from balancer

https://together.jolla.com/question/105264/btrfs-balancer-does-not-have-an-impact-on-allocation/

pawel ( 2015-11-18 20:48:12 +0300 )edit
0

answered 2017-08-08 18:08:18 +0300

DrYak gravatar image

updated 2017-08-08 18:12:01 +0300

Yet another solution :

Switch the profile of metadata from DUP (an useful redundancy for HDD but useless on flash, according BTRFS' latest recommendations) to single (no redundancy)

Command, as root (devel-su) :

btrfs balance start -v -f -mconvert=single /

See here for details.

edit flag offensive delete publish link more
Login/Signup to Answer

Question tools

Follow
6 followers

Stats

Asked: 2015-11-16 12:59:27 +0300

Seen: 1,731 times

Last updated: Aug 08 '17