-
Notifications
You must be signed in to change notification settings - Fork 142
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
Only able to create a subvolume in the first mount point #1242
Comments
cc @mvollmer |
This is likely very hard to fix without breaking the API and either making |
Oh, pardon my ignorance, is it necessary to use mountpoint as an identification? Wouldn't volume UUID be enough for that? |
volume UUID as in the btrfs volume? Or the disk' UUID? Because a btrfs volume can have multiple mountpoints. |
I hereby declare that I have no clue how btrfs works, so I'll leave it to you, @jelly. As for the API - one possibility is to use the FYI, the module naming may be extended in form of |
@mvollmer and I discussed this a while ago and we came up with an potential solution (Or more or less how we solved it in Cockpit). CreateSubvolume will take (parent_subvolume, "newsubvolumename") as arguments (or just a path). And will look up the parent_subvolume's mount_point. We solved this in JavaScript wit the data from udisks:
The libblockdev create_subvolume invocation would just be Our Deletion code works similar but also allows for recursive deletion or subvolumes. Something which would be trivial to support once libblockdev uses libbtrfsutil which supports passing a What do you think? This would hide the complexity of figuring out the full path with mount point from the developer and you will always need to know the parent subvolume when creating one, except I suppose when you make a new subvolume on top of the root subvolume (id 5) so I guess the api should allow passing just a subvolume name for that. |
When a user has multiple subvol's mounted from the same blockdevice it is not possible to create a subvolume on a specific mount point. For example:
subvolumes:
mounts:
As the udisks code always grabs the same mount point you can't create a subvolume on /run/right as /run/left was mounted first.
Reproducer:
The text was updated successfully, but these errors were encountered: