Jump to content
brunoais

Support btrfs for the SD card

Recommended Posts

Does f(x)tec PRO¹ support sd cards formatted with btrfs?

If not, can that be enabled? Linux 4.X has btrfs support fully integrated in the kernel.

Share this post


Link to post
Share on other sites

The kernel is on github somewhere can't find it atm someone else might have the link.  But if it's not enabled you can always make a PR to enable it.

Share this post


Link to post
Share on other sites

What is a PR?    I don't think we're talking about public relations here....

Share this post


Link to post
Share on other sites
57 minutes ago, Craig said:

What is a PR?    I don't think we're talking about public relations here....

"Pull Request", a convenient means of asking like "hey, take this particular change from my git repository and apply it to yours"

  • Like 1

Share this post


Link to post
Share on other sites
7 hours ago, _DW_ said:

The kernel is on github somewhere can't find it atm someone else might have the link.  But if it's not enabled you can always make a PR to enable it.

You mean, the Linux Kernel?

I mean the closed PRO¹'s stock software. Even if I have to format with Btrfs on my PC, I'd like to keep the SD card as Btrfs.

Share this post


Link to post
Share on other sites

I think someone would have to test it to know.  We do know stock doesn't support exfat and does support FAT32.  Other filesystems like btrfs, f2fs, ntfs untested but unlikely imo.    Lineage a lot more likely, I've had f2fs support there before and presumably still works now, and tdm (los dev) recently mentioned exfat is on his to-do list.  But you're the first to mention btrfs that I know of.

  • Thanks 1

Share this post


Link to post
Share on other sites

btrfs is not supported on android, neither stock nor lineage. It wouldn't be terribly hard to add it to lineage but the issue is nobody wants to use it. It's not been very stable in the past and so trust isn't there. Probably won't be for a very long time, if ever. If you want to get away from fat/vfat/exfat, your best option is probably ext4. Lineage has supported ext4 sdcards for just about forever.

 

 

 

 

  • Thanks 1

Share this post


Link to post
Share on other sites

@tdm Thanks. I have no news about data loss or data corruptions with btrfs since ~linux 4.4 except for any of the striped RAID usage (I'm not including winbtrfs here).

However, ext4 is a rubust file system. It lacks some useful features but it is a great jump from FAT32 already. Thanks.

Share this post


Link to post
Share on other sites
10 hours ago, Craig said:

I think someone would have to test it to know.  We do know stock doesn't support exfat and does support FAT32.  Other filesystems like btrfs, f2fs, ntfs untested but unlikely imo.    Lineage a lot more likely, I've had f2fs support there before and presumably still works now, and tdm (los dev) recently mentioned exfat is on his to-do list.  But you're the first to mention btrfs that I know of.

I have tried to format SD card to f2fs but stock firmware has always wanted to reformat it.

  • Sad 1

Share this post


Link to post
Share on other sites
11 hours ago, tdm said:

btrfs is not supported on android, neither stock nor lineage. It wouldn't be terribly hard to add it to lineage but the issue is nobody wants to use it. It's not been very stable in the past and so trust isn't there. Probably won't be for a very long time, if ever. If you want to get away from fat/vfat/exfat, your best option is probably ext4. Lineage has supported ext4 sdcards for just about forever.

To defend one of my favourite filesystems: I have my daily driver notebook running on btrfs since 2014, fully stable. And the features that the COW nature of it offers are vastly underestimated: You may think about subvolumes and snapshotting them, but did you know that with reflinking you can have snapshot semantics on a per-file level, without any need to create subvolumes? You don't need to think in advance where you want to set the boundary for a snapshot, you just reflink copy the files that you want to "snapshot". Have a huge build tree with icky or non-existent version control where you want to experiment in? Just `cp --reflink` it, the copy won't take more space than the metadata, do your experiment and just move the folder back if you want to revert. No need to create a subvolume first or anything. Oh, and SailfishOS uses it on it's internal storage as well, and my Jolla still hasn't died, despite many many factory resets (which are based on btrfs subvolumes).

 

But… I also wouldn't use it on an SD card. The strict COW nature of btrfs means that at some point you have to defragment (read: fully rewrite) it, and that will kill your SD card, no matter how expensive and high-end it was.

 

  • Like 1

Share this post


Link to post
Share on other sites
13 minutes ago, Gigadoc2 said:

To defend one of my favourite filesystems: I have my daily driver notebook running on btrfs since 2014, fully stable.

 

Anecdotal evidence is never sufficient for something as critical as a filesystem.  And I have another anecdote -- I worked next to Steve Kondik (the "Cyanogen" in CyanogenMod that preceded LineageOS) while Cyanogen, Inc. was a thing.  One day he announced that btrfs ate the data on his laptop and vowed never to use it again.  On the other hand, I have never experienced a single data loss event in over 20 years of using ext2/3/4 on many different devices (desktops, server, and laptops) that wasn't hardware related.

 

Sure, if you want to use it and it works for you, go for it.  And I have no doubt that it's getting more stable all the time.  But negative experiences with filesystems live on for a long, long time.

 

13 minutes ago, Gigadoc2 said:

But… I also wouldn't use it on an SD card. The strict COW nature of btrfs means that at some point you have to defragment (read: fully rewrite) it, and that will kill your SD card, no matter how expensive and high-end it was.

 

Indeed.  Additionally the fancy features (including CoW) slow the performance considerably (search "btrfs vs ext4 benchmark"), and sdcards are already relatively slow.

 

  • Like 1

Share this post


Link to post
Share on other sites
2 hours ago, tdm said:

Anecdotal evidence is never sufficient for something as critical as a filesystem.

You are right, I wanted to make that the point of my reply (but somehow forgot to include it): So far I've only seen anecdotal evidence for either claim, and no reliable statistics (and I am not sure how one would get these). So I wouldn't discount it on the basis of stability claims some people made at some time, but rather because it does not fit either SD cards or Android in general (how would you even use its features?).

2 hours ago, tdm said:

Indeed.  Additionally the fancy features (including CoW) slow the performance considerably (search "btrfs vs ext4 benchmark"), and sdcards are already relatively slow.

Well, it depends on what you are benchmarking, certain operations will be faster on any COW filesystem (copying, as an easy example), but then random writing will slow down things a lot. I don't think Android will do much random writing to SD cards (it mostly reads what you put on there, right?), but then it will also not do anything where COW is an advantage.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Terms