Single lvm thinpool managing multiple bricks
In setups where multiple bricks in a node (either belonging to one single volume or spread across volumes) are managed by single lvm thinpool, then there is a possibility that with more and more snapshots being taken for the volume, the thinpool might get full and further snapshot requests might fail. Or some other IO errors also might happen if they are dependent on the lvm thinpool size.
Especially in setups where more bricks are present in a single volume (either distributed replicated or distributed-dispersed) there is a higher probability of lvm thinpool becoming full as more and more snapshots are taken. And it might start giving errors while taking the volume snapshots (via lvm snapshpots) much before the maximum limit of 256 snapshots.
Need to look more into this aspect on how to handle snapshots when there are many bricks managed by lvm thinpool in a node.
This is also true with scale by 1 discussed in #169 (if we choose to use the same brick to host more bricks).
One thing that I can think of as a short term work around (could be used even when change our decision WRT to how many thin pools for how many bricks per node etc) is:
- For every incoming snapshot create request, check the lvm thinpool consumption. And if the consumption is say 85% full or 90% full (could be made configurable as well), then throw out a warning saying lvm thinpool is becoming full and consider expanding it. We can provide a force option where the warning can be suppressed and snapshot can be taken if needed.
NOTE: This might stop snapshot from being taken even when the snapshot limit has not been reached. But I think it is more important to ensure that the lvm thinpool consumption (mainly due to snapshots) does not cause backend filesystem errors for the main brick, thus impacting the regular IO.
- Another additional thing that might be done (along with above step) is to have some notification mechanism from the underlying lvm layer to indicate glusterd about lvm thinpool becoming full. Not sure whether lvm layer or some underlying layer have this mechanism or not. If so, we can think of how this can be used.
Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.
Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it.