<div dir="ltr"><div><div>Many thanks Zdenek ;)<br><br></div>This confirms our theory of what causes the problem for us.<br><br></div>Best regards Tomas<br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-03-16 13:13 GMT+01:00 Zdenek Kabelac <span dir="ltr"><<a href="mailto:zkabelac@redhat.com" target="_blank">zkabelac@redhat.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dne 15.3.2015 v 14:03 Tomas Dalebjork napsal(a):<div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
We have configured /etc/lvm/lvm.conf to extend our snapshot automatically.<br>
This works fine for slow growing volumes, but if the growth of the volume is<br>
faster, than LVM invalidate the snapshot rather than extend the snapshot volume.<br>
Because I think that the lvm-monitor does not grow the volume in time.<br>
<br>
This is the error we see in kernel log (dmesg)<br>
device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception.<br>
<br>
Our snapshot volume is 1GB<br>
Our extension is configured like this in /etc/lvm/lvm.conf<br>
<br>
     snapshot_autoextend_threshold = 50<br>
     snapshot_autoextend_percent = 20<br>
<br>
And we have restarted lvm2-monitor services after this changes using<br>
# service lvm2-monitor restart<br>
<br>
Other slow growing volumes works fine.<br>
<br>
Can someone hint us of what the issue can be, or how to mitigate this to happen?<br>
Or tell me how often the "lvm2-monitor" is checking the utilization threashold<br>
of the volumes?<br>
</blockquote>
<br>
<br></div></div>
It's a known issue - the advice is to switch to thin provisioning were there is no such problem.<br>
<br>
'dmeventd' is not fast enought for old snapshots.<br>
<br>
If you want to use old snaps - you need to have reserve for  10 x speed_of_your_drive.<br>
<br>
So i.e. if you want to be sure you will not get invalid snapshot and<br>
you could push  0.5G/s through your SSD - you simply need 5GB reserve.<br>
<br>
Back to your example - for 1GB origin you need to provide 100% size for snapshot otherwise you are in danger of getting invalid snapshot when you rapidly write to your origin.<br>
<br>
There is no other advice then to switch to thinly provisioned devices for such case.<br>
<br>
<br>
Regards<br>
<br>
Zdenek<br>
<br>
<br>
______________________________<u></u>_________________<br>
linux-lvm mailing list<br>
<a href="mailto:linux-lvm@redhat.com" target="_blank">linux-lvm@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/linux-lvm" target="_blank">https://www.redhat.com/<u></u>mailman/listinfo/linux-lvm</a><br>
read the LVM HOW-TO at <a href="http://tldp.org/HOWTO/LVM-HOWTO/" target="_blank">http://tldp.org/HOWTO/LVM-<u></u>HOWTO/</a><br>
</blockquote></div><br></div>