-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
RFE: Add volume based filesystem objects (btrfs, bcachefs) #1232
Comments
Thanks for this detailed design proposal! Cc: @cmurf as I don't feel qualified enough for You may want to opt for virtual objects (i.e. on the same level as block objects and drive objects), as So perhaps the concept of btrfs volume shoud be modelled as a Then I see an issue with instantiation (1:N mapping) - And for So if I understand correctly:
FYI, my old attempt to enhance device identification was #838. It might still happen one day, though it's a large, intrusive change. Also, in case this turns out to an actual implementation and
Forget about |
See also #802 |
We are doing this in blivet and while it makes a lot of sense to replicate the LVM "structure" it also brings some issues especially for users that use btrfs as a simple filesystem only: they suddenly see a "btrfs volume" and have no idea what that means. We had some bug reports for Anaconda from people that expect simply reformatting btrfs to ext4 which we don't support because with this LVM-like representation the btrfs volume needs to be removed first (like running The biggest challenge with btrfs would be getting the subvolume information -- btrfs needs to be mounted to gather subvolume information and we are definitely not doing this automatically in udisks (we've been there, it was a terrible idea) so the proposed |
Worth adding that the standard |
UDisks supports Btrfs through a btrfs filesystem object in Cockpit we noticed
this isn't enough abstraction to easily work and represent btrfs (and maybe
other volume based fs as well such as bcachefs).
In Cockpit we decided to represent btrfs similiar to LVM from an UI perspective
To represent the usage per device in a multi device setup we currently parse the output of
btrfs filesystem show $uuid
, as nothing in UDisks exists to represent a "btrfs device".To show the mount points per subvolume (outside of btrfs) we parse
findmnt --btrfs --json
to detect these. This might be a very Cockpit specific issue.In general we need to keep a lot of global state for keeping a list of blocks per volume, etc.
This seems like a good base for UDisks objects, hopefully re-usable with bcachefs:
design proposal
org.freedesktop.UDisks2.Filesystem.BTRFSSubvolume
Represents a btrfs subvolume from
btrfs subvolume list $mountpoint
Methods:
Properties
org.freedesktop.UDisks2.Filesystem.BTRFSVolume
Represents a btrfs "filesystem"
btrfs filesystem show
Methods:
btrfs replace
- replacing a failed device. Works different in bcachefs it seems. Need more investigationProperties:
Multi device RAID configuration example:
Missing devices is for multi device setups see below:
org.freedesktop.UDisks2.Filesystem.BTRFSDevice
A device belonging to a "volume" as can be seen in
btrfs filesystem show
Methods:
Properties:
All of this would be a ton of work, and careful design to validate the concepts work with bcachefs and btrfs. For btrfs it would be ideal to use libbtrfsutil with libblockdev if it could add support for getting information about btrfs devices (missing etc., usage), stats and everything else without parsing cli output.
Note that this issue is a very rough draft, there are a lot of open btrfs issues and a multi device pull request I haven't had time to go through yet. (and overall I will have limited time to dedicate until after January)
The text was updated successfully, but these errors were encountered: