<html><body><div style="font-family: lucida console,sans-serif; font-size: 12pt; color: #000000"><div><br></div><div>No issue with this behaviour - makes sense.<br></div><div><br></div><div>However, the point I made about snapdelete being invoked when thinpool free space is threatened is a very real issue once you start using snaps. for 3.6 basing snap management on snapshot versions is fine, but I do think this needs to be extended to account for the thinpool freespace too in a subsequent release.<br></div><div><br></div><div>Maybe you already have it in plan?<br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Rahul Hinduja" &lt;rhinduja@redhat.com&gt;<br><b>To: </b>"Avra Sengupta" &lt;asengupt@redhat.com&gt;<br><b>Cc: </b>"Seema Naik" &lt;senaik@redhat.com&gt;, "gluster-devel" &lt;gluster-devel@nongnu.org&gt;<br><b>Sent: </b>Tuesday, 15 April, 2014 11:35:19 PM<br><b>Subject: </b>Re: [Gluster-devel] autodelete in snapshots<br><div><br></div><br><div><br></div>----- Original Message -----<br>&gt; From: "Avra Sengupta" &lt;asengupt@redhat.com&gt;<br>&gt; To: "Lalatendu Mohanty" &lt;lmohanty@redhat.com&gt;, "Raghavendra Bhat" &lt;rabhat@redhat.com&gt;, "gluster-devel"<br>&gt; &lt;gluster-devel@nongnu.org&gt;, "Rahul Hinduja" &lt;rhinduja@redhat.com&gt;, "Seema Naik" &lt;senaik@redhat.com&gt;<br>&gt; Sent: Wednesday, April 16, 2014 11:39:11 AM<br>&gt; Subject: Re: [Gluster-devel] autodelete in snapshots<br>&gt; <br>&gt; The whole purpose of introducing the soft-limit is, that at any point of time<br>&gt; the number of<br>&gt; snaps should not exceed the hard limit. If we trigger auto-delete on hitting<br>&gt; hard-limit, then<br>&gt; the purpose itself is lost, because at that point we would be taking a snap,<br>&gt; making the limit<br>&gt; hard-limit + 1, and then triggering auto-delete, which violates the sanctity<br>&gt; of the hard-limit.<br>&gt; Also what happens when we are at hard-limit + 1, and another snap is issued,<br>&gt; while auto-delete<br>&gt; is yet to process the first delete. At that point we end up at hard-limit +<br>&gt; 1. Also what happens<br>&gt; if for a particular snap the auto-delete fails.<br>&gt; <br>&gt; We should see the hard-limit, as something set by the admin keeping in mind<br>&gt; the resource consumption<br>&gt; and at no-point should we cross this limit, come what may. If we hit this<br>&gt; limit, the create command<br>&gt; should fail asking the user to delete snaps using the "snapshot delete"<br>&gt; command.<br>&gt; <br>&gt; The two options Raghavendra mentioned are applicable for the soft-limit only,<br>&gt; in which cases on<br>&gt; hitting the soft-limit<br>&gt; <br>&gt; 1. Trigger auto-delete<br>&gt; <br>&gt; or<br>&gt; <br>&gt; 2. Log a warning-message, for the user saying the number of snaps is<br>&gt; exceeding the snap-limit and<br>&gt; display the number of available snaps<br>&gt; <br>&gt; Now which of these should happen also depends on the user, because the<br>&gt; auto-delete option<br>&gt; is configurable.<br>&gt; <br>&gt; So if the auto-delete option is set as true, auto-delete should be triggered<br>&gt; and the above message<br>&gt; should also be logged.<br>&gt; <br>&gt; But if the option is set as false, only the message should be logged.<br>&gt; <br>&gt; This is the behaviour as designed. Adding Rahul, and Seema in the mail, to<br>&gt; reflect upon the<br>&gt; behaviour as well.<br><div><br></div>Agreed with Avra, the purpose of introducing soft limits and hard limits was to restrict snap creation to reach limit+1 at any point in time. Any time the limit reaches the hard limit the subsequent creation should fail. Once the limit reaches the soft limit the auto-delete starts in background. Since soft-limit is configurable option between 1-100, it really gives flexibility to the user to start the auto-deletion based on his requirement it can be at 1% or even 100% soft-limit.<br><div><br></div>If the auto-delete option is set to true than it should be triggered and should log message based on user's input of soft-limit and if it is set to false the auto-delete should only log message and snap creation fails when it reaches the hard-limit.<br><div><br></div>Thanks,<br>Rahul<br><div><br></div>&gt; <br>&gt; Regards,<br>&gt; Avra<br>&gt; <br>&gt; On 04/15/2014 07:18 PM, Lalatendu Mohanty wrote:<br>&gt; <br>&gt; &gt; On 04/15/2014 07:05 PM, Raghavendra Bhat wrote:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Hi,<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; As of now, in snapshots there are 2 limits for the number of<br>&gt; &gt;&gt; snapshots, hard-limit and soft-limit. Usually soft-limit is 90% of<br>&gt; &gt;&gt; hard-limit by default (it can be changed also). Say the hard-limit is<br>&gt; &gt;&gt; 50, then soft-limit by default will be 45. We are planning to do<br>&gt; &gt;&gt; autodelete of the oldest snapshot upon reaching the limit.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; There are 2 options:<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; 1) Start doing autodelete upon reaching the soft-limit. i.e If the<br>&gt; &gt;&gt; hard limit is 50 and the &nbsp;number of the snapshots taken becomes 45,<br>&gt; &gt;&gt; then for the next snapshot taken (i.e 46th snapshot), the oldest<br>&gt; &gt;&gt; snapshot will be automatically deleted in the background.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; 2) Use soft-limit as a means to notify the admin about limit being<br>&gt; &gt;&gt; reached (gf_log, syslog etc, or also a warning message shown for<br>&gt; &gt;&gt; every snapshot taken after the soft limit is reached) and start doing<br>&gt; &gt;&gt; autodelete after reaching the hard-limit i.e once 50 snapshots are<br>&gt; &gt;&gt; reached, then when 51st snapshot is triggered, the oldest snapshot<br>&gt; &gt;&gt; will be deleted in the background.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Please provide feedback.<br>&gt; &gt;<br>&gt; &gt; I like the #2 option. If user has set something as hard-limit, it<br>&gt; &gt; should be treated as hard limit and soft-limit can be used as warning<br>&gt; &gt; mechanism.<br>&gt; &gt;<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; NOTE: The auto-delete can be made configurable, which if turned off,<br>&gt; &gt;&gt; snapshot create fails upon reaching the limit.<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; Regards,<br>&gt; &gt;&gt; Raghavendra Bhat<br>&gt; &gt;&gt;<br>&gt; &gt;&gt; _______________________________________________<br>&gt; &gt;&gt; Gluster-devel mailing list<br>&gt; &gt;&gt; Gluster-devel@nongnu.org<br>&gt; &gt;&gt; https://lists.nongnu.org/mailman/listinfo/gluster-devel<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; _______________________________________________<br>&gt; &gt; Gluster-devel mailing list<br>&gt; &gt; Gluster-devel@nongnu.org<br>&gt; &gt; https://lists.nongnu.org/mailman/listinfo/gluster-devel<br>&gt; <br>&gt; <br><div><br></div>_______________________________________________<br>Gluster-devel mailing list<br>Gluster-devel@nongnu.org<br>https://lists.nongnu.org/mailman/listinfo/gluster-devel<br></blockquote><div><br></div></div></body></html>