Ask / Submit
11

[Request] [Jolla Tablet] use ext4 instead of btrfs [released]

asked 2014-11-24 12:02:45 +0200

renegade22 gravatar image

updated 2014-11-24 12:13:19 +0200

Nokius gravatar image

Since the Jolla phone, gets the same problems, I had on my notebook/PC because of this not ready to ship filesystem, the tablet should do the wise thing, and use the older but much more robust and faster (btrfs just hangs if space runs out but really doesn't)

https://together.jolla.com/question/30822/root-and-home-disks-full-and-causing-various-problems/

edit retag flag offensive reopen delete

The question has been closed for the following reason "released in a software update" by r0kk3rz
close date 2016-03-03 11:51:42.626856

Comments

3

btrfs is the future, and it is only going to get better, what you propose is a bit ludicrous!

dsilveira ( 2014-11-24 21:30:52 +0200 )edit
8

Well, if I understand the discussion correctly, btrfs might have some inherent design flaws which can not be corrected so easily. Those leads to really bad disk utilization so that e.g. a disk filled half with data is to be considered full. The filesystem b-tree is then extremely unbalanced. I don't know whether this can sanely be changed without dirty hacks or changing the filesystem specification, which would mean introducing a btrfs2. That probably others have to investigate.

Balancing seems to be a method to get around this, but balancing the btrfs filesystem as far as I understand involves a lot of writes, which is not optimal for the flash memory. Even without rebalancing, according to some presentations I saw btrfs does already more write operations than ext4 with journaling disabled. So the question would be, is there a solution for the problems with btrfs in the very near future? If not, I think switching to ext4 could be an option. It makes no sense to stay now with a filesystem that has some serious issues and annoying problems just because we assume that some day in the future it will work. Then lets switch to ext4 and consider btrfs again when it is stable.

dac ( 2014-11-25 13:18:10 +0200 )edit

I have no idea what you're talking about, I've never heard any of that. As for stability, I use it everyday on my phone, laptop, and server, no issue, no instability! Distros such as fedora and others are going to make it default for the next release, so what have you been smoking lately?

dsilveira ( 2014-11-25 21:10:15 +0200 )edit
4

Apart from the personal attack, to which part of my posting to you refer with your statements?

Which part of what I wrote you have no idea about?

  • B-Trees and their general characteristics

  • The claimed "design flaws", about which I am not sure I can make a definitive assessment myself

  • The fact that there are people using Jolla who have this kind of errors, as described in the link provided in the question?

  • The fact that when you do a balance on btrfs it means writing a significant amount of data?

  • The idea that if there is some serious enough issue with some component you are using in a system in a specific application, and if there is no short term fix, you might think about alternatives bridging this time until a fix is available?

About balancing the trees, yes there is the idea that the tree in btrfs is self balancing, and actually a good implementation would be just that. I just remember the analysis from Shishkin where he showed that in btrfs it is not. I am not sure whether that has changed... But be it so.

Balance operation according to kernel.org means rewriting all data and metadata again on the disk, which is essentially even worse for a flash drive than a simple "rebalancing" of the b-trees used.

I do not know whether the criticism of Shishkin has been answered or falsified by someone, at least I don't remember seeing that. I do not know whether the situation that he described has been altered with a fix. I only saw that there are people having this issue in their Jolla, so obviously something could need a fix. And I saw there and elsewhere that repairing the situation is not really straightforward. I remember for desktops someone hinted that one should add a usb drive to the btrfs volume so that enough space is available for balance. This is obviously difficult using Jolla, though one could use the microsd for it also.

dac ( 2014-11-25 23:37:39 +0200 )edit
3

About the "the others do it" argument:

First, "doing what others do just because others do" is not always a good idea just without any additional sane reasoning

Second, this reasoning is the mirror of what I read in the beginning of the year relating to Fedora, when people asked to finally make btrfs default for Fedora because Sailfish OS and others are using it already. Circular reasoning...

Third, Fedora is discussing this already quite a while (it is planned to switch since 2011), and there are people involved who seem to think that btrfs is not ready yet for this. And it seems that it might not happen in the next release yet, but for Fedora 23 or later, which should come end of next year. And I am not sure if that discussion is over already. And it was specifically mentioned that although f.ex. OpenSuse uses it as default already, one of the reasons seem to be that "Suse benefits from having a narrow "supported" criteria, like only use it with lots of space....", see here. This "lots of space" does obviously not mean 16GB.

And anecdotal experience like yours is nice, but it does not help those who encounter this issue. I could also claim I cross streets every day on red traffic lights and have no issues with that. It would not mean anything about generalization or about having that as a sane default. Not that I do....

What I wanted to express in my comment was that IF there seems to be stability issues with btrfs on Sailfish OS which lead to serious problems, which seems plausible according to the question linked, one possibility COULD be switching to another FS that does have better characteristics in the specific application. I think that is fair enough, and I am looking forward to reasoning and facts falsifying my statements and opinion, but please try to do it using your brain and not with personal attacks. After all this is a platform for discussion.

dac ( 2014-11-25 23:40:38 +0200 )edit

2 Answers

Sort by » oldest newest most voted
9

answered 2014-11-24 13:19:58 +0200

MartinK gravatar image

I would rather recommend using an LVM thin pool with EXT4 or XFS on top. This gives you many features of btrfs (for example cow snapshots for factory reset and backups, spanning over multiple bloc devices, etc.) but with the stability and performance of LVM and EXT4/XFS.

BTW, while LVM is not that often seen on mobile devices it has been used for example on the HP TouchPad tablet. LVM made the Android port for the TouchPad easier as it enabled easy resizing of existing partitions and creating of new ones for the Android to live on.

edit flag offensive delete publish link more

Comments

2

XFS is very good ;-)

