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
[IMPROVEMENT] Expose actual size of a logical volume #5947
Comments
The size of the logical volume can be obtained with the following formula: |
lvol can be thin-provisioned. |
Ok sorry, actual size/used block number. |
Yes, the allocated blocks. |
Check write_zeros if impact the num_allocated_blocks |
@derekbit Yes, write_zeros allocate clusters in the same way a normal write do @shuo-wu I can implement in blobstore a function to retrieve the number of allocated clusters, so the RPC can calculate the real size of the volume. To make that, I think the more performant solution is to insert another variable in |
Longhorn SPDK server fetch all lvols ( |
Ok, so the best solution is to use a new variable. We will then pay attention every time we rebase from upstream to check for new code that modify the cluster map. |
BTW, how does the maintainer consider the missing of actual size/allocated cluster number in the lvol get result? If the upstream SPDK could accept this feature, do we still need to pay attention to the future cluster map modifications? |
If we are able to make this development accepted on upstream, we will not need to pay this attention. |
Our idea probably will be accepted on upstream and will be developed in shallow copy patch serie: if we have the actual size of a logical volume there is no need to calculate the total number of clusters to be copied |
@DamiaSan
I get lost in the discussion. Could you help elaborate more on the design
of the actual size calculation? Thank you.
…On Wed, Aug 2, 2023 at 2:38 PM Damiano Cipriani ***@***.***> wrote:
Our idea probably will be accepted on upstream and will be developed in
shallow copy patch serie: if we have the actual size of a logical volume
there is no need to calculate the total number of clusters to be copied
|
We will add a new variable to the |
Then will we deprecate the shallow copy status check API after launching this actual size feature? |
No, the shallow copy status check API will read this new variable to understand how many clusters will be copied. Actually this number is calculated at the beginning of the shallow copy operation |
This is done in #6388 |
It seems the actual size is calculated when doing shallow copy. Can we get the value anytime? cc @DamiaSan |
Yes, it is exactly what I have just done. As soon as this development will end the review stage in gerrit upstream (see #6388 ), we will have a new filed in lvol dedicated section of |
Pre Ready-For-Testing Checklist
|
Upstream review is quite slow, I will port this development in our repo |
The review process is done here: |
@derekbit is the spdk-engine part also ready? |
SPDK and go-spdk-engine are read. Waiting for the Shuo's snapshot part. The actual size is set in snaoshot disk (lvol) info. |
Moving back to implementation, and add @shuo-wu part of assignees. |
Hi @innobead & @DamiaSan : |
Moved this to implementation first. Wait for @DamiaSan update. |
Pre Ready-For-Testing Checklist
longhorn/longhorn-ui#676
|
SPDK part is already merged: longhorn/spdk#24 |
Is your improvement request related to a feature? Please describe (👍 if you like this request)
Currently, the logic volume get result won't tell the actual size, then Longhorn cannot calculate the actual size for each volume.
Describe the solution you'd like
The logical volume get result should show the actual size/used block number
Additional context
N/A
The text was updated successfully, but these errors were encountered: