linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Xen <list@xenhideout.nl>
To: linux-lvm@redhat.com
Subject: Re: [linux-lvm] Snapshot behavior on classic LVM vs ThinLVM
Date: Fri, 14 Apr 2017 19:36:33 +0200	[thread overview]
Message-ID: <88a2badd9b77546407bba31778c00699@xenhideout.nl> (raw)
In-Reply-To: <0658b33a7d4e5494de71231b7343a514@assyoma.it>

Gionatan Danti schreef op 14-04-2017 17:53:
> Il 14-04-2017 17:23 Xen ha scritto:
>> A thin snapshot won't be dropped. It is allocated with the same size
>> as the origin volume and hence can never fill up.
>> 
>> Only the pool itself can fill up but unless you have some monitoring
>> software in place that can intervene in case of anomaly and kill the
>> snapshot, your system will or may simply freeze and not drop anything.
>> 
> 
> Yeah, I understand that. In that sentence, I was speaking about
> classic LVM snapshot.
> 
> The dilemma is:
> - classic LVM snapshots have low performance (but adequate for backup
> purpose) and, if growing too much, snapshot activation can be
> problematic (especially on boot);
> - thin-snapshots have much better performance but does not always fail
> gracefully (ie: pool full).
> 
> For nightly backups, what you would pick between the two?
> Thanks.

Oh, I'm sorry, I couldn't understand your message in that way.

I have a not very busy hobby server of sorts creating a snapshot every 
day, mounting it and exporting it via NFS with some backup host that 
will pull from it if everything keeps working ;-).

When I created the thing I thought that 1GB snapshot space would be 
enough; there should not be many logs and everything worth something is 
sitting on other partitions; so this is only the root volume and the 
/var/log directory so to speak.

To my surprise regularly the update script emails me that when it 
removed the root snapshot, it was not mounted.

When I log on during the day the snapshot is already half filled. I do 
not know what causes this. I cannot find any logs or anything else that 
would warrant such behaviour. But the best part of it all, is that the 
system never suffers.

The thing is just dismounted apparently; I don't even know what causes 
it.

The other volumes are thin. I am just very afraid of the thing filling 
up due to some runaway process or an error on my part.

If I have a 30GB volume and a 30GB snapshot of that volume, and if this 
volume is nearly empty and something starts filling it up, it will do 
twice the writes to the thin pool. Any damage done is doubled.

The only thing that could save you (me) at this point is a process 
instantly responding to some 90% full message and hoping it'd be in 
time. Of course I don't have this monitoring in place; everything 
requires work.

This is someone having written a script for Nagios:

https://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_lvm/details

Then someone else did the same for NewRelic:

https://discuss.newrelic.com/t/lvm-thin-pool-monitoring/29295/17

My version of LVM indicates only the following:

     # snapshot_library is the library used when monitoring a snapshot 
device.
     #
     # "libdevmapper-event-lvm2snapshot.so" monitors the filling of
     # snapshots and emits a warning through syslog when the use of
     # the snapshot exceeds 80%. The warning is repeated when 85%, 90% 
and
     # 95% of the snapshot is filled.

     snapshot_library = "libdevmapper-event-lvm2snapshot.so"

     # thin_library is the library used when monitoring a thin device.
     #
     # "libdevmapper-event-lvm2thin.so" monitors the filling of
     # pool and emits a warning through syslog when the use of
     # the pool exceeds 80%. The warning is repeated when 85%, 90% and
     # 95% of the pool is filled.

     thin_library = "libdevmapper-event-lvm2thin.so"

I'm sorry, I was trying to discover how to use journalctl to check for 
the message and it is just incredibly painful.

  parent reply	other threads:[~2017-04-14 17:36 UTC|newest]

