[linux-lvm] How to monitor and possibly autoextend snapshots

Jonathan Brassow jbrassow at redhat.com
Tue Oct 28 20:50:34 UTC 2008

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>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: snap.patch
Type: application/octet-stream
Size: 2320 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20081028/da37f8f1/attachment.obj>
-------------- next part --------------

More information about the linux-lvm mailing list