Claudio Maradonna ( 2014-11-24 14:33:34 +0200 )edit
2

Exactly what I meant. Just move away from btrfs. LVM+Ext4 sounds great to me and also more proven and tested. After a failed experiment in btrfs myself, I think its best to stick to proven methods in critical positions.

renegade22 ( 2014-11-24 17:23:22 +0200 )edit

The only things that the current LVM+ext4 solution lacks is checksums and compression.

(And the robustness to powerloss / crash that CoW brings, but ext4's journal makes up for part of it, and the journaling of the sqlite databases used by most of the rest makes up for it)

(And finely grained snapshotting (btrfs extents vs LVM stripes) but on the other hand these would greatly increase fragmentation, which could put some stress on RAM constraint smartphones)

DrYak ( 2017-08-08 17:58:23 +0200 )edit
5

answered 2016-03-03 11:14:51 +0200

Andy Branson gravatar image

For reference, it looks like this is what they did on the tablet. From the screenshots I've seen of the Intex phone, it also has two separate partitions which hints that it may be the same. Btrfs was a bold experiment, but this is much better. Now if there were only some way that we could create a similar image for the Jolla phone...

lvm> lvdisplay
  --- Logical volume ---
  LV Path                /dev/sailfish/root
  LV Name                root
  VG Name                sailfish
  LV UUID                tYDgK9-HJM1-4c3Q-4Mu5-j9QK-EJz6-crACDt
  LV Write Access        read/write
  LV Creation host, time (none), 2015-09-01 17:25:44 +0200
  LV Status              available
  # open                 1
  LV Size                3.91 GiB
  Current LE             1000
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Path                /dev/sailfish/home
  LV Name                home
  VG Name                sailfish
  LV UUID                LTQDU5-Zny0-Xg7p-svS9-GPV6-P4jD-VciSLr
  LV Write Access        read/write
  LV Creation host, time (none), 2015-09-01 17:25:44 +0200
  LV Status              available
  # open                 1
  LV Size                49.98 GiB
  Current LE             12795
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
edit flag offensive delete publish link more

Comments

That's great!

alloj ( 2016-03-03 12:17:33 +0200 )edit

Thanks for the info. As for the two circles displaying disk usage, I would think there is one for the mass memory and one for the SD card; At least that's what I would expect.

Sthocs ( 2016-03-03 12:32:42 +0200 )edit

The tablet circles are labelled 'System' and 'User'. The Intex phone actually shows three circles: http://img.91mobiles.com/articles/wp-content/uploads/Intex-Aqua-Fish-first-impressions-14.jpg

Andy Branson ( 2016-03-03 12:36:21 +0200 )edit

Oh ok, thanks for the link, didn't see that one!

Sthocs ( 2016-03-03 17:52:22 +0200 )edit

Question tools

Follow
5 followers

Stats

Asked: 2014-11-24 12:02:45 +0200

Seen: 1,344 times

Last updated: Mar 03 '16