Thread overview: 94+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 14:31 [linux-lvm] Snapshot behavior on classic LVM vs ThinLVM Gionatan Danti
2017-04-07  8:19 ` Mark Mielke
2017-04-07  9:12   ` Gionatan Danti
2017-04-07 13:50     ` L A Walsh
2017-04-07 16:33       ` Gionatan Danti
2017-04-13 12:59         ` Stuart Gathman
2017-04-13 13:52           ` Xen
2017-04-13 14:33             ` Zdenek Kabelac
2017-04-13 14:47               ` Xen
2017-04-13 15:29               ` Stuart Gathman
2017-04-13 15:43                 ` Xen
2017-04-13 17:26                   ` Stuart D. Gathman
2017-04-13 17:32                   ` Stuart D. Gathman
2017-04-14 15:17                     ` Xen
2017-04-14  7:27               ` Gionatan Danti
2017-04-14  7:23           ` Gionatan Danti
2017-04-14 15:23             ` Xen
2017-04-14 15:53               ` Gionatan Danti
2017-04-14 16:08                 ` Stuart Gathman
2017-04-14 17:36                 ` Xen [this message]
2017-04-14 18:59                   ` Gionatan Danti
2017-04-14 19:20                     ` Xen
2017-04-15  8:27                       ` Xen
2017-04-15 23:35                         ` Xen
2017-04-17 12:33                         ` Xen
2017-04-15 21:22                     ` Xen
2017-04-15 21:49                       ` Xen
2017-04-15 21:48                     ` Xen
2017-04-18 10:17                       ` Zdenek Kabelac
2017-04-18 13:23                         ` Gionatan Danti
2017-04-18 14:32                           ` Stuart D. Gathman
2017-04-19  7:22                         ` Xen
2017-04-07 22:24     ` Mark Mielke
2017-04-08 11:56       ` Gionatan Danti
2017-04-07 18:21 ` Tomas Dalebjörk
2017-04-13 10:20 ` Gionatan Danti
2017-04-13 12:41   ` Xen
2017-04-14  7:20     ` Gionatan Danti
2017-04-14  8:24       ` Zdenek Kabelac
2017-04-14  9:07         ` Gionatan Danti
2017-04-14  9:37           ` Zdenek Kabelac
2017-04-14  9:55             ` Gionatan Danti
2017-04-22  7:14         ` Gionatan Danti
2017-04-22 16:32           ` Xen
2017-04-22 20:58             ` Gionatan Danti
2017-04-22 21:17             ` Zdenek Kabelac
2017-04-23  5:29               ` Xen
2017-04-23  9:26                 ` Zdenek Kabelac
2017-04-24 21:02                   ` Xen
2017-04-24 21:59                     ` Zdenek Kabelac
2017-04-26  7:26                       ` Gionatan Danti
2017-04-26  7:42                         ` Zdenek Kabelac
2017-04-26  8:10                           ` Gionatan Danti
2017-04-26 11:23                             ` Zdenek Kabelac
2017-04-26 13:37                               ` Gionatan Danti
2017-04-26 14:33                                 ` Zdenek Kabelac
2017-04-26 16:37                                   ` Gionatan Danti
2017-04-26 18:32                                     ` Stuart Gathman
2017-04-26 19:24                                     ` Stuart Gathman
2017-05-02 11:00                                     ` Gionatan Danti
2017-05-12 13:02                                       ` Gionatan Danti
2017-05-12 13:42                                         ` Joe Thornber
2017-05-14 20:39                                           ` Gionatan Danti
2017-05-15 12:50                                             ` Zdenek Kabelac
2017-05-15 14:48                                               ` Gionatan Danti
2017-05-15 15:33                                                 ` Zdenek Kabelac
2017-05-16  7:53                                                   ` Gionatan Danti
2017-05-16 10:54                                                     ` Zdenek Kabelac
2017-05-16 13:38                                                       ` Gionatan Danti
2018-02-27 18:39                       ` Xen
2018-02-28  9:26                         ` Zdenek Kabelac
2018-02-28 19:07                           ` Gionatan Danti
2018-02-28 21:43                             ` Zdenek Kabelac
2018-03-01  7:14                               ` Gionatan Danti
2018-03-01  8:31                                 ` Zdenek Kabelac
2018-03-01  9:43                                   ` Gianluca Cecchi
2018-03-01 11:10                                     ` Zdenek Kabelac
2018-03-01  9:52                                   ` Gionatan Danti
2018-03-01 11:23                                     ` Zdenek Kabelac
2018-03-01 12:48                                       ` Gionatan Danti
2018-03-01 16:00                                         ` Zdenek Kabelac
2018-03-01 16:26                                           ` Gionatan Danti
2018-03-03 18:32                               ` Xen
2018-03-04 20:34                                 ` Zdenek Kabelac
2018-03-03 18:17                             ` Xen
2018-03-04 20:53                               ` Zdenek Kabelac
2018-03-05  9:42                                 ` Gionatan Danti
2018-03-05 10:18                                   ` Zdenek Kabelac
2018-03-05 14:27                                     ` Gionatan Danti
2018-03-03 17:52                           ` Xen
2018-03-04 23:27                             ` Zdenek Kabelac
2017-04-22 21:22           ` Zdenek Kabelac
2017-04-24 13:49             ` Gionatan Danti
2017-04-24 14:48               ` Zdenek Kabelac

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=88a2badd9b77546407bba31778c00699@xenhideout.nl \
    --to=list@xenhideout.nl \
    --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;
as well as URLs for NNTP newsgroup(s).