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

Implement volume resizing #116

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Implement volume resizing #116

wants to merge 3 commits into from

Conversation

AaronDewes
Copy link

@AaronDewes AaronDewes commented Feb 24, 2024

Which issue(s) this PR fixes:

longhorn/longhorn#8022

What this PR does / why we need it:

Currently, SPDK volumes can not be resized. This aims at fixing this, and allows both growing and shrinking volumes.

Special notes for your reviewer:

I've not contributed to Longhorn before and this is completely untested. I'm trying to implement & test this feature, this is just a draft.

Additional documentation or context

@AaronDewes AaronDewes marked this pull request as draft February 24, 2024 23:10
AaronDewes added a commit to nirvati/longhorn-instance-manager that referenced this pull request Feb 24, 2024
Once longhorn/longhorn-spdk-engine#116 is merged, this needs to be reverted
AaronDewes added a commit to nirvati/longhorn-instance-manager that referenced this pull request Feb 25, 2024
Once longhorn/longhorn-spdk-engine#116 is merged, this needs to be reverted

Signed-off-by: Aaron Dewes <[email protected]>
This works by resizing all replicas individually.

Signed-off-by: Aaron Dewes <[email protected]>
Copy link

mergify bot commented Feb 26, 2024

This pull request is now in conflict. Could you fix it @AaronDewes? 🙏

@AaronDewes
Copy link
Author

The approach this takes is that individual replicas are all resized. A RAID device in spdk should be automatically resized if all underlying devices grow (https://github.com/longhorn/spdk/blob/6925ca6543e4ad5a5e3a5db09217ae16bf939831/module/bdev/raid/bdev_raid.c#L2102).

@derekbit
Copy link
Member

derekbit commented Mar 1, 2024

There is a dm linear device on the top of a device created by SPDK, so need to handle the dm device when expanding a volume.

Copy link

mergify bot commented Apr 17, 2024

This pull request is now in conflict. Could you fix it @AaronDewes? 🙏

1 similar comment
Copy link

mergify bot commented Apr 24, 2024

This pull request is now in conflict. Could you fix it @AaronDewes? 🙏

@DamiaSan
Copy link
Contributor

I didn't know that Aaron had already done this development, in the feature request ticket longhorn/longhorn#8022 there isn't any reference to this PR, so I understood that the development was to be done, as I actually did : longhorn/longhorn#8022 (comment).
At this point I prefer to proceed with my development on longhorn-spdk-engine and discard Aaron's one.
cc @derekbit

@derekbit
Copy link
Member

derekbit commented Nov 19, 2024

I didn't know that Aaron had already done this development, in the feature request ticket longhorn/longhorn#8022 there isn't any reference to this PR

No worries, but the PRs are actually referenced in longhorn/longhorn#8022.

image

I didn't know that Aaron had already done this development, in the feature request ticket longhorn/longhorn#8022 there isn't any reference to this PR, so I understood that the development was to be done, as I actually did : longhorn/longhorn#8022 (comment). At this point I prefer to proceed with my development on longhorn-spdk-engine and discard Aaron's one. cc @derekbit

@DamiaSan Sure! You can proceed with your development, but the most important feature is delta rebuilding. Please co-work with @shuo-wu first.

If you don't have time for the volume expansion feature (best effort in v1.8.0), feel free to transfer to @c3y1huang. Thank you.

cc @innobead

@DamiaSan
Copy link
Contributor

You can proceed with your development, but the most important feature is delta rebuilding. Please co-work with @shuo-wu first.

Yes I know, I only wanted to say that the apparent issue is solved and so the development can be completed without having other blocking tasks.

For delta rebuilding, I am actually creating into go-spdk-helper the new API for delta bitmap and for snapshot checksum. What about snapshot checksum in SPDK, I have to make a change to the PR based on a suggestion from Shuo.
What about the work on longhorn-spdk-engine, I don't know the status of the developments.

If you don't have time for the volume expansion feature (best effort in v1.8.0), feel free to transfer to @c3y1huang. Thank you.

As mentioned in the comment linked above longhorn/longhorn#8022 (comment), the work on types, go-spdk-helper and longhorn-spdk-engine has alredy been done and it is ready for the PR. What must be completed is the fix into SPDK, I have to finalize it and I don't think I can transfer it to Chin-Ya.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants