[linux-lvm] How to monitor and possibly autoextend snapshots
Marcin Kałuża
marcin.kaluza at comarch.pl
Wed Oct 29 14:26:10 UTC 2008
After initial testing I can say that it Works :) at least with
2.6.18-92.1.13.el5.centos.plus x86_64
minor variation is that I needed to use
dmsetup wait <device> event_nr
because every time the message was signaled,
the counter increases and the default for event_nr is 0, not current.
Where can I read something about those events and messages? (Apart from the
source code itself of course ;) I like the way it works, but I'd like to
know how and why - mainly to know when it can fail ;)
My main concern is what could interfere with this mechanism? Are there any
kinds of events and how can I know that this event that occurred is the one
I'm waiting for.
I googled for it, by found no useful info...
Is there a way to put it into mainstream lvm at some time (because now I'll
have to maintain my custom build kernels...)?
Are there any chances to implement snapshot autoextension mechanism, so it
doesn't require external programs?
Thanks for help
Martin
-----Original Message-----
From: linux-lvm-bounces at redhat.com [mailto:linux-lvm-bounces at redhat.com] On
Behalf Of Jonathan Brassow
Sent: Tuesday, October 28, 2008 9:51 PM
To: LVM general discussion and development
Subject: Re: [linux-lvm] How to monitor and possibly autoextend snapshots
On Oct 27, 2008, at 7:17 AM, Marcin Kałuża wrote:
> Hi,
> Well, that's not much of help since after it becomes invalid I'll
> know it
> anyway (IO error ;D), so the event is purely informational.
Well, I've thrown together a quick patch that should give you what you
want. (I have not compiled/tested it.) We'd have to give it more
thought for it to become a permanent feature (or get integrated into
LVM), but it should be a nice little hack. If you turn out to like
the idea, maybe more discussion will evolve.
You'll have to compile your own kernel with the patch applied, but
once you've done so, you should be able to do the following:
# Get snapshot to raise an event when 75% full
prompt> dmsetup message <snapshot device> 0 notify 75
prompt> dmsetup wait <snapshot device>
# Ok, now we are 75% full - let me know when 95% full
prompt> dmsetup message <snapshot device> 0 notify 95
prompt> dmsetup wait <snapshot device>
brassow
More information about the linux-lvm
mailing list