Linux LVM users
 help / color / mirror / Atom feed
From: Zdenek Kabelac <zkabelac@redhat.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: Lars <lars.i.johansson@delecsys.se>
Subject: Re: [linux-lvm] device-mapper: snapshots: Invalidating snapshot: Unable to allocate exception.
Date: Mon, 16 Mar 2015 13:13:46 +0100	[thread overview]
Message-ID: <5506C8FA.6020601@redhat.com> (raw)
In-Reply-To: <CANvCAA9qEJQUFbFh6X6BVPO2uo2+ELQZp0Fi_wQr34JyvkaHOA@mail.gmail.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

  reply	other threads:[~2015-03-16 12:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2015-03-16 12:41   ` Tomas Dalebjork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5506C8FA.6020601@redhat.com \
    --to=zkabelac@redhat.com \
    --cc=lars.i.johansson@delecsys.se \
    --cc=linux-lvm@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox