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

feat(thin-pool) auto-reclaim the space reserved for thin pool #121

Open
mittachaitu opened this issue Jul 14, 2021 · 3 comments
Open

feat(thin-pool) auto-reclaim the space reserved for thin pool #121

mittachaitu opened this issue Jul 14, 2021 · 3 comments
Assignees
Labels
Milestone

Comments

@mittachaitu
Copy link

Describe the problem/challenge you have
As of when thin volume is provisioned, LVM creates a thin pool on underlying
VG which reserves the space to provision thin volume(from same thin pool).
This reserved space is good if user has a use case to create thin volumes in near future.
If there are no thin volume on pool and if user want to create thick volumes then reclaiming
of pool space is not supported with current implementation.

Describe the solution you'd like

  • Having parameter under StorageClass to specify whether pool space has to
    be reclaimed after deleting the last thin volume in the pool.
    parameters:
      autoReclaimPoolSpace: true
  • If it is set to true than LVM provisioner can reclaim the reserved space for thin volumes after deleting last thin volume in the pool.
  • If parameter is not specified defaults to existing behavior.

Anything else you would like to add:
NA

Environment:

  • LVM Driver version
  • Kubernetes version (use kubectl version):
  • Kubernetes installer & version:
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
@dsharma-dc dsharma-dc self-assigned this May 31, 2024
@dsharma-dc dsharma-dc added the enhancement New feature or request label May 31, 2024
@dsharma-dc
Copy link
Contributor

This is a good optimisation to have. However, we should auto-reclaim the thinpool space for only the thinpool that we created(in case of thinpool absence). If an admin/user had pre-created a thinpool named <vgname>_thinpool then we shouldn't reclaim that. That pre-created thinpool could even be larger than the thin LVs that we requested on it.

@dsharma-dc dsharma-dc added Backlog and removed openforce enhancement New feature or request labels Jun 5, 2024
@dsharma-dc
Copy link
Contributor

Not yet picked for immediate addressing. Revisiting in a few weeks.

@avishnu
Copy link
Member

avishnu commented Sep 12, 2024

Decided to explore the following approach:

  • LVM LocalPV provisioner adds a label on the thin pool it created during the creation of the first thin volume. This label identifies the creator as the provisioner.
  • When the last thin volume is deleted, the thin pool having the label will also be deleted.
  • Need to handle any parallel requests for synchronization.

@avishnu avishnu added this to the v4.3 milestone Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants