archinstall icon indicating copy to clipboard operation
archinstall copied to clipboard

add bcachefs option (task for ~January release)

Open kojq opened this issue 2 years ago • 16 comments

This can be done next year since that is around when we will have kernel 6.7.

  • We will need to consider the TRIM aspect. The filesystem currently has a --discard flag. There is no scrub feature at the moment.

  • There is an encryption option built in.

  • I suggest zstd compression as in btrfs (flags are different).

kojq avatar Nov 06 '23 04:11 kojq

If we adopt bcachefs (which I think we should), it would be nice if we from the start go in with the mindset of supporting multiple disks joined in as one using multiple drives configuration.

This is something we don't have today in btrfs, mainly because the code was already a bit complex and handling that logic would scare me a bit.. definitely more likely to get that support today but from the start that was nearly impossible.

And we should aim for supporting snapshots out of the gate too. I did a quick search as I haven't even looked at this before properly.. and I don't see much tooling around this yet. So perhaps we have to rely on users using CLI for accessing snapshots until it gets popular.

Cool idea, I like it :)

Torxed avatar Nov 06 '23 16:11 Torxed

Hello! Has any progress been made on this? I'm really hyped to see how it might turn out :)

pog5 avatar Jan 11 '24 16:01 pog5

Same really, would be nice to have this for the Feb release, if possible of-course

Plarpoon avatar Jan 16 '24 09:01 Plarpoon

I second this, hyped for a bcachefs option.

armandothefirst avatar Jan 16 '24 13:01 armandothefirst

Here is a basic patch I created for the single drive setup.

https://github.com/archlinux/archinstall/commit/edc0767f5e4d3df45ddb679e3a5c309f8ee29ab1

codefiles avatar Jan 17 '24 02:01 codefiles

Nice! Awesome!

Plarpoon avatar Jan 17 '24 03:01 Plarpoon

This would be great.

However, currently, there's an open issue that results in large files reliably being corrupted. This seems serious and it's suspected to be compression related so until that is resolved, I think it would be wise not to apply compression yet.

Also, replicating the default btrfs subvolume layout in Archinstall would be a problem because currently bcachefs subvolumes cannot be mounted via mount. So if users wanted to manage a specific subvolume offline, targeting it (e.g. @) from a device wouldn't be possible. As a result, the subvolume layout would need to be flat for chroot to work and there'd just be two entries in fstab--the root and ESP.

@codefiles Have you explored this?

c3Ls1US avatar Jan 21 '24 04:01 c3Ls1US

I perused the development of the userspace tools at bcachefs-tools and subscribed to some threads that are relevant.

codefiles avatar Jan 21 '24 18:01 codefiles

Also, I think we should decide on the initial feature set to support. For instance, for certain we do not want to enable erasure coding since it's currently not stable. And if I remember correctly, the authenticated encryption feature hasn't received a security audit(s) either. But since it's claimed as "stable" we can maybe hide the feature behind the experimental flag?

For encryption though, I'm not too sure if there's currently infrastructure to support querying for the password? I would imagine the initramfs would need to shell to bcachefs and in the case that there's a home partition a daemon would be needed.

c3Ls1US avatar Jan 21 '24 19:01 c3Ls1US

Also, I think we should decide on the initial feature set to support. For instance, for certain we do not want to enable erasure coding since it's currently not stable. And if I remember correctly, the authenticated encryption feature hasn't received a security audit(s) either. But since it's claimed as "stable" we can maybe hide the feature behind the experimental flag?

For encryption though, I'm not too sure if there's currently infrastructure to support querying for the password? I would imagine the initramfs would need to shell to bcachefs and in the case that there's a home partition a daemon would be needed.

The bcachefs team already has a mkinitcpio hook for that. On-the-fly compression and snapshots are also pretty stable — the only missing features at the moment are send/receive, but with the performance gains I've been noticing, that's not too much of a problem.

kennystrawnmusic avatar Feb 13 '24 02:02 kennystrawnmusic

Here is a basic patch I created for the single drive setup.

edc0767

was this merged?

ryzendew avatar Apr 08 '24 17:04 ryzendew

Nope.

kojq avatar Apr 08 '24 17:04 kojq

Any progress or estimated timeline on this? We're up to 6.9 and the bcachefs story seems to be stabilizing slowly but steadily.

imavlr avatar May 20 '24 03:05 imavlr

Here is a basic patch I created for the single drive setup.

edc0767

I'd love to merge this in, but the code is outside the repo and I'd like to give @codefiles the rep by submitting the PR.

I'm in the process of automating the test cases and I could make sure this gets integrated as a test case while I'm at it :)

Torxed avatar May 20 '24 08:05 Torxed