Bug 427360

Summary: request for "full snapshot" warnings
Product: Red Hat Enterprise Linux 5 Reporter: Milan Broz <mbroz>
Component: lvm2Assignee: Petr Rockai <prockai>
Status: CLOSED ERRATA QA Contact: Corey Marthaler <cmarthal>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.1CC: agk, ddomingo, dwysocha, heinzm, jbrassow, mbroz, prockai, pvrabec, rkenna, slevine
Target Milestone: rcKeywords: Documentation, FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2008-0378 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-05-21 15:39:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 391221, 427298, 446481    

Description Milan Broz 2008-01-03 14:12:25 UTC
+++ This bug was initially created as a clone of Bug #178979 +++
RHEL5 clone - monitoring for snapshots (snapshot dmeventd DSO)

Description of problem:
As a snapshot reaches a highwater mark it would be nice for the user if there
were warnings printed out to the console that the snapshot is becoming full and
that something needs to be done before access to your data is lost. 

...

-- Additional comment from prockai on 2007-12-10 09:19 EST --
Created an attachment (id=282811)
snapshot-dso.diff

Forward port of the snapshot DSO patch. Lightly tested, seems to work. Needs to
be cleaned up before inclusion.

Comment 3 Milan Broz 2008-01-18 00:23:27 UTC
In lvm2-2.02.30-1.el5.

Comment 5 Corey Marthaler 2008-03-31 15:55:38 UTC
I slowly filled up a snapshot volume from 0% - 100%, and not once did I see any
warning messages about my snap volume filling up until it was too late. This was
with the following code:

2.6.18-85.el5
lvm2-2.02.32-2.el5
device-mapper-1.02.24-1.el5

Comment 6 Corey Marthaler 2008-03-31 16:23:37 UTC
In order for this to work, one needs to turn on the snapshot_library in the
dmeventd section of the lvm.conf file. This fix has been verified in
lvm2-2.02.32-2.el5. 

Mar 31 11:19:41 hayes-03 lvm[5423]: Snapshot corey-snap is now 85% full.
Mar 31 11:20:01 hayes-03 lvm[5423]: Snapshot corey-snap is now 98% full.

This should be documented however since this is not turned on by default.

Comment 8 Don Domingo 2008-03-31 23:21:44 UTC
Is this a technology preview, or a fully-supported feature?

Comment 9 Corey Marthaler 2008-04-01 16:45:32 UTC
it's fully-supported.

Comment 10 Don Domingo 2008-04-02 02:11:40 UTC
Hi,
the RHEL5.2 release notes will be dropped to translation on April 15, 2008, at
which point no further additions or revisions will be entertained.

a mockup of the RHEL5.2 release notes can be viewed at the following link:
http://intranet.corp.redhat.com/ic/intranet/RHEL5u2relnotesmockup.html

please use the aforementioned link to verify if your bugzilla is already in the
release notes (if it needs to be). each item in the release notes contains a
link to its original bug; as such, you can search through the release notes by
bug number.

Cheers,
Don

Comment 11 Corey Marthaler 2008-04-02 15:12:59 UTC
Don,

There isn't anything that I saw in the RHEL5u2relnotesmockup.html refering to
this bz. Does comment #6 provide enough information for you to draft the
document or is there something else that you need from me?

-Corey

Comment 12 Don Domingo 2008-04-03 02:50:35 UTC
Corey,

that's because i sent out the bulk-message before i read your reply on
Comment#9. sorry for the confusion.

anyhow, just to clarify: in order for users to get warned before they get a
"full snapshot" error, do they add the following lines to /etc/lvm/lvm.conf?

dmeventd {
     snapshot_library = on


also, is "dmeventd {" commented out by default? (it is on my test machine)
please advise. thanks!

Comment 13 Corey Marthaler 2008-04-03 16:23:31 UTC
Don,

They don't have to add anything, all they need to do to 'turn it on' is just
uncomment the snapshot_library line in the lvm.conf file. So...

snapshot_library = "libdevmapper-event-lvm2snapshot.so"
instead of:
# snapshot_library = "libdevmapper-event-lvm2snapshot.so"

Also, I don't believe 'dmeventd {' is commented out by default, though I could
be wrong. Mine wasn't and I don't remember ever changing it. Here's what mine
looks like:

# Event daemon
#
dmeventd {
    # mirror_library is the library used when monitoring a mirror device.
    #
    # "libdevmapper-event-lvm2mirror.so" attempts to recover from
    # failures.  It removes failed devices from a volume group and
    # reconfigures a mirror as necessary. If no mirror library is
    # provided, mirrors are not monitored through dmeventd.

    # mirror_library = "libdevmapper-event-lvm2mirror.so"

    # 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
    # snapshot exceedes 80%. The warning is repeated when 85%, 90% and
    # 95% of the snapshot are filled.

    snapshot_library = "libdevmapper-event-lvm2snapshot.so"
}

Comment 14 Don Domingo 2008-04-04 02:52:57 UTC
thanks Corey, added to "Feature Updates" of RHEL5.2 release notes:

<quote>
lvm2 Snapshot Volume Warning

    lvm2 will now warn if a snapshot volume is near its maximum capacity.
However, this feature is not enabled by default.

    To enable this feature, uncomment the following line in /etc/lvm/lvm.conf:

snapshot_library = "libdevmapper-event-lvm2snapshot.so"

    Ensure that the dmeventd section and its delimiters ({ }) are also uncommented.
</quote>

please advise (before April 15) if any further revisions are required. thanks!


Comment 15 Corey Marthaler 2008-04-04 15:19:38 UTC
Don,

The write up looks good, thanks. Please send me a link to the rhel5u2 feature
updates mockup so that I can verify that it is also in there. Only a link to the
relnotes mockup was included in this bz and it doesn't sound like that's where
this is going anymore.

-Corey

Comment 16 Don Domingo 2008-04-08 03:40:38 UTC
Hi Corey,
the link's been updated now:
http://intranet.corp.redhat.com/ic/intranet/RHEL5u2relnotesmockup.html

Comment 17 Corey Marthaler 2008-04-08 17:02:40 UTC
Don,

Looks great. Marking this bz verified.

Comment 19 errata-xmlrpc 2008-05-21 15:39:46 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2008-0378.html