Discussion:
[linux-lvm] device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception.
Tomas Dalebjork
2015-03-15 13:03:09 UTC
Permalink
Hi,

We have configured /etc/lvm/lvm.conf to extend our snapshot automatically.
This works fine for slow growing volumes, but if the growth of the volume
is faster, than LVM invalidate the snapshot rather than extend the snapshot
volume.
Because I think that the lvm-monitor does not grow the volume in time.

This is the error we see in kernel log (dmesg)
device-mapper: snapshots: Invalidating snapshot: Unable to allocate
exception.

Our snapshot volume is 1GB
Our extension is configured like this in /etc/lvm/lvm.conf

snapshot_autoextend_threshold = 50
snapshot_autoextend_percent = 20

And we have restarted lvm2-monitor services after this changes using
# service lvm2-monitor restart

Other slow growing volumes works fine.

Can someone hint us of what the issue can be, or how to mitigate this to
happen?
Or tell me how often the "lvm2-monitor" is checking the utilization
threashold of the volumes?

Regards Tomas
Zdenek Kabelac
2015-03-16 12:13:46 UTC
Permalink
Post by Tomas Dalebjork
Hi,
We have configured /etc/lvm/lvm.conf to extend our snapshot automatically.
This works fine for slow growing volumes, but if the growth of the volume is
faster, than LVM invalidate the snapshot rather than extend the snapshot volume.
Because I think that the lvm-monitor does not grow the volume in time.
This is the error we see in kernel log (dmesg)
device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception.
Our snapshot volume is 1GB
Our extension is configured like this in /etc/lvm/lvm.conf
snapshot_autoextend_threshold = 50
snapshot_autoextend_percent = 20
And we have restarted lvm2-monitor services after this changes using
# service lvm2-monitor restart
Other slow growing volumes works fine.
Can someone hint us of what the issue can be, or how to mitigate this to happen?
Or tell me how often the "lvm2-monitor" is checking the utilization threashold
of the volumes?
It's a known issue - the advice is to switch to thin provisioning were there
is no such problem.

'dmeventd' is not fast enought for old snapshots.

If you want to use old snaps - you need to have reserve for 10 x
speed_of_your_drive.

So i.e. if you want to be sure you will not get invalid snapshot and
you could push 0.5G/s through your SSD - you simply need 5GB reserve.

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.

There is no other advice then to switch to thinly provisioned devices for such
case.


Regards

Zdenek
Tomas Dalebjork
2015-03-16 12:41:12 UTC
Permalink
Many thanks Zdenek ;)

This confirms our theory of what causes the problem for us.

Best regards Tomas
Post by Zdenek Kabelac
Hi,
Post by Tomas Dalebjork
We have configured /etc/lvm/lvm.conf to extend our snapshot automatically.
This works fine for slow growing volumes, but if the growth of the volume is
faster, than LVM invalidate the snapshot rather than extend the snapshot volume.
Because I think that the lvm-monitor does not grow the volume in time.
This is the error we see in kernel log (dmesg)
device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception.
Our snapshot volume is 1GB
Our extension is configured like this in /etc/lvm/lvm.conf
snapshot_autoextend_threshold = 50
snapshot_autoextend_percent = 20
And we have restarted lvm2-monitor services after this changes using
# service lvm2-monitor restart
Other slow growing volumes works fine.
Can someone hint us of what the issue can be, or how to mitigate this to happen?
Or tell me how often the "lvm2-monitor" is checking the utilization threashold
of the volumes?
It's a known issue - the advice is to switch to thin provisioning were
there is no such problem.
'dmeventd' is not fast enought for old snapshots.
If you want to use old snaps - you need to have reserve for 10 x
speed_of_your_drive.
So i.e. if you want to be sure you will not get invalid snapshot and
you could push 0.5G/s through your SSD - you simply need 5GB reserve.
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.
There is no other advice then to switch to thinly provisioned devices for
such case.
Regards
Zdenek
_______________________________________________
linux-lvm mailing list
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
Loading...