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
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.
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.
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.
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.
*** Bug 204998 has been marked as a duplicate of this bug. ***
*** Bug 463405 has been marked as a duplicate of this bug. ***
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.
Code checked in upstream.
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.
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.
Fixed in lvm2-2.02.84-1.el5
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
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.
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.
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