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

dm-thin: Retrieve physical used/free space in a dm-thin pool #444

Open
cmaiolino opened this issue Jun 13, 2019 · 5 comments
Open

dm-thin: Retrieve physical used/free space in a dm-thin pool #444

cmaiolino opened this issue Jun 13, 2019 · 5 comments
Assignees
Labels

Comments

@cmaiolino
Copy link

Hi,

Any possibility of adding an API call to retrieve space usage on an dm-thin pool?

Thanks

@vpodzime
Copy link
Contributor

Hi,
we have the bd_lvm_cache_stats() function which is actually just querying DM info. It would be very easy to add a similar function for a generic DM thin pool used outside of an LVM setup. I take it that's your case, @cmaiolino?

@vpodzime vpodzime added the RFE label Jun 16, 2019
@cmaiolino
Copy link
Author

Hi,
we have the bd_lvm_cache_stats() function which is actually just querying DM info. It would be very easy to add a similar function for a generic DM thin pool used outside of an LVM setup. I take it that's your case, @cmaiolino?

Heya,

Taking a quick look at what kind of information bd_lvm_cache_stats() returns, if such information can be retrieved from the thin pool itself (not from the volume), it can work. The information I really need is the real pool utilization, so I can check in case overcommitting of a thin volume, how much physical space is being used. Does it make more sense? :P

Cheers

@vpodzime
Copy link
Contributor

OH! I somehow read dm-cache instead of dm-thin, please ignore my previous comment.

In the result of bd_lvm_lvinfo() we have data_percent and metadata_percent, which is the usage info when then function is called on a thin pool (or any other pool, for that matter). However, it only works for LVM thin pools, not generic DM thin pools.

@cmaiolino
Copy link
Author

cmaiolino commented Jun 17, 2019 via email

@vpodzime vpodzime self-assigned this Jun 17, 2019
@vpodzime
Copy link
Contributor

I'll take a look at how hard it would be to add some bd_dm_pool_stats() function, hopefully for DM pools in general (to get back to my cache-misleading-path 😄).

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

2 participants