Bug 427298 - automatically extend nearly-full snapshots through dmeventd
automatically extend nearly-full snapshots through dmeventd
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: lvm2 (Show other bugs)
5.2
All Linux
medium Severity low
: rc
: ---
Assigned To: Petr Rockai
Corey Marthaler
:
: 204998 463405 (view as bug list)
Depends On: 427360
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-02 15:53 EST by Corey Marthaler
Modified: 2011-07-21 08:28 EDT (History)
9 users (show)

See Also:
Fixed In Version: lvm2-2.02.84-1
Doc Type: Bug Fix
Doc Text:
This field is the basis of the errata or release note for this bug. It can also be used for change logs. The Technical Note template, known as CCFR, is as follows: Cause A full snapshot cannot be used. Consequence When a snapshot becomes full, it can no longer be accessed. Fix Make it possible to set a policy of automatic snapshot extension, whenever remaining snapshot space drops below a threshold. Result Depending on policy set in lvm.conf, either the snapshot becomes invalidated as before, or it will be, free Volume Group space permitting, extended and continue to function.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-07-21 06:51:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Corey Marthaler 2008-01-02 15:53:14 EST
Description of problem:
This is a rhel5 version of bz 204973.


[root@hayes-03 ~]# lvs -a -o +devices
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Devices
  LogVol00 VolGroup00 -wi-ao 72.44G                               /dev/sda2(0)
  LogVol01 VolGroup00 -wi-ao  1.94G                               /dev/sda2(2318)
  origin   corey      owi-a- 10.00G                              
/dev/etherd/e1.1p1(0)
  snap1    corey      swi-a- 28.00M origin   0.06                
/dev/etherd/e1.1p2(0)

[root@hayes-03 ~]# dd if=/dev/zero of=/dev/corey/snap1
249417+0 records in
249417+0 records out
127701504 bytes (128 MB) copied, 7.92922 seconds, 16.1 MB/s

[root@hayes-03 ~]# lvs -a -o +devices
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Devices
  LogVol00 VolGroup00 -wi-ao 72.44G                               /dev/sda2(0)
  LogVol01 VolGroup00 -wi-ao  1.94G                               /dev/sda2(2318)
  origin   corey      owi-a- 10.00G                              
/dev/etherd/e1.1p1(0)
  snap1    corey      Swi-I- 28.00M origin 100.00                
/dev/etherd/e1.1p2(0)

[root@hayes-03 ~]# lvextend -L 52M /dev/corey/snap1
  Extending logical volume snap1 to 52.00 MB
  Logical volume snap1 successfully resized
[root@hayes-03 ~]# lvs -a -o +devices
  LV       VG         Attr   LSize  Origin Snap%  Move Log Copy%  Devices
  LogVol00 VolGroup00 -wi-ao 72.44G                               /dev/sda2(0)
  LogVol01 VolGroup00 -wi-ao  1.94G                               /dev/sda2(2318)
  origin   corey      owi-a- 10.00G                              
/dev/etherd/e1.1p1(0)
  snap1    corey      Swi-I- 52.00M origin 100.00                
/dev/etherd/e1.1p2(0)
[root@hayes-03 ~]# lvextend -L 100M /dev/corey/snap1
  Extending logical volume snap1 to 100.00 MB
  Logical volume snap1 successfully resized
[root@hayes-03 ~]# lvs -a -o +devices
  LV       VG         Attr   LSize   Origin Snap%  Move Log Copy%  Devices
  LogVol00 VolGroup00 -wi-ao  72.44G                               /dev/sda2(0)
  LogVol01 VolGroup00 -wi-ao   1.94G                               /dev/sda2(2318)
  origin   corey      owi-a-  10.00G                              
/dev/etherd/e1.1p1(0)
  snap1    corey      Swi-I- 100.00M origin 100.00                
/dev/etherd/e1.1p2(0)

