Skip to content
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

Support issuing an instruction for Stratis filesystem merge and storing the instruction in filesystem metadata #3621

Open
mulkieran opened this issue May 21, 2024 · 2 comments
Assignees

Comments

@mulkieran
Copy link
Member

mulkieran commented May 21, 2024

Related stratis-storage/project#597

We do not plan to do merges into anything other than a snapshot's origin. Given this the tasks are:

  1. Augment the filesystem metadata with a new field, merge, indicating that the filesystem is to be merged. The field makes no sense if there is no origin set.
  • So, we could make the field Option<bool>. If the filesystem has no origin, then the field is None. If the filesystem has an origin, the the field is Some(true) or Some(false). If the filesystem has the concept of origin, but no merge field then it might have a None value for merge anyway. Treat None as Some(false) in the case where the the origin field is present. Ensure that next time the field is written it is written as Some(false).

  • The alternative is to make it a non-optional field. But that will not work anyway until 4.0. We could leave a Note to make it non-optional. But otherwise, the first option will always be consistent.

  1. Augment the D-Bus API with a new command RequestMerge on a pool. It can take the pool object path and the UUID or name of the filesystem. Since it can not merge into anything but the origin, that is all the information it needs. It should error on (a) no origin for the filesystem for which the request is made, (b) other filesystem already scheduled to merge into same origin, (c) a difference between the designated filesystem's size limit and the origin size limit. Why? Why not make it an automatic adjustment when the merge occurs? We will have to work out a way to reconcile a number of the fields in the filesystem metadata. Assuming the request is acceptable, then the filesystem metadata must be updated with the merge field set to Some(true). NOTE: we have decided that different filesystem size limit is not a reason to reject the merge request. That value will be updated from the snapshot's value.
@mulkieran mulkieran added this to To do in 2024May via automation May 21, 2024
@mulkieran mulkieran self-assigned this May 21, 2024
@mulkieran
Copy link
Member Author

Note that we already report the origin of any snapshot on the D-Bus and we maintain this origin when filesystems are deleted, etc. If a merge is scheduled, the snapshot will maintain a to-be-merged status. This should be observable in the filesystem information via a D-Bus property.

@mulkieran
Copy link
Member Author

We will first add a debug option to get filesystem metadata

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress (long term)
Development

No branches or pull requests

1 participant