dmevent plugin
Hello,
As per my understanding lvm2 does not support other applications to register with dmevent daemon to handle events generated in interested devices. Function monitor_dev_for_events() in lib/activate/activate.c registers with the default events library (if its available).
When a dm-thinpool is created from SAN[1] and typically multiple hosts have visibility to the same dm-thinpool. In this case there are chances that more than one dm-eventd thin plugin will be registered to monitor it. When dm-thinpool reaches low water mark threshold, these plugins try to resize the thin-pool causing simultaneous block allocate requests and dm-thin-pool module may not be capable to handle this situation.
There could be specific applications using this dm-thinpool in a SAN environment and wanting to handle the dm-thinpool specific events by themselves.
By using GlusterFS and BD xlator[2] we are planning to use dm-thinpool to provide thin provisioned storage for hosting the VM images. This pool could come from a SAN box but there will be a 1:1 mapping between Glusterfs server and dm-thinpool. It provides controlled clustered access to dm-thinpool when various Glusterfs clients access the same dm-thinpool through single GlusterFS server. The idea is to extend the dm-thinpool(when low water mark threshold reached) from respective GlusterFS server so that there is only one entity controlling that dm-thinpool in a clustered environment.
Is there any way to avoid this default registration? So that only specific applicationcode can register itself with interested dm-thinpool and take the necessary action when low watermark threshold is reached?
[1] Basic SAN without supporting thin provisioning
[2] http://review.gluster.com/#/c/4714/
Dne 23.4.2013 20:30, M. Mohan Kumar napsal(a):
Quoted 4 lines
Hello,
As per my understanding lvm2 does not support other applications to register with dmevent daemon to handle events generated in interested
there was at least one non-lvm plugin from dmraid project.
dmeventd test is based on 'dmsetup status' - and the plugin is executing lvm code only in case something triggers this action (i.e. fill over threshold) - but since lvm library is not threadsafe - only one plugin could execute lvm code within mutex.
Quoted 9 lines
devices. Function
monitor_dev_for_events()inlib/activate/activate.cregisters with the default events library (if its available).When a dm-thinpool is created from SAN[1] and typically multiple hosts have visibility to the same dm-thinpool. In this case there are chances that more than one dm-eventd thin plugin will be registered to monitor it. When dm-thinpool reaches low water mark threshold, these plugins try to resize the thin-pool causing simultaneous block allocate requests and dm-thin-pool module may not be capable to handle this situation.
dmeventd plugin for lvm thin pool is essentially calling command:
'lvextend --usepolicies'
when dmsetup status is report values above threashold.
Quoted 3 lines
There could be specific applications using this dm-thinpool in a SAN environment and wanting to handle the dm-thinpool specific events by themselves.
Code from thin plugin might be easily duplicated and modified.
But since you are repeatedly mentioning dm-thinpool - it seems like you do not plan to lvm2 thin support here and you want to create thin pool natively via dmsetup commands ?
Quoted 9 lines
By using GlusterFS and BD xlator[2] we are planning to use dm-thinpool to provide thin provisioned storage for hosting the VM images. This pool could come from a SAN box but there will be a 1:1 mapping between Glusterfs server and dm-thinpool. It provides controlled clustered access to dm-thinpool when various Glusterfs clients access the same dm-thinpool through single GlusterFS server. The idea is to extend the dm-thinpool(when low water mark threshold reached) from respective GlusterFS server so that there is only one entity controlling that dm-thinpool in a clustered environment.
There is work-in-progress for clustered usage of thin pools.
Quoted 1 line
Is there any way to avoid this default registration? So that only
All LVs have monitoring feature so you could always disable monitoring for particular LV - is that what you mean ?
Quoted 11 lines
specific applicationcode can register itself with interested dm-thinpool and take the necessary action when low watermark threshold is reached?
[1] Basic SAN without supporting thin provisioning
[2] http://review.gluster.com/#/c/4714/--
lvm-devel mailing list
lvm-devel at redhat.com
https://www.redhat.com/mailman/listinfo/lvm-devel
Zdenek
Quoted 3 lines · Zdenek Kabelac
Dne 23.4.2013 20:30, M. Mohan Kumar napsal(a):
Quoted 2 lines
Hello,
Zdenek, thanks for the response.
Quoted 10 lines
Quoted 2 lines
As per my understanding lvm2 does not support other applications to register with dmevent daemon to handle events generated in interested
there was at least one non-lvm plugin from dmraid project.
dmeventd test is based on 'dmsetup status' - and the plugin is executing lvm code only in case something triggers this action (i.e. fill over threshold) - but since lvm library is not threadsafe - only one plugin could execute lvm code within mutex.
Yes, the plugins execute interested commands/actions only when a specific event is generated, in thin pool case when it reaches the threshold.
Quoted 11 lines
Quoted 10 lines
devices. Function
monitor_dev_for_events()inlib/activate/activate.cregisters with the default events library (if its available).When a dm-thinpool is created from SAN[1] and typically multiple hosts have visibility to the same dm-thinpool. In this case there are chances that more than one dm-eventd thin plugin will be registered to monitor it. When dm-thinpool reaches low water mark threshold, these plugins try to resize the thin-pool causing simultaneous block allocate requests and dm-thin-pool module may not be capable to handle this situation.
Quoted 6 lines
dmeventd plugin for lvm thin pool is essentially calling command:
'lvextend --usepolicies'
when dmsetup status is report values above threashold.
When I last checked 'lvextend' did not have --usepolicy option enabled. Only lvconvert has this option, so even with thin plugin the pool is not resized when it reached threshold. I have to patch thin plugin to run lvresize command to increase the pool size and it worked.
Quoted 11 lines
Quoted 4 lines
There could be specific applications using this dm-thinpool in a SAN environment and wanting to handle the dm-thinpool specific events by themselves.
Code from thin plugin might be easily duplicated and modified.
But since you are repeatedly mentioning dm-thinpool - it seems like you do not plan to lvm2 thin support here and you want to create thin pool natively via dmsetup commands ?
No, lvcreate will be used to create a thin pool.
Quoted 10 lines
Quoted 9 lines
By using GlusterFS and BD xlator[2] we are planning to use dm-thinpool to provide thin provisioned storage for hosting the VM images. This pool could come from a SAN box but there will be a 1:1 mapping between Glusterfs server and dm-thinpool. It provides controlled clustered access to dm-thinpool when various Glusterfs clients access the same dm-thinpool through single GlusterFS server. The idea is to extend the dm-thinpool(when low water mark threshold reached) from respective GlusterFS server so that there is only one entity controlling that dm-thinpool in a clustered environment.
Quoted 2 lines
There is work-in-progress for clustered usage of thin pools.
Could you give some pointers to this work, like whats the current status, target date et?
Quoted 5 lines
Quoted 1 line
Is there any way to avoid this default registration? So that only
All LVs have monitoring feature so you could always disable monitoring for particular LV - is that what you mean ?
Yeah, as a prerequisite we can ask users to disable monitoring interested thin pool. But user has to do that in all nodes that are connected to SAN, so I expected unless explicitly asked this default registration should not happen.
Quoted 13 lines
Quoted 11 lines
specific applicationcode can register itself with interested dm-thinpool and take the necessary action when low watermark threshold is reached?
[1] Basic SAN without supporting thin provisioning
[2] http://review.gluster.com/#/c/4714/--
lvm-devel mailing list
lvm-devel at redhat.com
https://www.redhat.com/mailman/listinfo/lvm-develZdenek
Dne 24.4.2013 04:28, M. Mohan Kumar napsal(a):
Quoted 12 lines
Quoted 3 lines · Zdenek Kabelac
Dne 23.4.2013 20:30, M. Mohan Kumar napsal(a):
Quoted 2 lines
Hello,
Zdenek, thanks for the response.
Quoted 5 lines
Quoted 2 lines
As per my understanding lvm2 does not support other applications to register with dmevent daemon to handle events generated in interested
there was at least one non-lvm plugin from dmraid project.
Quoted 8 lines
Quoted 5 lines
dmeventd test is based on 'dmsetup status' - and the plugin is executing lvm code only in case something triggers this action (i.e. fill over threshold) - but since lvm library is not threadsafe - only one plugin could execute lvm code within mutex.
Yes, the plugins execute interested commands/actions only when a specific event is generated, in thin pool case when it reaches the threshold.
So if you need to execute different code - you may just duplicate the code, and replace the executable action with different code.
Currently the executed code in the plugin is not configurable.
On the other hand - you may write your own watching daemon - just by polling and reading dmsetup status info even in a shell script.
Dmeventd is doing more things - but the main part is to be usable on /root volumes - but since this is not your case, you may write easily your own code to watching for pool limits.
Quoted 12 lines
Quoted 12 lines
Quoted 9 lines
devices. Function
monitor_dev_for_events()inlib/activate/activate.cregisters with the default events library (if its available).When a dm-thinpool is created from SAN[1] and typically multiple hosts have visibility to the same dm-thinpool. In this case there are chances that more than one dm-eventd thin plugin will be registered to monitor it. When dm-thinpool reaches low water mark threshold, these plugins try to resize the thin-pool causing simultaneous block allocate requests and dm-thin-pool module may not be capable to handle this situation.
dmeventd plugin for lvm thin pool is essentially calling command:
Quoted 8 lines
Quoted 4 lines
'lvextend --usepolicies'
when dmsetup status is report values above threashold.
When I last checked 'lvextend' did not have --usepolicy option enabled. Only lvconvert has this option, so even with thin plugin the pool is not resized when it reached threshold. I have to patch thin plugin to run lvresize command to increase the pool size and it worked.
yep - missing in man page, but it's there for quite long time.
Quoted 11 lines
Quoted 11 lines
Quoted 10 lines
By using GlusterFS and BD xlator[2] we are planning to use dm-thinpool to provide thin provisioned storage for hosting the VM images. This pool could come from a SAN box but there will be a 1:1 mapping between Glusterfs server and dm-thinpool. It provides controlled clustered access to dm-thinpool when various Glusterfs clients access the same dm-thinpool through single GlusterFS server. The idea is to extend the dm-thinpool(when low water mark threshold reached) from respective GlusterFS server so that there is only one entity controlling that dm-thinpool in a clustered environment.
Quoted 4 lines
Quoted 2 lines
There is work-in-progress for clustered usage of thin pools.
Could you give some pointers to this work, like whats the current status, target date et?
I'd estimate half year for some initial release. But currently there are only some basic ideas for implementation of the proof-of-concept.
But it's hard to say whether it would be usable for anything mentioned here.
Quoted 7 lines
Quoted 3 lines
All LVs have monitoring feature so you could always disable monitoring for particular LV - is that what you mean ?
Yeah, as a prerequisite we can ask users to disable monitoring interested thin pool. But user has to do that in all nodes that are connected to SAN, so I expected unless explicitly asked this default registration should not happen.
You can easily disable monitoring on all nodes in lvm.conf
Zdenek