Version-Release number of selected component (if applicable):
2.6.18-62.el5
device-mapper-1.02.20-1.el5
lvm2-2.02.26-3.el5
Comment 1 RHEL Product and Program Management 2008-01-02 16:04:52 EST
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 2 Petr Rockai 2008-01-11 03:44:56 EST
This is going to be addressed using dmeventd, through automatic allocation of 
extra space. Once a snapshot is invalidated, it may not be extended, so the 
behaviour above is correct in this respect (data has been already lost, so 
there is no point in using the snapshot anymore). More dmeventd snapshot work 
is slated for 5.3. 5.2 is only going to contain rudimentary monitoring 
capabilities and warnings through syslog that snapshot usage is approaching 
its size.
Comment 3 RHEL Product and Program Management 2008-06-02 16:25:34 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 4 Petr Rockai 2008-07-02 05:50:30 EDT
This is a somewhat complex problem, and so far not as high priority as 
hotspares for 5.3. A solution needs the dmeventd snapshot monitor to become 
more sophisticated and prevent the snapshot from becoming completely full. This 
also somewhat depends on hotspare allocation, as similar mechanisms should be 
used.
Comment 5 RHEL Product and Program Management 2008-10-27 14:20:46 EDT
This request was previously evaluated by Red Hat Product Management
for inclusion in the current Red Hat Enterprise Linux release, but
Red Hat was unable to resolve it in time.  This request will be
reviewed for a future Red Hat Enterprise Linux release.
Comment 6 Petr Rockai 2009-03-01 04:26:31 EST
*** Bug 204998 has been marked as a duplicate of this bug. ***
Comment 8 Petr Rockai 2010-05-19 10:27:10 EDT
*** Bug 463405 has been marked as a duplicate of this bug. ***
Comment 9 Petr Rockai 2010-10-13 10:03:02 EDT
Patch is pending upstream: https://www.redhat.com/archives/lvm-devel/2010-October/msg00012.html ; I am also bumping the priority on this to medium.
Comment 10 Petr Rockai 2010-10-15 12:29:44 EDT
Code checked in upstream.
Comment 14 RHEL Product and Program Management 2011-01-11 14:50:40 EST
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 15 RHEL Product and Program Management 2011-01-11 18:03:51 EST
This request was erroneously denied for the current release of
Red Hat Enterprise Linux.  The error has been fixed and this
request has been re-proposed for the current release.
Comment 17 Milan Broz 2011-03-01 10:58:13 EST
Fixed in lvm2-2.02.84-1.el5
Comment 19 Corey Marthaler 2011-05-09 18:01:30 EDT
Verified that the basic case here works. I twice filled up the snapshot above 50%, and both times it was auto extended.

2.6.18-256.el5

lvm2-2.02.84-2.el5    BUILT: Wed Mar 23 07:18:08 CDT 2011
lvm2-cluster-2.02.84-2.el5    BUILT: Wed Mar 23 07:19:43 CDT 2011
device-mapper-1.02.63-2.el5    BUILT: Fri Mar  4 10:23:17 CST 2011
device-mapper-event-1.02.63-2.el5    BUILT: Fri Mar  4 10:23:17 CST 2011
cmirror-1.1.39-10.el5    BUILT: Wed Sep  8 16:32:05 CDT 2010
kmod-cmirror-0.1.22-3.el5    BUILT: Tue Dec 22 13:39:47 CST 2009


    snapshot_autoextend_threshold = 50
    snapshot_autoextend_percent = 20

May  9 16:55:47 taft-01 lvm[13408]: Extending logical volume snap2 to 120.00 MB
May  9 16:55:47 taft-01 lvm[13408]: Monitoring snapshot taft-snap2
May  9 16:55:47 taft-01 lvm[13408]: Logical volume snap2 successfully resized
May  9 16:55:47 taft-01 lvm[13408]: Extension of snapshot taft/snap2 finished successfully.
May  9 16:55:49 taft-01 lvm[13408]: No longer monitoring snapshot taft-snap2


May  9 16:56:47 taft-01 lvm[13408]: Extending logical volume snap2 to 144.00 MB
May  9 16:56:47 taft-01 lvm[13408]: Monitoring snapshot taft-snap2
May  9 16:56:47 taft-01 lvm[13408]: Logical volume snap2 successfully resized
May  9 16:56:47 taft-01 lvm[13408]: Extension of snapshot taft/snap2 finished successfully.
May  9 16:56:49 taft-01 lvm[13408]: No longer monitoring snapshot taft-snap2
Comment 22 Florian Nadge 2011-05-26 10:54:27 EDT
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
This field is the basis of the errata or release note for this bug. It can also be used for change logs.

The Technical Note template, known as CCFR, is as follows:

Cause
    What actions or circumstances cause this bug to present.
Consequence
    What happens when the bug presents.
Fix
    What was done to fix the bug.
Result
    What now happens when the actions or circumstances above occur.
    Note: this is not the same as the bug doesn’t present anymore.
Comment 23 Petr Rockai 2011-05-30 04:13:50 EDT
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -3,11 +3,10 @@
 The Technical Note template, known as CCFR, is as follows:
 
 Cause
-    What actions or circumstances cause this bug to present.
+    A full snapshot cannot be used.
 Consequence
-    What happens when the bug presents.
+    When a snapshot becomes full, it can no longer be accessed.
 Fix
-    What was done to fix the bug.
+    Make it possible to set a policy of automatic snapshot extension, whenever remaining snapshot space drops below a threshold.
 Result
-    What now happens when the actions or circumstances above occur.
+    Depending on policy set in lvm.conf, either the snapshot becomes invalidated as before, or it will be, free Volume Group space permitting, extended and continue to function.-    Note: this is not the same as the bug doesn’t present anymore.
Comment 24 errata-xmlrpc 2011-07-21 06:51:30 EDT
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 therefore 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-2011-1071.html
Comment 25 errata-xmlrpc 2011-07-21 08:28:36 EDT
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 therefore 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-2011-1071.html

Note You need to log in before you can comment on or make changes to this bug.