<?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: Estimating Undo Space needed for LVM Snapshot</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2008/06/09/estimating-undo-space-needed-for-lvm-snapshot/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2008/06/09/estimating-undo-space-needed-for-lvm-snapshot/</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Sat, 21 Nov 2009 05:23:57 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/09/estimating-undo-space-needed-for-lvm-snapshot/comment-page-1/#comment-312856</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Fri, 13 Jun 2008 05:14:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=412#comment-312856</guid>
		<description>Indeed if you can afford having binary logs on separate device is good for data safety.

Sometimes I have dedicated RAID1 array for OS and having binary logs and tmp files on this device can be efficient.</description>
		<content:encoded><![CDATA[<p>Indeed if you can afford having binary logs on separate device is good for data safety.</p>
<p>Sometimes I have dedicated RAID1 array for OS and having binary logs and tmp files on this device can be efficient.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Petro</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/09/estimating-undo-space-needed-for-lvm-snapshot/comment-page-1/#comment-312429</link>
		<dc:creator>Petro</dc:creator>
		<pubDate>Wed, 11 Jun 2008 16:09:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=412#comment-312429</guid>
		<description>Mr. Byrum: 

&quot;&quot;&quot;
Also I’ve just recently started making a separate logical volume for MySQL binlogs. This helps just for data management (its much more obvious when its time to backup &amp; purge binlogs versus when its time to look for more table storage) but it definitely allows mysql snapshots to be a lot smaller.
&quot;&quot;&quot;

When I was running important (to the company) MySQL swervers I had my binlogs on an entirely different physical path. We would put the tables on a RAID, and the binlogs on the boot drive, which was not RAIDED or backed up in any way (We were using System Imager to install our servers, it was much faster to reinstall from scratch than to restore from backup). This way the logging didn&#039;t compete (as much) with the data for IO, and it would be *very* unlikely that we would lose both the RAID and the boot drive. 

Because of our very special circumstances we were running RAID0 on the raids and replicating across machines. On *any* failure we&#039;d switch to the slave immediately and start restoring the data to one of the spare dbs in the rack. Yeah, it&#039;s not the best way, but it is the cheapest, and that mattered at that time. 

Of course for inventory reasons we were running the same drive on the boot drive as in the raids (at the time 200 and 250GiB IDE drives) so we had *plenty* of space. 

We were also doing LVM snapshots to back up our dbs, but we were using LVM 1, and wrote our own script. IIRC we allowed 10% of a ~2TB volume for snap. Since during that time of day we have relatively low writes to those tables it was plenty. 

I just found this blog, and it looks great. Thanks for hte info.</description>
		<content:encoded><![CDATA[<p>Mr. Byrum: </p>
<p>&#8220;&#8221;"<br />
Also I’ve just recently started making a separate logical volume for MySQL binlogs. This helps just for data management (its much more obvious when its time to backup &amp; purge binlogs versus when its time to look for more table storage) but it definitely allows mysql snapshots to be a lot smaller.<br />
&#8220;&#8221;"</p>
<p>When I was running important (to the company) MySQL swervers I had my binlogs on an entirely different physical path. We would put the tables on a RAID, and the binlogs on the boot drive, which was not RAIDED or backed up in any way (We were using System Imager to install our servers, it was much faster to reinstall from scratch than to restore from backup). This way the logging didn&#8217;t compete (as much) with the data for IO, and it would be *very* unlikely that we would lose both the RAID and the boot drive. </p>
<p>Because of our very special circumstances we were running RAID0 on the raids and replicating across machines. On *any* failure we&#8217;d switch to the slave immediately and start restoring the data to one of the spare dbs in the rack. Yeah, it&#8217;s not the best way, but it is the cheapest, and that mattered at that time. </p>
<p>Of course for inventory reasons we were running the same drive on the boot drive as in the raids (at the time 200 and 250GiB IDE drives) so we had *plenty* of space. </p>
<p>We were also doing LVM snapshots to back up our dbs, but we were using LVM 1, and wrote our own script. IIRC we allowed 10% of a ~2TB volume for snap. Since during that time of day we have relatively low writes to those tables it was plenty. </p>
<p>I just found this blog, and it looks great. Thanks for hte info.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/09/estimating-undo-space-needed-for-lvm-snapshot/comment-page-1/#comment-312182</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Tue, 10 Jun 2008 21:43:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=412#comment-312182</guid>
		<description>Thanks LenZ,

Indeed this is good way to understand how things are going.  Actually logging it may make sense so you can see how your undo space requirements fluctuates so you do not run out of it before you expect.</description>
		<content:encoded><![CDATA[<p>Thanks LenZ,</p>
<p>Indeed this is good way to understand how things are going.  Actually logging it may make sense so you can see how your undo space requirements fluctuates so you do not run out of it before you expect.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Clint Byrum</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/09/estimating-undo-space-needed-for-lvm-snapshot/comment-page-1/#comment-312148</link>
		<dc:creator>Clint Byrum</dc:creator>
		<pubDate>Tue, 10 Jun 2008 20:41:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=412#comment-312148</guid>
		<description>Great write up peter. With storage so cheap, for the last couple of years I&#039;ve made sure to build 30% extra storage (above the already 50% extra I use to avoid mishaps) for LVM snapshotting. Also I&#039;ve just recently started making a separate logical volume for MySQL binlogs. This helps just for data management (its much more obvious when its time to backup &amp; purge binlogs versus when its time to look for more table storage) but it definitely allows mysql snapshots to be a lot smaller. I have to agree that there&#039;s no reason to snapshot binlogs, because they always move forward, there&#039;s never any going back. 

So my backup script does this (runs on a dedicated &quot;backup&quot; slave, so the flush tables w/ read lock doesn&#039;t interfere with any queries or anything)

flush tables with read lock; (it loops until slave_open_temp_tables=0)
flush logs;
show master status; &gt; status.log
show slave status; &gt;&gt; status.log
make lvm snapshot of data partition
unlock tables;
mount snapshot in snapshots dir
copy status.log to snapshot mount

After that bacula comes along and backs up the snapshot mount and binlogs directories.

I like that mylvmbackup spawns a new mysqld to perform the InnoDB recovery btw. I will have to incorporate that at some point.</description>
		<content:encoded><![CDATA[<p>Great write up peter. With storage so cheap, for the last couple of years I&#8217;ve made sure to build 30% extra storage (above the already 50% extra I use to avoid mishaps) for LVM snapshotting. Also I&#8217;ve just recently started making a separate logical volume for MySQL binlogs. This helps just for data management (its much more obvious when its time to backup &amp; purge binlogs versus when its time to look for more table storage) but it definitely allows mysql snapshots to be a lot smaller. I have to agree that there&#8217;s no reason to snapshot binlogs, because they always move forward, there&#8217;s never any going back. </p>
<p>So my backup script does this (runs on a dedicated &#8220;backup&#8221; slave, so the flush tables w/ read lock doesn&#8217;t interfere with any queries or anything)</p>
<p>flush tables with read lock; (it loops until slave_open_temp_tables=0)<br />
flush logs;<br />
show master status; &gt; status.log<br />
show slave status; &gt;&gt; status.log<br />
make lvm snapshot of data partition<br />
unlock tables;<br />
mount snapshot in snapshots dir<br />
copy status.log to snapshot mount</p>
<p>After that bacula comes along and backs up the snapshot mount and binlogs directories.</p>
<p>I like that mylvmbackup spawns a new mysqld to perform the InnoDB recovery btw. I will have to incorporate that at some point.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LenZ</title>
		<link>http://www.mysqlperformanceblog.com/2008/06/09/estimating-undo-space-needed-for-lvm-snapshot/comment-page-1/#comment-311947</link>
		<dc:creator>LenZ</dc:creator>
		<pubDate>Tue, 10 Jun 2008 12:29:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=412#comment-311947</guid>
		<description>Hi Peter, thanks for the nice writeup of background information and the plug about mylvmbackup :)

The script actually prints the output of &quot;lvs&quot; at the end of the backup, which also provides information about the percentage of backing store used during the life time of the snapshot. This allows you to tune the snapshot size to your requirements.</description>
		<content:encoded><![CDATA[<p>Hi Peter, thanks for the nice writeup of background information and the plug about mylvmbackup <img src='http://www.mysqlperformanceblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The script actually prints the output of &#8220;lvs&#8221; at the end of the backup, which also provides information about the percentage of backing store used during the life time of the snapshot. This allows you to tune the snapshot size to your requirements.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
