<?xml version="1.0" encoding="UTF-8"?><rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
> <channel><title>Comments on: Consistent backup with Linux Logical Volume Manager (LVM) snapshots</title> <atom:link href="http://www.cyberciti.biz/tips/consistent-backup-linux-logical-volume-manager-snapshots.html/feed" rel="self" type="application/rss+xml" /><link>http://www.cyberciti.biz/tips/consistent-backup-linux-logical-volume-manager-snapshots.html</link> <description>This is a Linux sys admin journal by Vivek about sys admin work, Linux tips &#38; tricks, hacks, news and more.</description> <lastBuildDate>Fri, 10 Feb 2012 20:37:43 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: Kaicheng Zhang</title><link>http://www.cyberciti.biz/tips/consistent-backup-linux-logical-volume-manager-snapshots.html#comment-158787</link> <dc:creator>Kaicheng Zhang</dc:creator> <pubDate>Tue, 10 Aug 2010 09:42:02 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/consistent-backup-with-linux-logical-volume-manager-lvm-snapshots.html#comment-158787</guid> <description>The article helps me a lot.
But I think the
lvremove /dev/ops/databases
should be
lvremove /dev/ops/dbbackup
since we need to cleanup the snapshot and let the origin volume still work.</description> <content:encoded><![CDATA[<p>The article helps me a lot.<br
/> But I think the<br
/> lvremove /dev/ops/databases<br
/> should be<br
/> lvremove /dev/ops/dbbackup<br
/> since we need to cleanup the snapshot and let the origin volume still work.</p> ]]></content:encoded> </item> <item><title>By: Mike</title><link>http://www.cyberciti.biz/tips/consistent-backup-linux-logical-volume-manager-snapshots.html#comment-157391</link> <dc:creator>Mike</dc:creator> <pubDate>Tue, 06 Jul 2010 22:53:39 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/consistent-backup-with-linux-logical-volume-manager-lvm-snapshots.html#comment-157391</guid> <description>Hi, did not read all the comments, but I did find an error.
You can not &quot;quit;&quot; after doing the &quot;flush tables with read lock;&quot; The second you quit &quot;unlock_tables&quot; is called and thus not holding the lock while you make the lvm snapshot.
That is all.</description> <content:encoded><![CDATA[<p>Hi, did not read all the comments, but I did find an error.</p><p>You can not &#8220;quit;&#8221; after doing the &#8220;flush tables with read lock;&#8221; The second you quit &#8220;unlock_tables&#8221; is called and thus not holding the lock while you make the lvm snapshot.</p><p>That is all.</p> ]]></content:encoded> </item> <item><title>By: Chris</title><link>http://www.cyberciti.biz/tips/consistent-backup-linux-logical-volume-manager-snapshots.html#comment-153441</link> <dc:creator>Chris</dc:creator> <pubDate>Wed, 10 Feb 2010 06:03:50 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/consistent-backup-with-linux-logical-volume-manager-lvm-snapshots.html#comment-153441</guid> <description>The steps in this article won&#039;t lock your tables.  The example shows you locking the tables and then quitting the mysql utility.  I&#039;m not sure if this used to work differently (I doubt it), but in MySQL 5, quitting the mysql utility drops the connection and unlocks the tables.  This is easy to test for yourself by trying to write to them.
Instead, you can get a correct snapshot like this:
mysql&gt; FLUSH TABLES WITH READ LOCK;
mysql&gt; system lvcreate --snapshot –-size=1000M --name=backup /dev/vg01/mysql;
mysql&gt; UNLOCK TABLES;
mysql&gt; quit
Also, the official documentation (http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html) doesn&#039;t mention any need for the FLUSH LOGS statement before taking your snapshot.  Searching around the net I am finding some people saying to use it and others not, and nobody explains their reasoning...</description> <content:encoded><![CDATA[<p>The steps in this article won&#8217;t lock your tables.  The example shows you locking the tables and then quitting the mysql utility.  I&#8217;m not sure if this used to work differently (I doubt it), but in MySQL 5, quitting the mysql utility drops the connection and unlocks the tables.  This is easy to test for yourself by trying to write to them.<br
/> Instead, you can get a correct snapshot like this:<br
/> mysql&gt; FLUSH TABLES WITH READ LOCK;<br
/> mysql&gt; system lvcreate &#8211;snapshot –-size=1000M &#8211;name=backup /dev/vg01/mysql;<br
/> mysql&gt; UNLOCK TABLES;<br
/> mysql&gt; quit</p><p>Also, the official documentation (<a
href="http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html" rel="nofollow">http://dev.mysql.com/doc/refman/5.1/en/backup-methods.html</a>) doesn&#8217;t mention any need for the FLUSH LOGS statement before taking your snapshot.  Searching around the net I am finding some people saying to use it and others not, and nobody explains their reasoning&#8230;</p> ]]></content:encoded> </item> <item><title>By: Brad</title><link>http://www.cyberciti.biz/tips/consistent-backup-linux-logical-volume-manager-snapshots.html#comment-143449</link> <dc:creator>Brad</dc:creator> <pubDate>Sun, 13 Apr 2008 08:05:19 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/consistent-backup-with-linux-logical-volume-manager-lvm-snapshots.html#comment-143449</guid> <description>I realize this is a very old post and so it&#039;s possible my comment will never be seen... but I figure it&#039;s worth a try.
I am using this technique to back up a mysql database that is currently relatively small 1.5gb on disk. Everything is working great... except once I have the snapshot mounted, and I try to do something like TAR the results for a backup... the tar is taking about 25 minutes the FIRST TIME... immediately after the snapshot was created. Any subsequent attempts to TAR will happen in about 45seconds.
Is this expected behavior? I am guesing it has something to do with how the snapshot is actually filling in the disk image on the first read... or something, and so the TAR is actually causing a create.
I&#039;ve tried mounting read only to see if that speeds things up... but it doesn&#039;t seem to.
Thoughts?</description> <content:encoded><![CDATA[<p>I realize this is a very old post and so it&#8217;s possible my comment will never be seen&#8230; but I figure it&#8217;s worth a try.</p><p>I am using this technique to back up a mysql database that is currently relatively small 1.5gb on disk. Everything is working great&#8230; except once I have the snapshot mounted, and I try to do something like TAR the results for a backup&#8230; the tar is taking about 25 minutes the FIRST TIME&#8230; immediately after the snapshot was created. Any subsequent attempts to TAR will happen in about 45seconds.</p><p>Is this expected behavior? I am guesing it has something to do with how the snapshot is actually filling in the disk image on the first read&#8230; or something, and so the TAR is actually causing a create.</p><p>I&#8217;ve tried mounting read only to see if that speeds things up&#8230; but it doesn&#8217;t seem to.</p><p>Thoughts?</p> ]]></content:encoded> </item> <item><title>By: Thomas</title><link>http://www.cyberciti.biz/tips/consistent-backup-linux-logical-volume-manager-snapshots.html#comment-142345</link> <dc:creator>Thomas</dc:creator> <pubDate>Thu, 03 Jan 2008 17:50:07 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/consistent-backup-with-linux-logical-volume-manager-lvm-snapshots.html#comment-142345</guid> <description>From my own testing and according to other&#039;s people articles you need to FLUSH TABLES WITH READ LOCK; on MySQL prior to making the snapshot, and release the lock right after the snapshot command have completed.
Note that normally, MySQL can recover from any interruption as long as its fsync() calls secure the data (That means the storage subsystems must not cache writes unless the memory is backed up by a battery, this is usually called WRITE-TROUGH caching on RAID subsystems). That was part of my testing too and I had nodes of a busy MySQL database of a few hundread GBs being power-cycled hundreads of times without a glitch. A single power-cycle on the same database with a WRITE-BACK cache destroyed the database (obviously a testing copy).
This is a limitation of LVM and I experienced issues with both LVM1 and LVM2, both RO and RW (LVM2 only) snapshots. Entreprise-grade hardware raids with snapshot features shouldn&#039;t suffer from this issue.</description> <content:encoded><![CDATA[<p>From my own testing and according to other&#8217;s people articles you need to FLUSH TABLES WITH READ LOCK; on MySQL prior to making the snapshot, and release the lock right after the snapshot command have completed.</p><p>Note that normally, MySQL can recover from any interruption as long as its fsync() calls secure the data (That means the storage subsystems must not cache writes unless the memory is backed up by a battery, this is usually called WRITE-TROUGH caching on RAID subsystems). That was part of my testing too and I had nodes of a busy MySQL database of a few hundread GBs being power-cycled hundreads of times without a glitch. A single power-cycle on the same database with a WRITE-BACK cache destroyed the database (obviously a testing copy).</p><p>This is a limitation of LVM and I experienced issues with both LVM1 and LVM2, both RO and RW (LVM2 only) snapshots. Entreprise-grade hardware raids with snapshot features shouldn&#8217;t suffer from this issue.</p> ]]></content:encoded> </item> <item><title>By: Anand Gupta</title><link>http://www.cyberciti.biz/tips/consistent-backup-linux-logical-volume-manager-snapshots.html#comment-140868</link> <dc:creator>Anand Gupta</dc:creator> <pubDate>Tue, 21 Aug 2007 19:15:48 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/consistent-backup-with-linux-logical-volume-manager-lvm-snapshots.html#comment-140868</guid> <description>I have heard about lvm2 snapshots not being stable, and lot of people loosing data over it. What are your thoughts on that ?</description> <content:encoded><![CDATA[<p>I have heard about lvm2 snapshots not being stable, and lot of people loosing data over it. What are your thoughts on that ?</p> ]]></content:encoded> </item> <item><title>By: durian</title><link>http://www.cyberciti.biz/tips/consistent-backup-linux-logical-volume-manager-snapshots.html#comment-235</link> <dc:creator>durian</dc:creator> <pubDate>Tue, 06 Jun 2006 02:43:36 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/consistent-backup-with-linux-logical-volume-manager-lvm-snapshots.html#comment-235</guid> <description>Looks very similar to:
http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html</description> <content:encoded><![CDATA[<p>Looks very similar to:</p><p><a
href="http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html" rel="nofollow">http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html</a></p> ]]></content:encoded> </item> <item><title>By: Naan Yaar</title><link>http://www.cyberciti.biz/tips/consistent-backup-linux-logical-volume-manager-snapshots.html#comment-230</link> <dc:creator>Naan Yaar</dc:creator> <pubDate>Mon, 05 Jun 2006 17:53:39 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/consistent-backup-with-linux-logical-volume-manager-lvm-snapshots.html#comment-230</guid> <description>To echo what Gordon Messmer says above, LVM snapshots will not obviate the need to make applications that use the filesystem quiescent before making the snapshot. Otherwise, there would be no guarantee that the application that writes to the filesystem has consistent, workable data that it can recover from at the instant in which the snapshot was created.</description> <content:encoded><![CDATA[<p>To echo what Gordon Messmer says above, LVM snapshots will not obviate the need to make applications that use the filesystem quiescent before making the snapshot. Otherwise, there would be no guarantee that the application that writes to the filesystem has consistent, workable data that it can recover from at the instant in which the snapshot was created.</p> ]]></content:encoded> </item> <item><title>By: Gordon Messmer</title><link>http://www.cyberciti.biz/tips/consistent-backup-linux-logical-volume-manager-snapshots.html#comment-228</link> <dc:creator>Gordon Messmer</dc:creator> <pubDate>Mon, 05 Jun 2006 14:48:32 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/consistent-backup-with-linux-logical-volume-manager-lvm-snapshots.html#comment-228</guid> <description>It should probably be pointed out that you still need to take the database offline while you make the snapshot.  Snapshots don&#039;t eliminate the need for downtime to get consistent backups, they just make it very short (a few seconds, instead of the full backup time).
I&#039;ve worked with a number of people who read articles like this one, and came away with that misconception.</description> <content:encoded><![CDATA[<p>It should probably be pointed out that you still need to take the database offline while you make the snapshot.  Snapshots don&#8217;t eliminate the need for downtime to get consistent backups, they just make it very short (a few seconds, instead of the full backup time).</p><p>I&#8217;ve worked with a number of people who read articles like this one, and came away with that misconception.</p> ]]></content:encoded> </item> <item><title>By: LinuxTitli</title><link>http://www.cyberciti.biz/tips/consistent-backup-linux-logical-volume-manager-snapshots.html#comment-205</link> <dc:creator>LinuxTitli</dc:creator> <pubDate>Sat, 03 Jun 2006 05:20:43 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/consistent-backup-with-linux-logical-volume-manager-lvm-snapshots.html#comment-205</guid> <description>J.B. Nicholson-Owens,
Thanks for pointing out this issue.
Appreciate your post.</description> <content:encoded><![CDATA[<p>J.B. Nicholson-Owens,</p><p>Thanks for pointing out this issue.</p><p>Appreciate your post.</p> ]]></content:encoded> </item> <item><title>By: J.B. Nicholson-Owens</title><link>http://www.cyberciti.biz/tips/consistent-backup-linux-logical-volume-manager-snapshots.html#comment-204</link> <dc:creator>J.B. Nicholson-Owens</dc:creator> <pubDate>Fri, 02 Jun 2006 23:02:26 +0000</pubDate> <guid
isPermaLink="false">http://www.cyberciti.biz/tips/consistent-backup-with-linux-logical-volume-manager-lvm-snapshots.html#comment-204</guid> <description>By the way, &quot;commercial or GPL&quot; backup programs are not opposites.  You don&#039;t mean commercial here, you mean non-GPL&#039;d backup programs or possibly you mean proprietary versus free software backup programs.
Many business redistribute GPL-covered software as part of business activity, hence GPL-covered software is commercial.  Since GPL-covered software is commercial software, GPL-covered software is not the opposite of commercial software, GPL-covered software is a proper subset of commercial software.
See http://www.gnu.org/philosophy/words-to-avoid.html#Commercial and http://www.gnu.org/philosophy/selling.html for more on this common confusion of terms.</description> <content:encoded><![CDATA[<p>By the way, &#8220;commercial or GPL&#8221; backup programs are not opposites.  You don&#8217;t mean commercial here, you mean non-GPL&#8217;d backup programs or possibly you mean proprietary versus free software backup programs.</p><p>Many business redistribute GPL-covered software as part of business activity, hence GPL-covered software is commercial.  Since GPL-covered software is commercial software, GPL-covered software is not the opposite of commercial software, GPL-covered software is a proper subset of commercial software.</p><p>See <a
href="http://www.gnu.org/philosophy/words-to-avoid.html#Commercial" rel="nofollow">http://www.gnu.org/philosophy/words-to-avoid.html#Commercial</a> and <a
href="http://www.gnu.org/philosophy/selling.html" rel="nofollow">http://www.gnu.org/philosophy/selling.html</a> for more on this common confusion of terms.</p> ]]></content:encoded> </item> </channel> </rss>
