Linux LVM users
 help / color / mirror / Atom feed
* [linux-lvm] device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception.
@ 2015-03-15 13:03 Tomas Dalebjork
  2015-03-16 12:13 ` Zdenek Kabelac
  0 siblings, 1 reply; 3+ messages in thread
From: Tomas Dalebjork @ 2015-03-15 13:03 UTC (permalink / raw)
  To: linux-lvm; +Cc: Lars

[-- Attachment #1: Type: text/plain, Size: 933 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1366 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception.
  2015-03-15 13:03 [linux-lvm] device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception Tomas Dalebjork
@ 2015-03-16 12:13 ` Zdenek Kabelac
  2015-03-16 12:41   ` Tomas Dalebjork
  0 siblings, 1 reply; 3+ messages in thread
From: Zdenek Kabelac @ 2015-03-16 12:13 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Lars

Dne 15.3.2015 v 14:03 Tomas Dalebjork napsal(a):
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [linux-lvm] device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception.
  2015-03-16 12:13 ` Zdenek Kabelac
@ 2015-03-16 12:41   ` Tomas Dalebjork
  0 siblings, 0 replies; 3+ messages in thread
From: Tomas Dalebjork @ 2015-03-16 12:41 UTC (permalink / raw)
  To: LVM general discussion and development; +Cc: Lars

[-- Attachment #1: Type: text/plain, Size: 2138 bytes --]

Many thanks Zdenek ;)

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

Best regards Tomas

2015-03-16 13:13 GMT+01:00 Zdenek Kabelac <zkabelac@redhat.com>:

> Dne 15.3.2015 v 14:03 Tomas Dalebjork napsal(a):
>
>  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
>
>
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
>

[-- Attachment #2: Type: text/html, Size: 2990 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-03-16 12:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-15 13:03 [linux-lvm] device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception Tomas Dalebjork
2015-03-16 12:13 ` Zdenek Kabelac
2015-03-16 12:41   ` Tomas Dalebjork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox