-
Notifications
You must be signed in to change notification settings - Fork 54
Add bcachefs storage driver with subvolume/snapshot support #518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Implement a new storage driver for bcachefs filesystems that uses subvolumes and snapshots for container layer management, similar to the existing btrfs driver. Features: - Implementation using direct ioctl syscalls - Subvolume creation via BCH_IOCTL_SUBVOLUME_CREATE - Snapshot creation with BCH_SUBVOL_SNAPSHOT_CREATE flag - Subvolume detection using statx() with STATX_SUBVOL - Recursive nested subvolume deletion - Support for both root and rootless operation Signed-off-by: Jérôme Poulin <jeromepoulin@gmail.com>
|
✅ A new PR has been created in buildah to vendor these changes: containers/buildah#6559 |
Luap99
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ref #146
Personally I am not convinced of the value of yet another storage driver in this code base. bcachefs was dropped from the upstream kernel which means doing any sort of testing more complicated as it will likely not be be default in either fedora or debian which are the only distros we test in CI.
We already have largely unmaintained btrfs and zfs drivers in this code base so I don't want to add more of this.
Or to turn the question around what does using this driver over overlayfs on top of bcachefs offer?
|
how does it behave when you use user namespaces? e.g. what is the performance when you run a bunch of |
As in #146 (comment), the future directions that have been most discussed are, indeed, ~incompatible with filesystem-snapshot-based layer storage. OTOH, *shrug* the generic code is already constrained by the need to support unprivileged E.g., AFAICS we do no other testing of ZFS in this repo. From time to time, there are issues reported, and they frequently go without substantive response. But then again, the “no upstream testing” situation seems to work for FreeBSD … maybe, well enough? (Or maybe it is going so badly that I don’t even know how bad it is.) There is some middle ground where a non-default approach is clearly not the primary focus, not recommended and not shipped as primary release artifact of e.g. Podman, but support present in the main project’s repository makes things a bit easier for people interested in that non-default approach. Maybe the important components for this are:
Purely in the abstract, new filesystems are a Big Deal, and … potentially very valuable? The promise of Btrfs as the universal future, I guess, didn’t quite pan out that way (yet?), but maybe something (
This is important — I think realistically we would not be testing the proposed driver, limiting it to the “will be kept buildable” position.
Yes — the original discussion in #146 motivated this by saying that If overlay is viable in the short (or intermediate?) term (I don’t know), and if we’d prefer users to use overlay over a new graph driver (I’m not sure but it seems very likely), then it might be better to not add a new graph driver that could direct users away from the preferred path. |
That is what we have with zfs yes. But we used to actually have zfs tests so to me the situation is different. I find it quite unsatisfactory to respond to zfs and btrfs bug reports like: hey, actually no active maintainer cares about them and as such are unlikely to fix issues there. Keeping it buildable has a cost too, any time someone needs to make changes to the driver interface it is more work. |
For testing story, do you require that the code be in official distro repos,
|
We maintain our own debian and fedora images here https://github.com/containers/automation_images/ So that is why I said no way to test, I didn't mean it is not a unsolvable problem. |
|
I understand the concerns about the CI having to test on yet another filesystem. Bcachefs was removed from the kernel because development is going a bit too quick to keep up with release candidates. The main features from bcachefs that makes me prefer having a direct snapshot driver are:
Btrfs offers compression and async snapshot delete but (probably) never will offer cache tiers without adding an intermediate layer of complexity. giuseppe, I didn't test that, is there any expectations? Is it xattr or something? For the CI, bcachefs is now offering stable/unstable/snapshot repositories for Ubuntu Questing at https://apt.bcachefs.org/ and ArchLinux + some others already have it well supported. So it would be a matter of adding it as a dkms package. By using the stable branch, I'm pretty sure there won't be any breakage. There's a very active community on IRC maintaining various packages that will make sure to point out any 404 in that regard. Finally, to address the concerns of maintenance burden over time, as long as there is no easy plugin architecture for drivers, what level of maintenance commitment would be acceptable? How often is the driver interface expected to change? I'll be using this driver for multiple Gitlab runners in production if it works out. |
Implement a new storage driver for bcachefs filesystems that uses subvolumes and snapshots for container layer management, similar to the existing btrfs driver.
Features:
Tested on my system with multiple images: