Announcement

Collapse
No announcement yet.

Bcachefs Merges Support For Btrfs-Like Snapshots

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • pkese
    replied
    Originally posted by Khrundel View Post
    Which day is "day one"? A day of first commit? A day when it was merged to upstream kernel?
    The first version of btrfs that got merged into kernel was v0.17 and that was kernel 2.6.29, back in January 2009.
    The log goes back to April 2008 when btrfs v0.13 already had: COW, checksumming, transactions, snapshots, subvolumes...

    But a wider answer regarding "day 1" issue is that in copy-on-write-b-tree system, snapshotting is part of the architecture.
    First you start with snapshots for each transaction. Then you add the code to delete all snapshots, that weren't meant to stay around.

    Leave a comment:


  • kreijack
    replied
    Originally posted by Khrundel View Post
    Which day is "day one"? A day of first commit? A day when it was merged to upstream kernel?
    Definitely btrfs got snapshot capability in the first year [3].

    But I think that this have to be read read in the right context: iirc BTRFS was sponsored by Oracle from the beginning; now it is supported by redhat, suse, WD, facebook; instead bcachefs is still without a sponsor. I think that Kent Overstreet is a very good developer, but it is only one and this is not enough. The today standard requires that a filesystem cannot be developed by only one men.

    I want to give you more data:
    The bcachefs mailing list has only 3 message in September 2021, and 2 in july 2021; this after 6 year of development. [1]
    The btrfs mailing list has 192 message in November 2009 (the development started in 2007, I was unable to find older data).

    This is another proof that the developer effort available for bcachefs is very small; the same is the users base, which is quite limited.

    Somewhere in this thread, there is a complain about the fact that BTRFS misses a btrfs.fsck tool. In this btrfs is not an exception (think about xfs). Both xfs and btrfs have a tool to repair the filesystem (xfs_repair and "btrfs check") different from fsck; the point is that the "btrfs check" is developed against a base of users of several order bigger than bcachefs: which tools do you expect to be more reliable: btrfs check or fsck.bcachefs ?

    I am quite sure that there are cases where fsck.bcachefs is better than btrfs check; but I am also quite sure that there are more cases where the latter is better than the former.

    The number of bcachefs developers is quite limited, the users base is quite limited. Behind the bcachefs technical merits, these are the biggest problem of bcachefs.

    Anyway bcachefs got the snapshot capability; but quota is missing; now it has a set of capability comparable with btrfs. I am couriosus about the performance (without the snapshot, the previous comparatives are meaningless).

    BR

    [1] https://lore.kernel.org/linux-bcachefs/
    [2] https://marc.info/?l=linux-btrfs&r=1&b=200911&w=2
    [3] https://github.com/torvalds/linux/bl.../super.c#L2577 (June 2007, but this is not the first instance)
    Last edited by kreijack; 27 September 2021, 03:54 PM.

    Leave a comment:


  • useless
    replied
    Originally posted by Khrundel View Post
    Had encountered almost same situation. After several boot freezes (my videocard can't work in 'performance' bios mode anymore), btrfs started to switch to readonly due to checksum error. I had a btrfs over bcache setup, so it is possible that different storage devices had written some data out of sync. Well, I was ready to lose some of recently written data, but btrfs check had a different plan. First, I was shocked when builtin check tool of this "production ready" FS advises user against using itself. Still I have backups for almost all important data and had no enough drivespace to copy all remaining content so I've took a risk. This tool have removed about 20-30% of files from my home, including files which were created years ago. And it failed to fix partition, there was still checksum errors afterward. So, I had to buy another drive, have salvaged everything what was still there. I can't swear my drive wasn't faulty, but this should be standard situation for a filesystem checking utility.
    You mean: recreate missing data/metadata from thin air? The thing didn't write to safe storage what was supposed to. You were using bcache which, to the extent of my memory, can have disastrous consequences if things go south.

    By the way, if it doesn't have a backup it's not important.

    Leave a comment:


  • Khrundel
    replied
    Originally posted by pkese View Post
    It took bcachefs ... what ... six year to implement snapshots. A feature that the `bloated` btrfs had from day one.
    Which day is "day one"? A day of first commit? A day when it was merged to upstream kernel?

    Leave a comment:


  • Khrundel
    replied
    Originally posted by useless View Post
    Then you miss one of the main benefits of these fancy new filesystems:
    Had encountered almost same situation. After several boot freezes (my videocard can't work in 'performance' bios mode anymore), btrfs started to switch to readonly due to checksum error. I had a btrfs over bcache setup, so it is possible that different storage devices had written some data out of sync. Well, I was ready to lose some of recently written data, but btrfs check had a different plan. First, I was shocked when builtin check tool of this "production ready" FS advises user against using itself. Still I have backups for almost all important data and had no enough drivespace to copy all remaining content so I've took a risk. This tool have removed about 20-30% of files from my home, including files which were created years ago. And it failed to fix partition, there was still checksum errors afterward. So, I had to buy another drive, have salvaged everything what was still there. I can't swear my drive wasn't faulty, but this should be standard situation for a filesystem checking utility.

    Leave a comment:


  • flower
    replied
    Originally posted by vb_linux View Post
    I use Ubuntu, I really really hope they offer btrfs integration something like my setup.
    1. I use a raid1 desktop with btrfs, with compression.(2 nvme - I know a waste of money but makes my system unbreakable).
    2. Put Timeshift on top of it. Now, I have scheduled backup, and if I mess my system, restoration in one click away. It should have an option of removing oldest snapshot or oldest daily snapshot if disk is becoming full.
    3. Added grub-btrfs on top, and it shows all the snapshots I caan boot into, if I experiment too much and break my system.
    4. I did add apt btrfs plugin but it created a snapshot on even a small package install or update. It was too much. I noticed it should only be done for dist-upgrades probably.

    If Ubuntu starts offering these kinds of things by default, you can mess around your system, experiment with settings, drivers, kernel, etc. and you don't have to go back to reinstall every time you mess up. Or you don't have to research every problem to fix the mess your system is currently in.

    I want to try pipewire-ppa with my Ubuntu. I took a snapshot, played with it. If it is ready great, if it is not ready, I don't have to reverse every setting, just restore to the previous snapshot.
    If I want to try latest Ubuntu 21.10 beta, same thing.

    Issues I have faced so far with Btrfs:
    1. Single disk setup, if error creeps in because of hard reboot or something, not as easy to run fsck and fix it.
    2. Initially, I combined a nvme with a 5400rpm hdd in raid1. Silly me, I thought that could work. But that system became as slow as the weakest link.
    ubuntu integrates zfs as an install option. and does exactly what you want - bootable snapshots after any apt command nicely integrated in grub.

    Leave a comment:


  • pkese
    replied
    Originally posted by birdie View Post
    So how come you're so certain that it the issue was caused by btrfs rather than LUKS?

    Leave a comment:


  • pkese
    replied
    Originally posted by cynic View Post

    don't hurry.
    if it get mainlined too early it will incour into the same issues that happened to btrfs: bad reputation for initial bugs, harder to fix things and so on.


    It took bcachefs ... what ... six year to implement snapshots. A feature that the `bloated` btrfs had from day one.
    Last edited by pkese; 27 September 2021, 02:32 PM. Reason: Fix typo

    Leave a comment:


  • vb_linux
    replied
    I use Ubuntu, I really really hope they offer btrfs integration something like my setup.
    1. I use a raid1 desktop with btrfs, with compression.(2 nvme - I know a waste of money but makes my system unbreakable).
    2. Put Timeshift on top of it. Now, I have scheduled backup, and if I mess my system, restoration in one click away. It should have an option of removing oldest snapshot or oldest daily snapshot if disk is becoming full.
    3. Added grub-btrfs on top, and it shows all the snapshots I caan boot into, if I experiment too much and break my system.
    4. I did add apt btrfs plugin but it created a snapshot on even a small package install or update. It was too much. I noticed it should only be done for dist-upgrades probably.

    If Ubuntu starts offering these kinds of things by default, you can mess around your system, experiment with settings, drivers, kernel, etc. and you don't have to go back to reinstall every time you mess up. Or you don't have to research every problem to fix the mess your system is currently in.

    I want to try pipewire-ppa with my Ubuntu. I took a snapshot, played with it. If it is ready great, if it is not ready, I don't have to reverse every setting, just restore to the previous snapshot.
    If I want to try latest Ubuntu 21.10 beta, same thing.

    Issues I have faced so far with Btrfs:
    1. Single disk setup, if error creeps in because of hard reboot or something, not as easy to run fsck and fix it.
    2. Initially, I combined a nvme with a 5400rpm hdd in raid1. Silly me, I thought that could work. But that system became as slow as the weakest link.
    Last edited by vb_linux; 27 September 2021, 02:00 PM.

    Leave a comment:


  • Lycanthropist
    replied
    bcachefs looks really promising! I am currently in using btrfs in RAID1 in in my NAS. Maybe bcachefs can replace it in a few years once it has matured upstream.

    Leave a comment:

Working...
X