openebs / lvm-localpv

Dynamically provision Stateful Persistent Node-Local Volumes & Filesystems for Kubernetes that is integrated with a backend LVM2 data storage stack.
Apache License 2.0
250 stars 95 forks source link

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

Open mittachaitu opened 3 years ago

mittachaitu commented 3 years ago

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

Anything else you would like to add: NA

Environment:

dsharma-dc commented 3 months ago

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 commented 1 month ago

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

avishnu commented 1 week ago

Decided to explore the following approach: