Open iwanbk opened 3 months ago
This check involves the work on porting current btrfs code to bcachefs, it is WIP in #2375
Deep diving the code is expected to give more understanding, although function call is not always obvious because of zbus
usage. (zbus
is a good thing, we only need to be more throughout when tracing the call flow)
what we really need:
how subvolume limit used:
a. set limit on zos
cache: no issue here, we will keep it on btrfs
b. when creating volume for a container
VolumeCreate
during container creationpossible solutions:
lvm
is not a choice for us -> ..... need explanation ....bcachefs
: possibly a lot of works?bcachefs
has a plan to support subvolume quota? (looks like not)usrquota
, prjquota
, grpquota
in bcachefs
c. on VolumeUpdate
https://github.com/threefoldtech/zos/blob/0ea61706e1a501d4e774a9195c139e2995bdd1cb/pkg/primitives/volume/volume.go#L98
it is used by:
d. on pkg/flist
https://github.com/threefoldtech/zos/blob/0ea61706e1a501d4e774a9195c139e2995bdd1cb/pkg/flist/flist.go#L472
it is used by qsfsd
when ....
FS_NOCOW_FL
file attributewhat we really need:
nocow
, it supposed to have better performancepossible solution:
cow
, it is less performance but not that much (need proof?) subvolume info
commandwhat we really need:
possible solutions:
we don't really need it. Subvolume disk usage only really needed when there is no limit on the subvolume. And the only occurence for this is when we create zdb
cache.
zdb
cache disk usage is counted using it's own method.
what we really need: Get disk label/fstype on startup
solution Maxus will upgrade it
The new bcachefs based storage must provide all the features provided by the btrfs based storage.
Because all disk of the old nodes already formatted with btrfs, we only support new nodes
Root filesystem still use btrfs
with it's /var/run/cache
bcachefs
supports a real pool, where multiple devices can be formatted into a single filesystem:
writeback caching:
config
--foreground_target=ssd
--background_target=hdd
--promote_target=ssd
Rust is the way to go, but the prototype can be build using Go
mkfs.bcachefs
also has this option, worth to check
--usrquota Enable user quotas
--grpquota Enable group quotas
--prjquota Enable project quotas
There was drama on LKML about bcachefs https://www.phoronix.com/news/Bcachefs-Fixes-Two-Choices.
Or "take your toy and go home" effectively alluding to taking it out of the mainline Linux kernel and go back to developing it out-of-tree.
The risk is that bcachefs
could be out of mainline kernel.
So, we observe and see for now.
Assess how we can use bcachefs on zos
related issues:
2074
2229
2374
Is your feature request related to a problem? Please describe
Why we need to move out from btrfs:
Why bcachefs:
scope:
bcachefs
will only be used for the workload, because.....Describe the solution you'd like
The assessment will be done in two phases
We do this check because we need to know how
btrfs
is currently used inzos
for these reasons:btrfs
features used in currentzos
can help us to design thebcachefs
usage. examples: how subvolume limit & usage being used, hownocow
file attribute is currently usedzos
, need to understand the full flow that relates to the use ofbtrfs
usageFor things that are compatible: good For non compatible things:
bcachefs
onzos
bcachefs
cc @delandtj