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

[FEATURE] Add a brand new/empty bdev with WriteOnly mode to the RAID1 bdev #5865

Closed
DamiaSan opened this issue May 5, 2023 · 6 comments · Fixed by longhorn/spdk#19
Closed
Assignees
Labels
area/v2-data-engine v2 data engine (SPDK) kind/feature Feature request, new feature priority/0 Must be implement or fixed in this release (managed by PO)
Milestone

Comments

@DamiaSan
Copy link
Contributor

DamiaSan commented May 5, 2023

This feature is a step to implement the replica rebuilding without stopping the volume for all the time of the rebuild process

@DamiaSan DamiaSan added kind/feature Feature request, new feature area/v2-data-engine v2 data engine (SPDK) area/spdk-replica labels May 5, 2023
@DamiaSan DamiaSan added this to the v1.5.0 milestone May 5, 2023
@DamiaSan DamiaSan self-assigned this May 5, 2023
@innobead innobead added the priority/2 Nice to implement or fix in this release (managed by PO) label May 5, 2023
@innobead
Copy link
Member

innobead commented May 5, 2023

cc @longhorn/dev-data-plane

@DamiaSan DamiaSan removed this from the v1.5.0 milestone May 8, 2023
@DamiaSan
Copy link
Contributor Author

DamiaSan commented May 15, 2023

Some implementations details:

  • function raid_bdev_is_mode_supported, only raid1 supports add
  • function raid_bdev_update to manage incremented num_base_bdevs
    • must update raid1 channel base_bdev_read_bw
  • function bdev_raid_add_base_bdev
    • call raid_bdev_add_base_device
    • for each channel, call a function to update raid and module channel with increased num_base_bdevs

Must implement a revert operation too, because memory allocation on per-channel add function can fail?
...
Probably not, even in blobstore (blob_resize) and nvme_ctrlr multiple realloc failure are not reverted.
If the operation fails with -ENOMEM error, we have 2 option:

@innobead innobead added this to the v1.6.0 milestone May 29, 2023
@innobead innobead added priority/0 Must be implement or fixed in this release (managed by PO) and removed priority/2 Nice to implement or fix in this release (managed by PO) labels May 29, 2023
@DamiaSan
Copy link
Contributor Author

DamiaSan commented Jun 8, 2023

Some notes on tests:

  • add to non used raid in new slot
  • add to non used raid in existing slot
  • add to non used raid and after use it
  • add to used raid
  • add to raid with superblock in new slot
  • add to raid with superblock in existing slot
  • load an updated raid superblock

@longhorn-io-github-bot
Copy link
Collaborator

longhorn-io-github-bot commented Jun 16, 2023

Pre Ready-For-Testing Checklist

@DamiaSan DamiaSan linked a pull request Jul 21, 2023 that will close this issue
@DamiaSan
Copy link
Contributor Author

With the introduction of the external snapshot, write only mode is no more necessary

@DamiaSan DamiaSan removed a link to a pull request Aug 30, 2023
@DamiaSan DamiaSan linked a pull request Aug 30, 2023 that will close this issue
@shuo-wu
Copy link
Contributor

shuo-wu commented Aug 30, 2023

The related discussion: #5866 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/v2-data-engine v2 data engine (SPDK) kind/feature Feature request, new feature priority/0 Must be implement or fixed in this release (managed by PO)
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

4 participants