<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PlanetMysql.ru - информация о СУБД MySQL &#187; recovery</title>
	<atom:link href="http://planetmysql.ru/category/recovery/feed/" rel="self" type="application/rss+xml" />
	<link>http://planetmysql.ru</link>
	<description>Блог о самой популярной СУБД MySQL</description>
	<lastBuildDate>Fri, 10 Feb 2012 22:53:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>What a Hosting Provider did Today</title>
		<link>http://openquery.com/blog/what-hosting-provider-did-today?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=what-a-hosting-provider-did-today</link>
		<comments>http://openquery.com/blog/what-hosting-provider-did-today#comments</comments>
		<pubDate>Mon, 31 Oct 2011 06:39:39 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[destruction]]></category>
		<category><![CDATA[Good practice / Bad practice]]></category>
		<category><![CDATA[helpful]]></category>
		<category><![CDATA[hosting]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[logfile]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[tablespace]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1573</guid>
		<description><![CDATA[I found Dennis the Menace, he now has a job as system administrator for a hosting company. Scenario: client has a problem with a server becoming unavailable (cause unknown) and has it restarted. MySQL had some page corruption in the InnoDB tablespace.
The hosting provider, being really helpful, goes in as root and first deletes ib_logfile* then ib* in /var/lib/mysql. He later says &#8220;I am sorry if I deleted it. I thought I deleted the log only. Sorry again.&#8221;  Now this may appear nice, but people who know what they&#8217;re doing with MySQL will realise that deleting the iblogfiles actually destroys data also. MySQL of course screams loudly that while it has FRM files it can&#8217;t find the tables. No kidding!
Then, while he&#8217;s been told to not touch anything any more, and I&#8217;m trying to see if I can recover the deleted files on ext3 filesystem (yes there are tools for that), he goes in again and puts an ibdata1 file back. No, not the logfiles &#8211; but he had those somewhere else too. The files get restored and turn out to be two months old (no info on how they were made in the first place but that&#8217;s minor detail in this grand scheme). All the extra write activity on the partition would&#8217;ve also made potential deleted file recovery more difficult or impossible.
This story will still get a &#8220;happy&#8221; ending, using a recent mysqldump to load a new server at a different hosting provider. Really &#8211; some helpfulness is not what you want. Secondary lesson: pick your hosting provider with care. Feel free to ask us from recommendations, we know some good/excellent and have encountered plenty bad.]]></description>
			<content:encoded><![CDATA[<p>I found Dennis the Menace, he now has a job as system administrator for a hosting company. Scenario: client has a problem with a server becoming unavailable (cause unknown) and has it restarted. MySQL had some page corruption in the InnoDB tablespace.</p>
<p>The hosting provider, being really helpful, goes in as root and first deletes ib_logfile* then ib* in /var/lib/mysql. He later says &#8220;I am sorry if I deleted it. I thought I deleted the log only. Sorry again.&#8221;  Now this may appear nice, but people who know what they&#8217;re doing with MySQL will realise that deleting the iblogfiles actually destroys data also. MySQL of course screams loudly that while it has FRM files it can&#8217;t find the tables. No kidding!</p>
<p>Then, while he&#8217;s been told to not touch anything any more, and I&#8217;m trying to see if I can recover the deleted files on ext3 filesystem (yes there are tools for that), he goes in again and puts an ibdata1 file back. No, not the logfiles &#8211; but he had those somewhere else too. The files get restored and turn out to be two months old (no info on how they were made in the first place but that&#8217;s minor detail in this grand scheme). All the extra write activity on the partition would&#8217;ve also made potential deleted file recovery more difficult or impossible.</p>
<p>This story will still get a &#8220;happy&#8221; ending, using a recent mysqldump to load a new server at a different hosting provider. Really &#8211; some helpfulness is not what you want. Secondary lesson: pick your hosting provider with care. Feel free to ask us from recommendations, we know some good/excellent and have encountered plenty bad.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=30544&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=30544&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/10/31/what-a-hosting-provider-did-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Enterprise Backup 3.6 &#8212; New backup streaming, integration with Oracle Secure Backup and other common backup media solutions</title>
		<link>http://blogs.oracle.com/MySQL/entry/mysql_enterprise_backup_3_6?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-enterprise-backup-3-6-new-backup-streaming-integration-with-oracle-secure-backup-and-other-common-backup-media-solutions</link>
		<comments>http://blogs.oracle.com/MySQL/entry/mysql_enterprise_backup_3_6#comments</comments>
		<pubDate>Tue, 19 Jul 2011 19:04:05 +0000</pubDate>
		<dc:creator>Rob Young</dc:creator>
				<category><![CDATA[backup]]></category>
		<category><![CDATA[edition]]></category>
		<category><![CDATA[enterprise]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql server]]></category>
		<category><![CDATA[recovery]]></category>

		<guid isPermaLink="false">http://blogs.oracle.com/MySQL/entry/mysql_enterprise_backup_3_6</guid>
		<description><![CDATA[All DBAs understand the importance and priority of quick, reliable database backup and recovery operations.&#160; In fact, dating back to my early days with MySQL, the most commonly requested product features from the MySQL user base have been around online, non-blocking backup solutions for running MySQL servers.&#160; In response, Oracle now provides MySQL Enterprise Backup (&#34;MEB&#34;) which performs high performant, online &#34;hot&#34; backups for MySQL databases.&#160; MEB provides all of the backup/recovery features and functionality DBAs expect, all from a scriptable command line interface.&#160; You can learn all about MEB in the related MySQL docs.My congratulations and appreciation go out to Lars Thalmann and the MySQL Enterprise Backup engineering team for the recent release of MEB 3.6.&#160; While there are many great improvements in this specific release, as an operational DBA I am most excited about the new support for single file streaming and for the SBT interface features, described here: Single File Streaming - This allows DBAs to offload the footprint of backup images to a different server or storage device without having to store them locally on the MySQL database server.&#160; This removes storage and related overhead from the server being backed up and speeds up total backup time by removing the need to copy local backup images (which even when compressed can be very large) over the network to their ultimate network destination.&#160; You can learn about this specific MEB option along with a good usage example here.Support for SBT interface - The &#34;Secure Backup to Tape&#34; interface was originally developed by Oracle as a standard way for third-party backup media providers to easily integrate their solutions with Oracle Recovery Manager (&#34;RMAN&#34;).&#160; SBT is now supported in MEB 3.6 so MySQL backup images can now be generated by and streamed directly to advanced enterprise backup media management solutions (Oracle Secure Backup, Symantec Netbackup, most others) that are already deployed within an environment.&#160; This simplifies MySQL administration by enabling DBAs to incorporate MySQL backup/recovery operations and media rotation/retention policies into existing standard operating procedures.&#160; You can learn all about this new option, again with a useful example here. MySQL Enterprise Backup is part of the commercial MySQL Enterprise Edition but like all Oracle products is free to download and use without obligation for 30 days.&#160; This is a great way to try it out to see if it fits your needs. &#160;You can download and begin working with MEB 3.6 now:1. Go to Oracle eDelivery. 2. Enter some basic details and click through the agreement.3. Select &#34;MySQL Product Pack&#34;, then your platform, then Go.I will keep you posted as new MySQL product features and interesting Oracle integrations become available.&#160; As always, thanks for your continued support of MySQL!&#160;]]></description>
			<content:encoded><![CDATA[All DBAs understand the importance and priority of quick, reliable database backup and recovery operations.&nbsp; In fact, dating back to my early days with MySQL, the most commonly requested product features from the MySQL user base have been around online, non-blocking backup solutions for running MySQL servers.&nbsp; In response, Oracle now provides <a href="http://mysql.com/products/enterprise/backup.html">MySQL Enterprise Backup</a> (&quot;MEB&quot;) which performs high performant, online &quot;hot&quot; backups for MySQL databases.&nbsp; MEB provides all of the backup/recovery features and functionality DBAs expect, all from a scriptable command line interface.&nbsp; You can learn all about MEB in the related <a href="http://dev.mysql.com/doc/mysql-enterprise-backup/3.6/en/index.html">MySQL docs.</a><br /><br />My congratulations and appreciation go out to Lars Thalmann and the MySQL Enterprise Backup engineering team for the recent release of MEB 3.6.&nbsp; While there are many great improvements in this specific release, as an operational DBA I am most excited about the new support for single file streaming and for the SBT interface features, described here: <br /><br /><a href="http://dev.mysql.com/doc/mysql-enterprise-backup/3.6/en/meb-backup-streaming.html">Single File Streaming</a> - This allows DBAs to offload the footprint of backup images to a different server or storage device without having to store them locally on the MySQL database server.&nbsp; This removes storage and related overhead from the server being backed up and speeds up total backup time by removing the need to copy local backup images (which even when compressed can be very large) over the network to their ultimate network destination.&nbsp; You can learn about this specific MEB option along with a good usage example <a href="http://dev.mysql.com/doc/mysql-enterprise-backup/3.6/en/meb-backup-streaming.html">here.</a><br /><br /><a href="http://dev.mysql.com/doc/mysql-enterprise-backup/3.6/en/meb-backup-tape.html">Support for SBT interface</a> - The &quot;Secure Backup to Tape&quot; interface was originally developed by Oracle as a standard way for third-party backup media providers to easily integrate their solutions with Oracle Recovery Manager (&quot;RMAN&quot;).&nbsp; SBT is now supported in MEB 3.6 so MySQL backup images can now be generated by and streamed directly to advanced enterprise backup media management solutions (Oracle Secure Backup, Symantec Netbackup, most others) that are already deployed within an environment.&nbsp; This simplifies MySQL administration by enabling DBAs to incorporate MySQL backup/recovery operations and media rotation/retention policies into existing standard operating procedures.&nbsp; You can learn all about this new option, again with a useful example <a href="http://dev.mysql.com/doc/mysql-enterprise-backup/3.6/en/meb-backup-tape.html">here. </a><br /><br />MySQL Enterprise Backup is part of the commercial <a href="http://mysql.com/products/enterprise/">MySQL Enterprise Edition</a> but like all Oracle products is free to download and use without obligation for 30 days.&nbsp; This is a great way to try it out to see if it fits your needs. &nbsp;<br /><br />You can download and begin working with MEB 3.6 now:<br /><br />1. Go to Oracle <a href="https://edelivery.oracle.com/">eDelivery</a>. <br />2. Enter some basic details and click through the agreement.<br />3. Select &quot;MySQL Product Pack&quot;, then your platform, then Go.<br /><br /><br />I will keep you posted as new MySQL product features and interesting Oracle integrations become available.&nbsp; As always, thanks for your continued support of MySQL!&nbsp;<br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=29416&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=29416&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/07/19/mysql-enterprise-backup-3-6-new-backup-streaming-integration-with-oracle-secure-backup-and-other-common-backup-media-solutions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL data backup: going beyond mysqldump</title>
		<link>http://openquery.com/blog/mysql-data-backup-mysqldump?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=mysql-data-backup-going-beyond-mysqldump</link>
		<comments>http://openquery.com/blog/mysql-data-backup-mysqldump#comments</comments>
		<pubDate>Tue, 29 Mar 2011 00:25:36 +0000</pubDate>
		<dc:creator>Open Query</dc:creator>
				<category><![CDATA[backup]]></category>
		<category><![CDATA[Good practice / Bad practice]]></category>
		<category><![CDATA[MariaDB]]></category>
		<category><![CDATA[mmm]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[Replication]]></category>
		<category><![CDATA[restore]]></category>
		<category><![CDATA[Software and tools]]></category>
		<category><![CDATA[XtraBackup]]></category>

		<guid isPermaLink="false">http://openquery.com/blog/?p=1446</guid>
		<description><![CDATA[A user on a linux user group mailing list asked about this, and I was one of the people replying. Re-posting here as I reckon it&#8217;s of wider interest.
&#62; [...] tens of gigs of data in MySQL databases.
&#62; Some in memory tables, some MyISAM, a fair bit InnoDB. According to my
&#62; understanding, when one doesn&#8217;t have several hours to take a DB
&#62; offline and do dbbackup, there was/is ibbackup from InnoBase.. but now
&#62; that MySQL and InnoBase have both been &#8216;Oracle Enterprised&#8217;, said
&#62; product is now restricted to MySQL Enterprise customers..
&#62;
&#62; Some quick searching has suggested Percona XtraBackup as a potential
&#62; FOSS alternative.
&#62; What backup techniques do people employ around these parts for backups
&#62; of large mixed MySQL data sets where downtime *must* be minimised?
&#62;
&#62; Has your backup plan ever been put to the test?
You should put it to the test regularly, not just when it&#8217;s needed.
An untested backup is not really a backup, I think.
At  Open Query we tend to use dual master setups with MMM, other  replication slaves, mysqldump, and XtracBackup or LVM snapshots. It&#8217;s  not just about having backups, but also about general resilience,  maintenance options, and scalability. I&#8217;ll clarify:

XtraBackup and LVM give you physical backups. that&#8217;s nice if you want to  recover or clone a complete instance as-is. But if anything is wrong,  it&#8217;ll be all stuffed (that is, you can sometimes recover InnoDB  tablespaces and there are tools for it, but time may not be on your  side). Note that LVM cannot snapshot between multiple volumes  consistently, so if you have your InnoDB ibdata/IBD files and iblog  files on separate spindles, using LVM is not suitable.


mysqldump for logical (SQL) backups. Most if not all setups should have  this. Even if the file(s) were to be corrupted, they&#8217;re still readable  since it&#8217;s plain SQL. You can do partial restores, which is handy in  some cases. It&#8217;ll be slower to load so having *only* an SQL dump of a  larger dataset is not a good idea.


some of the above backups  can and should *also* be copied off-site. that&#8217;s for extra safety, but  in terms of recovery speed it may not be optimal and should not be  relied upon.


having dual masters is for easier maintenance  without scheduled outages, as well as resilience when for instance  hardware breaks (and it does).


slaves. You can even delay a  slave (Maatkit has a tool for this), so that would give you a live  correct image even in case of a user error, provided you get to it in  time. Also, you want enough slack in your infra to be able to initialise  a new slave off an existing one. Scaling up at a time when high load is  already occurring can become painful if your infra is not prepared for  it.

A key issue to consider is this&#8230; if the dataset is  sufficiently large, and the online requirements high enough, you can&#8217;t  afford to just have backups. Why? Because, how quickly can you deploy  new suitable hardware, install OS, do restore, validate, put back  online?
In many cases one or more aspects of the above list simply  take too long, so my summary would be &#8220;then you don&#8217;t really have a  backup&#8221;. Clients tend to argue with me on that, but only fairly briefly, until  they see the point: if a restore takes longer than you can afford, that  backup mechanism is unsuitable.
So, we use a combination of tools  and approaches depending on needs, but in general terms we aim for  keeping the overall environment online (individual machines can and will  fail! relying on a magic box or SAN to not fail *will* get you bitten)  to vastly reduce the instances where an actual restore is required.
Into  that picture also comes using separate test/staging servers to not have  developers stuff around on live servers (human error is an important  cause of hassles).
In our training modules, we&#8217;ve combined the  backups, recovery and replication topics as it&#8217;s clearly all intertwined  and overlapping. Discussing backup techniques separate from replication  and dual master setups makes no sense to us. It needs to be put in  place with an overall vision.
Note that a SAN is not a backup strategy. And neither is replication on its own.]]></description>
			<content:encoded><![CDATA[<p>A user on a linux user group mailing list asked about this, and I was one of the people replying. Re-posting here as I reckon it&#8217;s of wider interest.</p>
<p>&gt; [...] tens of gigs of data in MySQL databases.<br />
&gt; Some in memory tables, some MyISAM, a fair bit InnoDB. According to my<br />
&gt; understanding, when one doesn&#8217;t have several hours to take a DB<br />
&gt; offline and do dbbackup, there was/is ibbackup from InnoBase.. but now<br />
&gt; that MySQL and InnoBase have both been &#8216;Oracle Enterprised&#8217;, said<br />
&gt; product is now restricted to MySQL Enterprise customers..<br />
&gt;<br />
&gt; Some quick searching has suggested Percona XtraBackup as a potential<br />
&gt; FOSS alternative.<br />
&gt; What backup techniques do people employ around these parts for backups<br />
&gt; of large mixed MySQL data sets where downtime *must* be minimised?<br />
&gt;<br />
&gt; Has your backup plan ever been put to the test?</p>
<p>You should put it to the test regularly, not just when it&#8217;s needed.<br />
An untested backup is not really a backup, I think.</p>
<p>At  <a href="http://openquery.com/" >Open Query</a> we tend to use dual master setups with MMM, other  replication slaves, mysqldump, and XtracBackup or LVM snapshots. It&#8217;s  not just about having backups, but also about general resilience,  maintenance options, and scalability. I&#8217;ll clarify:</p>
<ul>
<li>XtraBackup and LVM give you physical backups. that&#8217;s nice if you want to  recover or clone a complete instance as-is. But if anything is wrong,  it&#8217;ll be all stuffed (that is, you can sometimes recover InnoDB  tablespaces and there are tools for it, but time may not be on your  side). Note that LVM cannot snapshot between multiple volumes  consistently, so if you have your InnoDB ibdata/IBD files and iblog  files on separate spindles, using LVM is not suitable.</li>
</ul>
<ul>
<li>mysqldump for logical (SQL) backups. Most if not all setups should have  this. Even if the file(s) were to be corrupted, they&#8217;re still readable  since it&#8217;s plain SQL. You can do partial restores, which is handy in  some cases. It&#8217;ll be slower to load so having *only* an SQL dump of a  larger dataset is not a good idea.</li>
</ul>
<ul>
<li>some of the above backups  can and should *also* be copied off-site. that&#8217;s for extra safety, but  in terms of recovery speed it may not be optimal and should not be  relied upon.</li>
</ul>
<ul>
<li>having dual masters is for easier maintenance  without scheduled outages, as well as resilience when for instance  hardware breaks (and it does).</li>
</ul>
<ul>
<li>slaves. You can even delay a  slave (Maatkit has a tool for this), so that would give you a live  correct image even in case of a user error, provided you get to it in  time. Also, you want enough slack in your infra to be able to initialise  a new slave off an existing one. Scaling up at a time when high load is  already occurring can become painful if your infra is not prepared for  it.</li>
</ul>
<p><strong>A key issue to consider is this&#8230; if the dataset is  sufficiently large, and the online requirements high enough, you can&#8217;t  afford to just have backups. Why? Because, how quickly can you deploy  new suitable hardware, install OS, do restore, validate, put back  online?</strong></p>
<p><em>In many cases one or more aspects of the above list simply  take too long, so my summary would be &#8220;then you don&#8217;t really have a  backup&#8221;. Clients tend to argue with me on that, but only fairly briefly, until  they see the point: if a restore takes longer than you can afford, that  backup mechanism is unsuitable.</em></p>
<p>So, we use a combination of tools  and approaches depending on needs, but in general terms we aim for  keeping the overall environment online (individual machines can and will  fail! relying on a magic box or SAN to not fail *will* get you bitten)  to vastly reduce the instances where an actual restore is required.<br />
Into  that picture also comes using separate test/staging servers to not have  developers stuff around on live servers (human error is an important  cause of hassles).</p>
<p>In our training modules, we&#8217;ve combined the  backups, recovery and replication topics as it&#8217;s clearly all intertwined  and overlapping. Discussing backup techniques separate from replication  and dual master setups makes no sense to us. It needs to be put in  place with an overall vision.</p>
<p>Note that a SAN is not a backup strategy. And neither is replication on its own.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=27766&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=27766&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/03/29/mysql-data-backup-going-beyond-mysqldump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Solaris Cluster 3.3 is now available</title>
		<link>http://blogs.sun.com/SC/entry/oracle_solaris_cluster_3_3?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=oracle-solaris-cluster-3-3-is-now-available</link>
		<comments>http://blogs.sun.com/SC/entry/oracle_solaris_cluster_3_3#comments</comments>
		<pubDate>Fri, 18 Mar 2011 20:08:33 +0000</pubDate>
		<dc:creator>Sun Cluster Engineering</dc:creator>
				<category><![CDATA[availabiity]]></category>
		<category><![CDATA[Cluster]]></category>
		<category><![CDATA[disaster]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[suncluster]]></category>

		<guid isPermaLink="false">http://blogs.sun.com/SC/entry/oracle_solaris_cluster_3_3</guid>
		<description><![CDATA[On September 8, 2010 Oracle announced the availability of Oracle Solaris Cluster 3.3

Oracle Solaris Cluster 3.3, built on the solid foundation of Oracle Solaris, offers the 
most extensive Oracle enterprise High Availability and Disaster Recovery solutions for the 
largest portfolio of mission-critical applications.

Integrated and thoroughly tested with Oracle's Sun servers, storage, connectivity 
solutions and Solaris 10 features, Oracle Solaris Cluster is now qualified with Solaris 
Trusted Extensions, supports Infiniband for general networking or storage usage, and can 
be deployed with Oracle Unified Storage in Campus Cluster configurations. It extends its 
applications support to new Oracle applications such as Oracle Business Intelligence, 
PeopleSoft, TimesTen, and MySQL Cluster.

The single, integrated HA and DR solution enables multi-tier deployments in virtualized 
environments. In this release, Oracle Solaris Containers clusters supports even more 
configurations including additional applications (Oracle WebLogic Server, Siebel CRM, and 
more) and integration with Oracle Solaris Cluster Geographic Edition.


Benefits:

&#160;&#160;&#160; * Delivers unrivaled High Availability on Oracle Solaris OS for much faster failure 
detection and recovery

&#160;&#160;&#160; * Enables cost-savings without performance compromise by integrating seamlessly with 
Oracle Solaris Containers for applications and databases consolidation

&#160;&#160;&#160; * Out of the box support for a wide selection of applications

&#160;&#160;&#160; * Certified with a broad range of storage arrays from Oracle and third parties on 
SPARC and x86 platforms


New features:

-------------

Availability:

- Active Monitoring of Storage Resources

- Flexible load distribution of application services



Virtualization:

- Extended Oracle Solaris Containers cluster support:

* NAS, GFS, RDSV1

* More applications : Oracle WebLogic Server, OBIEE, MySQL cluster,

&#160;PeopleSoft, TimesTen



Hardware Integration:

- InfiniBand on public network and as storage connectivity



Application Integration

- New agents: Oracle Business Intelligence Enterprise Edition,

&#160;PeopleSoft Enterprise, MySQL cluster, TimesTen

- Updates on Oracle E-Business Suite, WebLogic Server, MySQL, SAP

- Oracle 11gR2 database and RAC support


Disaster Recovery

- Containers cluster&#160; with Geographic Edition

- Sun Unified Storage 7xxxx in campus cluster


Security

- Solaris Trusted Extensions



Ease of use

- Wizards for ASM configurations set-up

- GUI and CLI performance improvements

- Power Management User interface

- Node rename



Compatibility information

--------------------------

Supported Solaris release: Solaris 10 10/09, Solaris 10 9/10



Media Kit and downloads

-----------------------------------

Software is available through

- OTN (for evaluation and tests)

http://www.oracle.com/technetwork/server-storage/solaris-cluster/downloads/index.html


- e-delivery (for production use - requires purchase of commercial license)

http://edelivery.oracle.com

Select Product Pack:&#160; Oracle Solaris

From results pick:&#160; Oracle Solaris Cluster 3.3 Media Pack


Documentation

---------------------

* Oracle Solaris Cluster 3.3 Documentation Center:

http://www.oracle.com/technetwork/documentation/solaris-cluster-33-192999.html


* Release Notes Information:

http://wikis.sun.com/display/SunCluster/Release+Notes+Information

The Release Notes documents on this site are regularly updated with new

documentation to support new features, hardware qualifications, bug

workarounds, and other late-breaking information. Check the Release

Notes or Release Notes Supplement for your release before installing the

cluster or performing any maintenance.



Web site

----------------

http://www.oracle.com/technetwork/server-storage/solaris-cluster/overview/index.html]]></description>
			<content:encoded><![CDATA[<pre>On September 8, 2010 Oracle announced the availability of Oracle Solaris Cluster 3.3

Oracle Solaris Cluster 3.3, built on the solid foundation of Oracle Solaris, offers the 
most extensive Oracle enterprise High Availability and Disaster Recovery solutions for the 
largest portfolio of mission-critical applications.

Integrated and thoroughly tested with Oracle's Sun servers, storage, connectivity 
solutions and Solaris 10 features, Oracle Solaris Cluster is now qualified with Solaris 
Trusted Extensions, supports Infiniband for general networking or storage usage, and can 
be deployed with Oracle Unified Storage in Campus Cluster configurations. It extends its 
applications support to new Oracle applications such as Oracle Business Intelligence, 
PeopleSoft, TimesTen, and MySQL Cluster.

The single, integrated HA and DR solution enables multi-tier deployments in virtualized 
environments. In this release, Oracle Solaris Containers clusters supports even more 
configurations including additional applications (Oracle WebLogic Server, Siebel CRM, and 
more) and integration with Oracle Solaris Cluster Geographic Edition.


Benefits:

&nbsp;&nbsp;&nbsp; * Delivers unrivaled High Availability on Oracle Solaris OS for much faster failure 
detection and recovery

&nbsp;&nbsp;&nbsp; * Enables cost-savings without performance compromise by integrating seamlessly with 
Oracle Solaris Containers for applications and databases consolidation

&nbsp;&nbsp;&nbsp; * Out of the box support for a wide selection of applications

&nbsp;&nbsp;&nbsp; * Certified with a broad range of storage arrays from Oracle and third parties on 
SPARC and x86 platforms


New features:

-------------

Availability:

- Active Monitoring of Storage Resources

- Flexible load distribution of application services



Virtualization:

- Extended Oracle Solaris Containers cluster support:

* NAS, GFS, RDSV1

* More applications : Oracle WebLogic Server, OBIEE, MySQL cluster,

&nbsp;PeopleSoft, TimesTen



Hardware Integration:

- InfiniBand on public network and as storage connectivity



Application Integration

- New agents: Oracle Business Intelligence Enterprise Edition,

&nbsp;PeopleSoft Enterprise, MySQL cluster, TimesTen

- Updates on Oracle E-Business Suite, WebLogic Server, MySQL, SAP

- Oracle 11gR2 database and RAC support


Disaster Recovery

- Containers cluster&nbsp; with Geographic Edition

- Sun Unified Storage 7xxxx in campus cluster


Security

- Solaris Trusted Extensions



Ease of use

- Wizards for ASM configurations set-up

- GUI and CLI performance improvements

- Power Management User interface

- Node rename



Compatibility information

--------------------------

Supported Solaris release: Solaris 10 10/09, Solaris 10 9/10



Media Kit and downloads

-----------------------------------

Software is available through

- OTN (for evaluation and tests)

<a href="http://www.oracle.com/technetwork/server-storage/solaris-cluster/downloads/index.html">http://www.oracle.com/technetwork/server-storage/solaris-cluster/downloads/index.html</a>


- e-delivery (for production use - requires purchase of commercial license)

<a href="http://edelivery.oracle.com/">http://edelivery.oracle.com</a>

Select Product Pack:&nbsp; Oracle Solaris

From results pick:&nbsp; Oracle Solaris Cluster 3.3 Media Pack


Documentation

---------------------

* Oracle Solaris Cluster 3.3 Documentation Center:

<a href="http://www.oracle.com/technetwork/documentation/solaris-cluster-33-192999.html">http://www.oracle.com/technetwork/documentation/solaris-cluster-33-192999.html</a>


* Release Notes Information:

<a href="http://wikis.sun.com/display/SunCluster/Release+Notes+Information">http://wikis.sun.com/display/SunCluster/Release+Notes+Information</a>

The Release Notes documents on this site are regularly updated with new

documentation to support new features, hardware qualifications, bug

workarounds, and other late-breaking information. Check the Release

Notes or Release Notes Supplement for your release before installing the

cluster or performing any maintenance.



Web site

----------------

<a href="http://www.oracle.com/technetwork/server-storage/solaris-cluster/overview/index.html">http://www.oracle.com/technetwork/server-storage/solaris-cluster/overview/index.html</a>


</pre><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=27646&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=27646&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2011/03/18/oracle-solaris-cluster-3-3-is-now-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How long is recovery from 8G innodb_log_file</title>
		<link>http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-long-is-recovery-from-8g-innodb_log_file</link>
		<comments>http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 08:02:30 +0000</pubDate>
		<dc:creator>MySQL Performance Blog</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[percona server]]></category>
		<category><![CDATA[recovery]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=4334</guid>
		<description><![CDATA[In my previous posts I highlighted that one of improvements in Percona Server is support of innodb_log_file_size &#62; 4G. 
The valid question how long is recovery in this case, so let's test it. I took the same tpcc-mysql 1000W workload with 52GB and 144GB innodb_buffer_pool_size with data located on Virident tachIOn card and killed mysqld after 30 mins of work.
The recovery time after start is:
for 52GB innodb_buffer_pool_size:
PLAIN TEXT
CODE:




101220 21:54:31&#160; InnoDB: Database was not shut down normally!


..


101220 22:02:40&#160; InnoDB: Rollback of non-prepared transactions completed 






that is 7min 51sec
for 144GB innodb_buffer_pool_size:
PLAIN TEXT
CODE:




101220 22:45:37&#160; InnoDB: Database was not shut down normally!


&#160;


..


101220 22:55:00&#160; InnoDB: Rollback of non-prepared transactions completed 






that is 9min 23sec
and
for 144GB innodb_buffer_pool_size with data stored on RAID10:
PLAIN TEXT
CODE:




101220 23:46:01&#160; InnoDB: Database was not shut down normally!


..


101221&#160; 0:00:58&#160; InnoDB: Rollback of non-prepared transactions completed 






that is 14min 57sec 
I think this time is acceptable as trade-off for performance.
However it should be taken into account if you use HA solution like DRBD, as it basically means this is time for fail-over period, and your system will be down during this time.
    
    Entry posted by Vadim &#124;
      No comment
    Add to:  &#124;  &#124;  &#124;  &#124;]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://www.mysqlperformanceblog.com/2010/12/21/mysql-5-5-8-and-percona-server-on-fast-flash-card-virident-tachion/">previous posts</a> I highlighted that one of improvements in <a href="http://www.percona.com/software/percona-server/">Percona Server</a> is support of <strong>innodb_log_file_size</strong> > 4G. </p>
<p>The valid question how long is recovery in this case, so let's test it. I took the same tpcc-mysql 1000W workload with 52GB and 144GB <strong>innodb_buffer_pool_size</strong> with data located on Virident tachIOn card and killed mysqld after 30 mins of work.</p>
<p>The recovery time after start is:<br />
for 52GB <strong>innodb_buffer_pool_size</strong>:</p>
<div><span><a href="http://www.mysqlperformanceblog.com">PLAIN TEXT</a></span></div>
<div><span>CODE:</span>
<div>
<div>
<ol>
<li>
<div><span>101220</span> <span>21</span>:<span>54</span>:<span>31</span>&nbsp; InnoDB: Database was not shut down normally!</div>
</li>
<li>
<div>..</div>
</li>
<li>
<div><span>101220</span> <span>22</span>:<span>02</span>:<span>40</span>&nbsp; InnoDB: Rollback of non-prepared transactions completed </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>that is 7min 51sec</p>
<p>for 144GB <strong>innodb_buffer_pool_size</strong>:</p>
<div><span><a href="http://www.mysqlperformanceblog.com">PLAIN TEXT</a></span></div>
<div><span>CODE:</span>
<div>
<div>
<ol>
<li>
<div><span>101220</span> <span>22</span>:<span>45</span>:<span>37</span>&nbsp; InnoDB: Database was not shut down normally!</div>
</li>
<li>
<div>&nbsp;</div>
</li>
<li>
<div>..</div>
</li>
<li>
<div><span>101220</span> <span>22</span>:<span>55</span>:<span>00</span>&nbsp; InnoDB: Rollback of non-prepared transactions completed </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>that is 9min 23sec</p>
<p>and<br />
for 144GB <strong>innodb_buffer_pool_size</strong> with data stored on RAID10:</p>
<div><span><a href="http://www.mysqlperformanceblog.com">PLAIN TEXT</a></span></div>
<div><span>CODE:</span>
<div>
<div>
<ol>
<li>
<div><span>101220</span> <span>23</span>:<span>46</span>:<span>01</span>&nbsp; InnoDB: Database was not shut down normally!</div>
</li>
<li>
<div>..</div>
</li>
<li>
<div><span>101221</span>&nbsp; <span>0</span>:<span>00</span>:<span>58</span>&nbsp; InnoDB: Rollback of non-prepared transactions completed </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>that is 14min 57sec </p>
<p>I think this time is acceptable as trade-off for performance.</p>
<p>However it should be taken into account if you use HA solution like DRBD, as it basically means this is time for fail-over period, and your system will be down during this time.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/#comments">No comment</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/&amp;title=How%20long%20is%20recovery%20from%208G%20innodb_log_file" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/&amp;title=How%20long%20is%20recovery%20from%208G%20innodb_log_file" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/&amp;title=How%20long%20is%20recovery%20from%208G%20innodb_log_file" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/&amp;T=How%20long%20is%20recovery%20from%208G%20innodb_log_file" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/&amp;title=How%20long%20is%20recovery%20from%208G%20innodb_log_file" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=26828&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=26828&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How long is recovery from 8G innodb_log_file</title>
		<link>http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-long-is-recovery-from-8g-innodb_log_file</link>
		<comments>http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/#comments</comments>
		<pubDate>Wed, 22 Dec 2010 08:02:30 +0000</pubDate>
		<dc:creator>MySQL Performance Blog</dc:creator>
				<category><![CDATA[mysql]]></category>
		<category><![CDATA[percona server]]></category>
		<category><![CDATA[recovery]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=4334</guid>
		<description><![CDATA[In my previous posts I highlighted that one of improvements in Percona Server is support of innodb_log_file_size &#62; 4G. 
The valid question how long is recovery in this case, so let's test it. I took the same tpcc-mysql 1000W workload with 52GB and 144GB innodb_buffer_pool_size with data located on Virident tachIOn card and killed mysqld after 30 mins of work.
The recovery time after start is:
for 52GB innodb_buffer_pool_size:
PLAIN TEXT
CODE:




101220 21:54:31&#160; InnoDB: Database was not shut down normally!


..


101220 22:02:40&#160; InnoDB: Rollback of non-prepared transactions completed 






that is 7min 51sec
for 144GB innodb_buffer_pool_size:
PLAIN TEXT
CODE:




101220 22:45:37&#160; InnoDB: Database was not shut down normally!


&#160;


..


101220 22:55:00&#160; InnoDB: Rollback of non-prepared transactions completed 






that is 9min 23sec
and
for 144GB innodb_buffer_pool_size with data stored on RAID10:
PLAIN TEXT
CODE:




101220 23:46:01&#160; InnoDB: Database was not shut down normally!


..


101221&#160; 0:00:58&#160; InnoDB: Rollback of non-prepared transactions completed 






that is 14min 57sec 
I think this time is acceptable as trade-off for performance.
However it should be taken into account if you use HA solution like DRBD, as it basically means this is time for fail-over period, and your system will be down during this time.
    
    Entry posted by Vadim &#124;
      No comment
    Add to:  &#124;  &#124;  &#124;  &#124;]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://www.mysqlperformanceblog.com/2010/12/21/mysql-5-5-8-and-percona-server-on-fast-flash-card-virident-tachion/">previous posts</a> I highlighted that one of improvements in <a href="http://www.percona.com/software/percona-server/">Percona Server</a> is support of <strong>innodb_log_file_size</strong> > 4G. </p>
<p>The valid question how long is recovery in this case, so let's test it. I took the same tpcc-mysql 1000W workload with 52GB and 144GB <strong>innodb_buffer_pool_size</strong> with data located on Virident tachIOn card and killed mysqld after 30 mins of work.</p>
<p>The recovery time after start is:<br />
for 52GB <strong>innodb_buffer_pool_size</strong>:</p>
<div><span><a href="http://www.mysqlperformanceblog.com">PLAIN TEXT</a></span></div>
<div><span>CODE:</span>
<div>
<div>
<ol>
<li>
<div><span>101220</span> <span>21</span>:<span>54</span>:<span>31</span>&nbsp; InnoDB: Database was not shut down normally!</div>
</li>
<li>
<div>..</div>
</li>
<li>
<div><span>101220</span> <span>22</span>:<span>02</span>:<span>40</span>&nbsp; InnoDB: Rollback of non-prepared transactions completed </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>that is 7min 51sec</p>
<p>for 144GB <strong>innodb_buffer_pool_size</strong>:</p>
<div><span><a href="http://www.mysqlperformanceblog.com">PLAIN TEXT</a></span></div>
<div><span>CODE:</span>
<div>
<div>
<ol>
<li>
<div><span>101220</span> <span>22</span>:<span>45</span>:<span>37</span>&nbsp; InnoDB: Database was not shut down normally!</div>
</li>
<li>
<div>&nbsp;</div>
</li>
<li>
<div>..</div>
</li>
<li>
<div><span>101220</span> <span>22</span>:<span>55</span>:<span>00</span>&nbsp; InnoDB: Rollback of non-prepared transactions completed </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>that is 9min 23sec</p>
<p>and<br />
for 144GB <strong>innodb_buffer_pool_size</strong> with data stored on RAID10:</p>
<div><span><a href="http://www.mysqlperformanceblog.com">PLAIN TEXT</a></span></div>
<div><span>CODE:</span>
<div>
<div>
<ol>
<li>
<div><span>101220</span> <span>23</span>:<span>46</span>:<span>01</span>&nbsp; InnoDB: Database was not shut down normally!</div>
</li>
<li>
<div>..</div>
</li>
<li>
<div><span>101221</span>&nbsp; <span>0</span>:<span>00</span>:<span>58</span>&nbsp; InnoDB: Rollback of non-prepared transactions completed </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>that is 14min 57sec </p>
<p>I think this time is acceptable as trade-off for performance.</p>
<p>However it should be taken into account if you use HA solution like DRBD, as it basically means this is time for fail-over period, and your system will be down during this time.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Vadim |
      <a href="http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/#comments">No comment</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/&amp;title=How%20long%20is%20recovery%20from%208G%20innodb_log_file" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/&amp;title=How%20long%20is%20recovery%20from%208G%20innodb_log_file" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/&amp;title=How%20long%20is%20recovery%20from%208G%20innodb_log_file" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/&amp;T=How%20long%20is%20recovery%20from%208G%20innodb_log_file" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/&amp;title=How%20long%20is%20recovery%20from%208G%20innodb_log_file" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=26828&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=26828&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/12/22/how-long-is-recovery-from-8g-innodb_log_file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lost innodb tables, xfs and binary grep</title>
		<link>http://www.mysqlperformanceblog.com/2010/11/09/lost-innodb-tables-xfs-and-binary-grep/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=lost-innodb-tables-xfs-and-binary-grep</link>
		<comments>http://www.mysqlperformanceblog.com/2010/11/09/lost-innodb-tables-xfs-and-binary-grep/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 10:26:26 +0000</pubDate>
		<dc:creator>MySQL Performance Blog</dc:creator>
				<category><![CDATA[Backups]]></category>
		<category><![CDATA[bgrep]]></category>
		<category><![CDATA[grep]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[xfs]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=3906</guid>
		<description><![CDATA[Before I start a story about the data recovery case I worked on yesterday, here&#8217;s a quick tip &#8211; having a database backup does not mean you can restore from it. Always verify your backup can be used to restore the database! If not automatically, do this manually, at least once a month. No, seriously &#8211; in most of the recovery cases I worked on, customers did have some sort of backup, but it just wasn&#8217;t working, complete and what not. Someone set it up and never bothered to check if it still works after a while.
Anyway, this post is not really about the backups but rather about few interesting things I learned during last recovery case.
First, some facts about the system and how data was lost:

 MySQL had a dedicated partition on XFS file system 
 Server was running innodb_file_per_table 
 There was a production master and two slaves, all had same setting 
 Developer accidentally ran DROP DATABASE X on the wrong machine (production master) 
 All slaves followed and dropped their copy of the data 
 The important tables were all InnoDB 
 Having a backup, customer has first attempted to restore from backup on the production master 

Luckily (or rather, unfortunately) backup only had table definitions but not the data so no data was written to file system. Mind however that restoring a backup could have been fatal if it would have written some junk data as that would have overwritten the deleted files. Now, here&#8217;s what I learned while working on this case:
Recovering from XFS is possible. Just a month ago we had a team meeting in Mallorca where we went through various data loss scenarios. One of them was deleted files on xfs &#8211; we all agreed on few things:

 recovering files from xfs is hard, if at all possible 
 we had no recovery cases on xfs, most likely because: 
 whoever is using xfs, is smart enough to have backups set up properly 

Now I&#8217;m not picking on the customer or anything &#8211; indeed they did have a backup set up, it&#8217;s just that some (most important) tables weren&#8217;t backed up. We did not try any of the file recovery tools for xfs &#8211; apparently they are all targeting specific file types and sure enough InnoDB is not one of the supported files. What we did is we simply ran page_parser on the (already) unmounted file system treating it as a raw device. I was surprised how amazingly simple and fast it was (did you know that latest version of page_parser identifies pages by infimum and supremum records?) &#8211; 10G partition was scanned in like 5 minutes and all 4G of innodb pages were successfully written to a separate partition. That&#8217;s the easy part though &#8211; you run page parser, wait and see what you get.
If InnoDB Data Dictionary was not overwritten by an attempt to restore from the backup, actually second part would&#8217;ve been quite easy too, but it was so I could no longer identify correct PK id for specific tables by just mapping data dictionary table records to index records. Instead I had to grep for specific character sequences against all pages. Note however that only works for text in uncompressed text columns (varchar, char, text) but what if tables don&#8217;t have any text columns at all? Then, you read further.
GNU grep won&#8217;t match binary strings. This isn&#8217;t new, I kind of knew grep couldn&#8217;t look for binary &#8220;junk&#8221;, but I really needed it to. Why? Well, here&#8217;s few of the scenarios we&#8217;ve gone through yesterday:
1. There was this rather big table with integer and enum columns only, where we knew a rather unique PK, well something like 837492636 so we needed a way to find pages that match it. InnoDB would internally store integers in 4-bytes rather than 10 bytes if it were stored as a sequence of characters, so &#8220;grep -r 837492636 /dir&#8221; would not have worked.
2. There was another table, a small one with 4 smallint columns where all we could match on was a sequence of numbers from a single record &#8211; customer knew that there was at least one row with the following sequence: 7, 3, 7, 8. Matching by any of the numbers would be insane as it would match all of the pages while matching on numbers as a sequence of characters would not work for many reasons.
This is where I found bgrep which was exactly the tool for the task. In the case number one, I have just converted number 837492636 to it&#8217;s binary representation 0&#215;31EB1F9C and ran &#8220;bgrep 31EB1F9C /dir&#8221; &#8211; there were only like 10 other matches across the 4 gigabytes of pages, some of them probably from the secondary pages, but when you only have that many pages to check it&#8217;s really simple.
Second case seemed somewhat complicated, but it really wasn&#8217;t &#8211; all of the columns were fixed size &#8211; 2bytes each, so the thing we had to look for was this sequence: 0007000300070008. I was expecting a lot of mismatches but in fact I ended up with only one match pointing exactly to the right page and so the right index id.
The other thing I would note about bgrep &#8211; it was so much faster than matching text using grep, so if you happen to have a lot of data to scan and you have to choose between matching text and number, matching a number using bgrep may work much better.
We are considering shipping bgrep as part of percona recovery toolset, with some additional converters so we can match against various date/time columns as well.
    
    Entry posted by Aurimas Mikalauskas &#124;
      2 comments
    Add to:  &#124;  &#124;  &#124;  &#124; ]]></description>
			<content:encoded><![CDATA[<p>Before I start a story about the <a href="http://www.percona.com/consulting/data-recovery/">data recovery</a> case I worked on yesterday, here&#8217;s a quick tip &#8211; having a <strong>database backup does not mean you can restore from it</strong>. Always verify your backup can be used to restore the database! If not automatically, do this manually, at least once a month. No, seriously &#8211; in most of the recovery cases I worked on, customers did have some sort of backup, but it just wasn&#8217;t working, complete and what not. Someone set it up and never bothered to check if it still works after a while.</p>
<p>Anyway, this post is not really about the backups but rather about few interesting things I learned during last recovery case.</p>
<p>First, some facts about the system and how data was lost:</p>
<ul>
<li> MySQL had a dedicated partition on XFS file system </li>
<li> Server was running innodb_file_per_table </li>
<li> There was a production master and two slaves, all had same setting </li>
<li> Developer accidentally ran DROP DATABASE X on the wrong machine (production master) </li>
<li> All slaves followed and dropped their copy of the data </li>
<li> The important tables were all InnoDB </li>
<li> Having a backup, customer has first attempted to restore from backup on the production master </li>
</ul>
<p>Luckily (or rather, unfortunately) backup only had table definitions but not the data so no data was written to file system. Mind however that restoring a backup could have been fatal if it would have written some junk data as that would have overwritten the deleted files. Now, here&#8217;s what I learned while working on this case:</p>
<p><strong>Recovering from XFS is possible.</strong> Just a month ago we had a team meeting in Mallorca where we went through various data loss scenarios. One of them was deleted files on xfs &#8211; we all agreed on few things:</p>
<ul>
<li> recovering files from xfs is hard, if at all possible </li>
<li> we had no recovery cases on xfs, most likely because: </li>
<li> whoever is using xfs, is smart enough to have backups set up properly </li>
</ul>
<p>Now I&#8217;m not picking on the customer or anything &#8211; indeed they did have a backup set up, it&#8217;s just that some (most important) tables weren&#8217;t backed up. We did not try any of the file recovery tools for xfs &#8211; apparently they are all targeting specific file types and sure enough InnoDB is not one of the supported files. What we did is we simply ran <a href="https://launchpad.net/percona-innodb-recovery-tool">page_parser</a> on the (already) unmounted file system treating it as a raw device. I was surprised how amazingly simple and fast it was (did you know that latest version of page_parser identifies pages by infimum and supremum records?) &#8211; 10G partition was scanned in like 5 minutes and all 4G of innodb pages were successfully written to a separate partition. That&#8217;s the easy part though &#8211; you run page parser, wait and see what you get.</p>
<p>If InnoDB Data Dictionary was not overwritten by an attempt to restore from the backup, actually second part would&#8217;ve been quite easy too, but it was so I could no longer identify correct PK id for specific tables by just mapping data dictionary table records to index records. Instead I had to <em>grep</em> for specific character sequences against all pages. Note however that only works for text in uncompressed text columns (varchar, char, text) but what if tables don&#8217;t have any text columns at all? Then, you read further.</p>
<p><strong>GNU grep won&#8217;t match binary strings.</strong> This isn&#8217;t new, I kind of knew grep couldn&#8217;t look for binary &#8220;junk&#8221;, but I really needed it to. Why? Well, here&#8217;s few of the scenarios we&#8217;ve gone through yesterday:</p>
<p>1. There was this rather big table with integer and enum columns only, where we knew a rather unique PK, well something like 837492636 so we needed a way to find pages that match it. InnoDB would internally store integers in 4-bytes rather than 10 bytes if it were stored as a sequence of characters, so &#8220;grep -r 837492636 /dir&#8221; would not have worked.</p>
<p>2. There was another table, a small one with 4 smallint columns where all we could match on was a sequence of numbers from a single record &#8211; customer knew that there was at least one row with the following sequence: 7, 3, 7, 8. Matching by any of the numbers would be insane as it would match all of the pages while matching on numbers as a sequence of characters would not work for many reasons.</p>
<p>This is where I found <a href="http://debugmo.de/2009/04/bgrep-a-binary-grep/">bgrep</a> which was exactly the tool for the task. In the case number one, I have just converted number 837492636 to it&#8217;s binary representation 0&#215;31EB1F9C and ran &#8220;bgrep 31EB1F9C /dir&#8221; &#8211; there were only like 10 other matches across the 4 gigabytes of pages, some of them probably from the secondary pages, but when you only have that many pages to check it&#8217;s really simple.</p>
<p>Second case seemed somewhat complicated, but it really wasn&#8217;t &#8211; all of the columns were fixed size &#8211; 2bytes each, so the thing we had to look for was this sequence: 0007000300070008. I was expecting a lot of mismatches but in fact I ended up with only one match pointing exactly to the right page and so the right index id.</p>
<p>The other thing I would note about bgrep &#8211; it was so much faster than matching text using grep, so if you happen to have a lot of data to scan and you have to choose between matching text and number, matching a number using bgrep may work much better.</p>
<p>We are considering shipping bgrep as part of percona recovery toolset, with some additional converters so we can match against various date/time columns as well.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Aurimas Mikalauskas |
      <a href="http://www.mysqlperformanceblog.com/2010/11/09/lost-innodb-tables-xfs-and-binary-grep/#comments">2 comments</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2010/11/09/lost-innodb-tables-xfs-and-binary-grep/&amp;title=Lost%20innodb%20tables,%20xfs%20and%20binary%20grep" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2010/11/09/lost-innodb-tables-xfs-and-binary-grep/&amp;title=Lost%20innodb%20tables,%20xfs%20and%20binary%20grep" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2010/11/09/lost-innodb-tables-xfs-and-binary-grep/&amp;title=Lost%20innodb%20tables,%20xfs%20and%20binary%20grep" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2010/11/09/lost-innodb-tables-xfs-and-binary-grep/&amp;T=Lost%20innodb%20tables,%20xfs%20and%20binary%20grep" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2010/11/09/lost-innodb-tables-xfs-and-binary-grep/&amp;title=Lost%20innodb%20tables,%20xfs%20and%20binary%20grep" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=26423&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=26423&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/11/09/lost-innodb-tables-xfs-and-binary-grep/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>An argument for not using mysqldump</title>
		<link>http://www.mysqlperformanceblog.com/2010/11/08/an-argument-for-not-using-mysqldump-in-production/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=an-argument-for-not-using-mysqldump</link>
		<comments>http://www.mysqlperformanceblog.com/2010/11/08/an-argument-for-not-using-mysqldump-in-production/#comments</comments>
		<pubDate>Mon, 08 Nov 2010 17:34:38 +0000</pubDate>
		<dc:creator>Morgan Tocker</dc:creator>
				<category><![CDATA[backup]]></category>
		<category><![CDATA[Backups]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[XtraBackup]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=3886</guid>
		<description><![CDATA[I have a 5G mysqldump which takes 30 minutes to restore from backup.  That means that when the database reaches 50G, it should take 30&#215;10=5 hours to restore.  Right?  Wrong.
Mysqldump recovery time is not linear.  Bigger tables, or tables with more indexes will always take more time to restore.
If I restore from a raw backup (LVM snapshot, xtrabackup, innodb hot backup), it is very easy to model how much longer recovery time will take:
Backup is 80G
Copy is at 70MB/s.
10G is already complete.
= ((80-10) * 1024)/70/60 = ~17 minutes

I can tell progress with mysqldump by monitoring the rate at which show global status like 'Handler_write'; increases and compare it to my knowledge of about how many rows are in each table.  But progress != a magic number like &#8220;17 minutes&#8221;.  Not unless I do a lot of complex modeling.
I am not saying a 5 hour recovery is good or bad.  What I am saying is knowing remaining time is very important during disaster recovery.  Being able to say &#8220;we&#8217;ll be back at 2PM&#8221; is much better than saying &#8220;we&#8217;ll be back between 1PM and 4PM.. maybe&#8221;.
    
    Entry posted by Morgan Tocker &#124;
      No comment
    Add to:  &#124;  &#124;  &#124;  &#124; ]]></description>
			<content:encoded><![CDATA[<p>I have a 5G mysqldump which takes 30 minutes to restore from backup.  That means that when the database reaches 50G, it should take 30&#215;10=5 hours to restore.  Right?  <strong>Wrong.</strong></p>
<p>Mysqldump recovery time is not linear.  Bigger tables, or tables with more indexes will always take more time to restore.</p>
<p>If I restore from a raw backup (LVM snapshot, xtrabackup, innodb hot backup), it is very easy to model how much longer recovery time will take:</p>
<p><code>Backup is 80G<br />
Copy is at 70MB/s.<br />
10G is already complete.<br />
= ((80-10) * 1024)/70/60 = ~17 minutes<br />
</code></p>
<p>I can tell progress with mysqldump by monitoring the rate at which <tt>show global status like 'Handler_write';</tt> increases and compare it to my knowledge of about how many rows are in each table.  But progress != a magic number like &#8220;17 minutes&#8221;.  Not unless I do a lot of complex modeling.</p>
<p>I am not saying a 5 hour recovery is good or bad.  What I am saying is knowing remaining time is very important during disaster recovery.  Being able to say &#8220;we&#8217;ll be back at 2PM&#8221; is much better than saying &#8220;we&#8217;ll be back between 1PM and 4PM.. maybe&#8221;.</p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Morgan Tocker |
      <a href="http://www.mysqlperformanceblog.com/2010/11/08/an-argument-for-not-using-mysqldump-in-production/#comments">No comment</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2010/11/08/an-argument-for-not-using-mysqldump-in-production/&amp;title=An%20argument%20for%20not%20using%20mysqldump" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2010/11/08/an-argument-for-not-using-mysqldump-in-production/&amp;title=An%20argument%20for%20not%20using%20mysqldump" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2010/11/08/an-argument-for-not-using-mysqldump-in-production/&amp;title=An%20argument%20for%20not%20using%20mysqldump" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2010/11/08/an-argument-for-not-using-mysqldump-in-production/&amp;T=An%20argument%20for%20not%20using%20mysqldump" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2010/11/08/an-argument-for-not-using-mysqldump-in-production/&amp;title=An%20argument%20for%20not%20using%20mysqldump" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=26410&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=26410&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/11/08/an-argument-for-not-using-mysqldump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BlitzDB Crash Safety and Auto Recovery</title>
		<link>http://torum.net/2010/07/blitzdb-crash-safety-and-auto-recovery/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=blitzdb-crash-safety-and-auto-recovery</link>
		<comments>http://torum.net/2010/07/blitzdb-crash-safety-and-auto-recovery/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 09:43:14 +0000</pubDate>
		<dc:creator>Toru Maesaka</dc:creator>
				<category><![CDATA[blitzdb]]></category>
		<category><![CDATA[Drizzle]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[OSS]]></category>
		<category><![CDATA[recovery]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://torum.net/?p=2369</guid>
		<description><![CDATA[Crash Safety is a big deal in the database league. Lack of durability can lead to all sorts of terrible things upon a catastrophic event. Many projects, especially in the so called NoSQL world compromises crash safety in return for higher QPS. The argument there is that the availability of the overall system should be accomplished by replication since a database server can&#8217;t be rescued if the physical disk breaks. I happen to agree with this philosophy but I am also aware that this isn&#8217;t a correct answer for everyone. So, what will I do with BlitzDB?
Several relational database hackers have pointed out that BlitzDB isn&#8217;t any safer than MyISAM since it doesn&#8217;t guarantee crash safety. This is currently true but I plan on making BlitzDB much safer than MyISAM by providing following features.

Auto Recovery Routine (startup option)
Tokyo Cabinet&#8217;s Transaction API (table-specific option)

The second feature above would actually guarantee BlitzDB to be crash safe (especially combined with auto recovery) but I won&#8217;t get into depth in this post since this topic deserves a blog post of it&#8217;s own. Let me just state that this feature will be provided in a form like this:

CREATE TABLE t1 &#40;
  a int PRIMARY KEY,
  b varchar&#40;256&#41;
&#41; ENGINE = BLITZDB, CRASH_SAFE;

From here on, I&#8217;ll cover how I plan on hacking auto recovery in BlitzDB.
Auto Recovery Challenges
As I blogged a while back, recovering Tokyo Cabinet is relatively simple. However, this is not a sufficient solution in BlitzDB since the data file (hash database that actually holds the rows) and the index file(s) are independent from each other. That is, the likelihood of the data file and the index file(s) to be inconsistent is very high after a crash. So, how can we hack on this? Pretty simple.
Indexes aren&#8217;t Important at Recovery Phase
Because BlitzDB logically separates the data file and it&#8217;s indexes, index files aren&#8217;t that important. If a server crash had occurred, BlitzDB could delete the index file(s) and recompute them from the data file. Needless to say, this process would involve a lot of random access and computation but it would not dominate the time space of the system since it&#8217;s a one-time cost. This approach however has one flaw in it such that the index files can&#8217;t be recomputed if the data file is broken or is unrecoverable.
Therefore to guarantee crash safety, BlitzDB must ensure that the data file is unbreakable. This is precisely where Tokyo Cabinet&#8217;s Transaction API comes in. I&#8217;m planning on using it to protect the data file from breaking. If the data file is protected, the table can be rescued. Simple!
So, that&#8217;s what I have in mind for making BlitzDB a safer engine. Unfortunately I can&#8217;t start hacking on it immediately since I have several bugs to fix first. Nevertheless I&#8217;m looking forward to start hacking on it. This challenge should be quite fun to tackle.]]></description>
			<content:encoded><![CDATA[<p>Crash Safety is a big deal in the database league. Lack of durability can lead to all sorts of terrible things upon a catastrophic event. Many projects, especially in the so called NoSQL world compromises crash safety in return for higher QPS. The argument there is that the availability of the overall system should be accomplished by replication since a database server can&#8217;t be rescued if the physical disk breaks. I happen to agree with this philosophy but I am also aware that this isn&#8217;t a correct answer for everyone. So, what will I do with BlitzDB?</p>
<p>Several relational database hackers have pointed out that BlitzDB isn&#8217;t any safer than MyISAM since it doesn&#8217;t guarantee crash safety. This is currently true but I plan on making BlitzDB much safer than MyISAM by providing following features.</p>
<ol>
<li>Auto Recovery Routine (startup option)</li>
<li>Tokyo Cabinet&#8217;s Transaction API (table-specific option)</li>
</ol>
<p>The second feature above would actually guarantee BlitzDB to be crash safe (especially combined with auto recovery) but I won&#8217;t get into depth in this post since this topic deserves a blog post of it&#8217;s own. Let me just state that this feature will be provided in a form like this:</p>

<div><div><pre><span>CREATE</span> <span>TABLE</span> t1 <span>&#40;</span>
  a int <span>PRIMARY</span> <span>KEY</span><span>,</span>
  b varchar<span>&#40;</span><span>256</span><span>&#41;</span>
<span>&#41;</span> ENGINE <span>=</span> BLITZDB<span>,</span> CRASH_SAFE;</pre></div></div>

<p>From here on, I&#8217;ll cover how I plan on hacking auto recovery in BlitzDB.</p>
<h3>Auto Recovery Challenges</h3>
<p>As I blogged a while back, <a href="http://torum.net/2010/01/how-to-recover-a-tokyo-cabinet-database-file/">recovering Tokyo Cabinet</a> is relatively simple. However, this is not a sufficient solution in BlitzDB since the data file (hash database that actually holds the rows) and the index file(s) are independent from each other. That is, the likelihood of the data file and the index file(s) to be inconsistent is very high after a crash. So, how can we hack on this? Pretty simple.</p>
<h3>Indexes aren&#8217;t Important at Recovery Phase</h3>
<p>Because BlitzDB logically separates the data file and it&#8217;s indexes, index files aren&#8217;t that important. If a server crash had occurred, BlitzDB could delete the index file(s) and recompute them from the data file. Needless to say, this process would involve a lot of random access and computation but it would not dominate the time space of the system since it&#8217;s a one-time cost. This approach however has one flaw in it such that the index files can&#8217;t be recomputed if the data file is broken or is unrecoverable.</p>
<p>Therefore to guarantee crash safety, BlitzDB must ensure that the data file is unbreakable. This is precisely where Tokyo Cabinet&#8217;s Transaction API comes in. I&#8217;m planning on using it to protect the data file from breaking. If the data file is protected, the table can be rescued. Simple!</p>
<p>So, that&#8217;s what I have in mind for making BlitzDB a safer engine. Unfortunately I can&#8217;t start hacking on it immediately since I have several bugs to fix first. Nevertheless I&#8217;m looking forward to start hacking on it. This challenge should be quite fun to tackle.</p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=25367&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=25367&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/07/22/blitzdb-crash-safety-and-auto-recovery/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recover BLOB fields</title>
		<link>http://www.mysqlperformanceblog.com/2010/07/01/recover-blob-fields/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=recover-blob-fields</link>
		<comments>http://www.mysqlperformanceblog.com/2010/07/01/recover-blob-fields/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 18:00:50 +0000</pubDate>
		<dc:creator>MySQL Performance Blog</dc:creator>
				<category><![CDATA[Backups]]></category>
		<category><![CDATA[InnoDB]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[recovery]]></category>

		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/?p=3228</guid>
		<description><![CDATA[For a long time long types like BLOB, TEXT were not supported by Percona InnoDB Recovery Tool. The reason consists in a special way InnoDB stores BLOBs.
An InnoDB table is stored in a clustered index called PRIMARY. It must exist even if a user hasn't defined the primary index. The PRIMARY index pages are identified by 8-bytes number index_id. The highest 4 bytes are always 0, so index_id is often notated as o:&#60;4 bytes number&#62;, e.g. 0:258. The pages are ordered in a binary tree. Primary index is used as a key. Inside a page records are stored in a linked list.
InnoDB page by default is 16k. Obviously if a record is too long, a single page can't store it. If the total record size is less than UNIV_PAGE_SIZE/2 - 200 (this is roughly 7k) then the full record is stored in the page of PRIMARY index. Let's call it internal. In InnoDB sources they have type FIL_PAGE_INDEX*. If the record is longer than 7k bytes, only first 768 bytes of every BLOB field are stored internally. The rest is stored in external pages. They have type FIL_PAGE_TYPE_BLOB. Page type is stored in a FIL_PAGE_TYPE field of the page header . In an earlier post Peter described in details how BLOBs are stored.
Let me illustrate a record format of the example of the table:
PLAIN TEXT
CODE:




CREATE TABLE `t1` &#40;


`ID` int&#40;11&#41; unsigned NOT NULL,


`NAME` varchar&#40;120&#41;,


`N_FIELDS` int&#40;10&#41;,


PRIMARY KEY &#40;`ID`&#41;


&#41; ENGINE=InnoDB DEFAULT


CHARSET=latin1 






Here COMPACT format is used, which is default in MySQL &#62;= 5.1.

The record consists of four parts:

Offsets. Effectively these are field lengths. Only variable length types have offsets. The offset can be one or two bytes depending on maximum field size. The highest bit of the offset is 1 if the field is stored in external pages (i.e. long BLOB field)
NULL fields. A bit per NULL-able field padded to minimum number of bytes to store all flags.
So called extra bytes. These are 5 bytes where different flags are stored like "record is deleted" flag. The last two bytes are the relative pointer to the next record in the page.
User data. TRX_ID is a transaction id. PTR_ID is a pointer in a rollback segment to the old version of the record.

So if a field is the long one, it has 1) The highest bit of the offset is set to "1", 2) After 768 bytes there are 20 bytes in the end where the following:

BTR_EXTERN_SPACE_ID - space id where the next piece of the field is stored
BTR_EXTERN_PAGE_NO - page id
BTR_EXTERN_OFFSET - offset inside a page. An external page has a header. The similar pointer to the next page is stored in it.
BTR_EXTERN_LEN - length of the next piece.

The external pages are linked until BTR_EXTERN_PAGE_NO is FIL_NULL.
Percona InnoDB Recovery Tool supports now recovery of long fields. It is still in development branch, but should be released after QA tests.
The complexity of BLOB fields brings prerequisites to successfully recover a record with BLOB : all pieces of the BLOB field must be reachable by pointers. That means BTR_EXTERN_PAGE_NO, BTR_EXTERN_OFFSET and BTR_EXTERN_LEN must not be corrupted.
The tool outputs the recovered table in tab-separated values format. BLOBs are printed in a hex form - 0ACD86...
To upload the table back you should utilize UNHEX function:
PLAIN TEXT
CODE:




mysql&#62;


LOAD DATA INFILE '/path/to/datafile'


REPLACE INTO TABLE &#60;table_name&#62;


FIELDS TERMINATED BY '\t'


OPTIONALLY ENCLOSED BY '&#34;'


LINES STARTING BY '&#60;table_name&#62;\t'


&#40;id,sessionid,uniqueid,username,nasipaddress,@var1,@var2,etc&#41;


SET


&#160; blobfield = UNHEX&#40;@var1&#41;,


&#160; datefield2 = FROM_UNIXTIME&#40;@var2,'%Y %D %M %h:%i:%s %x'&#41;; 






* - there is a typo in Recovery of Lost or Corrupted InnoDB Tables Presentation
    
    Entry posted by Aleksandr Kuzminsky &#124;
      No comment
    Add to:  &#124;  &#124;  &#124;  &#124; ]]></description>
			<content:encoded><![CDATA[<p>For a long time long types like BLOB, TEXT were not supported by Percona InnoDB Recovery Tool. The reason consists in a special way InnoDB stores BLOBs.</p>
<p>An InnoDB table is stored in a clustered index called PRIMARY. It must exist even if a user hasn't defined the primary index. The PRIMARY index pages are identified by 8-bytes number index_id. The highest 4 bytes are always 0, so index_id is often notated as o:&lt;4 bytes number&gt;, e.g. 0:258. The pages are ordered in a binary tree. Primary index is used as a key. Inside a page records are stored in a linked list.</p>
<p>InnoDB page by default is 16k. Obviously if a record is too long, a single page can't store it. If the total record size is less than UNIV_PAGE_SIZE/2 - 200 (this is roughly 7k) then the full record is stored in the page of PRIMARY index. Let's call it internal. In InnoDB sources they have type FIL_PAGE_INDEX<sup>*</sup>. If the record is longer than 7k bytes, only first 768 bytes of every BLOB field are stored internally. The rest is stored in external pages. They have type FIL_PAGE_TYPE_BLOB. Page type is stored in a FIL_PAGE_TYPE field of the page header . In an <a href="http:/http%3A//www.mysqlperformanceblog.com/2010/02/09/blob-storage-in-innodb//">earlier post</a> Peter described in details how BLOBs are stored.</p>
<p>Let me illustrate a record format of the example of the table:</p>
<div><span><a href="http://www.mysqlperformanceblog.com">PLAIN TEXT</a></span></div>
<div><span>CODE:</span>
<div>
<div>
<ol>
<li>
<div>CREATE TABLE `t1` <span>&#40;</span></div>
</li>
<li>
<div>`ID` int<span>&#40;</span><span>11</span><span>&#41;</span> unsigned NOT NULL,</div>
</li>
<li>
<div>`NAME` varchar<span>&#40;</span><span>120</span><span>&#41;</span>,</div>
</li>
<li>
<div>`N_FIELDS` int<span>&#40;</span><span>10</span><span>&#41;</span>,</div>
</li>
<li>
<div>PRIMARY KEY <span>&#40;</span>`ID`<span>&#41;</span></div>
</li>
<li>
<div><span>&#41;</span> ENGINE=InnoDB DEFAULT</div>
</li>
<li>
<div>CHARSET=latin1 </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Here COMPACT format is used, which is default in MySQL &gt;= 5.1.</p>
<p><a href="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/07/record-format1.png"><img class="alignnone size-full wp-image-3232" title="record format" src="http://www.mysqlperformanceblog.com/wp-content/uploads/2010/07/record-format1.png" alt="" width="701" height="393" /></a></p>
<p>The record consists of four parts:</p>
<ol>
<li><strong>Offsets</strong>. Effectively these are field lengths. Only variable length types have offsets. The offset can be one or two bytes depending on maximum field size. The highest bit of the offset is 1 if the field is stored in external pages (i.e. long BLOB field)</li>
<li><strong>NULL fields</strong>. A bit per NULL-able field padded to minimum number of bytes to store all flags.</li>
<li>So called <strong>extra bytes</strong>. These are 5 bytes where different flags are stored like "record is deleted" flag. The last two bytes are the relative pointer to the next record in the page.</li>
<li><strong>User data</strong>. TRX_ID is a transaction id. PTR_ID is a pointer in a rollback segment to the old version of the record.</li>
</ol>
<p>So if a field is the long one, it has 1) The highest bit of the offset is set to "1", 2) After 768 bytes there are 20 bytes in the end where the following:</p>
<ol>
<li><strong>BTR_EXTERN_SPACE_ID</strong> - space id where the next piece of the field is stored</li>
<li><strong>BTR_EXTERN_PAGE_NO</strong> - page id</li>
<li><strong>BTR_EXTERN_OFFSET</strong> - offset inside a page. An external page has a header. The similar pointer to the next page is stored in it.</li>
<li><strong>BTR_EXTERN_LEN</strong> - length of the next piece.</li>
</ol>
<p>The external pages are linked until BTR_EXTERN_PAGE_NO is FIL_NULL.</p>
<p><a href="https://launchpad.net/percona-innodb-recovery-tool">Percona InnoDB Recovery Tool</a> supports now recovery of long fields. It is still in development branch, but should be released after QA tests.</p>
<p>The complexity of BLOB fields brings prerequisites to successfully recover a record with BLOB : all pieces of the BLOB field must be reachable by pointers. That means BTR_EXTERN_PAGE_NO, BTR_EXTERN_OFFSET and BTR_EXTERN_LEN must not be corrupted.</p>
<p>The tool outputs the recovered table in tab-separated values format. BLOBs are printed in a hex form - 0ACD86...</p>
<p>To upload the table back you should utilize UNHEX function:</p>
<div><span><a href="http://www.mysqlperformanceblog.com">PLAIN TEXT</a></span></div>
<div><span>CODE:</span>
<div>
<div>
<ol>
<li>
<div>mysql&gt;</div>
</li>
<li>
<div>LOAD DATA INFILE <span>'/path/to/datafile'</span></div>
</li>
<li>
<div>REPLACE INTO TABLE &lt;table_name&gt;</div>
</li>
<li>
<div>FIELDS TERMINATED BY <span>'<span>\t</span>'</span></div>
</li>
<li>
<div>OPTIONALLY ENCLOSED BY <span>'&quot;'</span></div>
</li>
<li>
<div>LINES STARTING BY <span>'&lt;table_name&gt;<span>\t</span>'</span></div>
</li>
<li>
<div><span>&#40;</span>id,sessionid,uniqueid,username,nasipaddress,@var1,@var2,etc<span>&#41;</span></div>
</li>
<li>
<div>SET</div>
</li>
<li>
<div>&nbsp; blobfield = UNHEX<span>&#40;</span>@var1<span>&#41;</span>,</div>
</li>
<li>
<div>&nbsp; datefield2 = FROM_UNIXTIME<span>&#40;</span>@var2,<span>'%Y %D %M %h:%i:%s %x'</span><span>&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>* - there is a typo in <a href="http://assets.en.oreilly.com/1/event/36/Recovery%20of%20Lost%20or%20Corrupted%20InnoDB%20Tables%20Presentation.pdf">Recovery of Lost or Corrupted InnoDB Tables Presentation</a></p>
    <hr noshade style="margin:0;height:1px" />
    <p>Entry posted by Aleksandr Kuzminsky |
      <a href="http://www.mysqlperformanceblog.com/2010/07/01/recover-blob-fields/#comments">No comment</a></p>
    <p>Add to: <a href="http://del.icio.us/post?url=http://www.mysqlperformanceblog.com/2010/07/01/recover-blob-fields/&amp;title=Recover%20BLOB%20fields" title="Bookmark this post on del.icio.us"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/delicious.png" alt="delicious" /></a> | <a href="http://digg.com/submit?phase=2&amp;url=http://www.mysqlperformanceblog.com/2010/07/01/recover-blob-fields/&amp;title=Recover%20BLOB%20fields" title="Digg this post on Digg.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/digg.png" alt="digg" /></a> | <a href="http://reddit.com/submit?url=http://www.mysqlperformanceblog.com/2010/07/01/recover-blob-fields/&amp;title=Recover%20BLOB%20fields" title="Submit this post on reddit.com"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/reddit.png" alt="reddit" /></a> | <a href="http://www.netscape.com/submit/?U=http://www.mysqlperformanceblog.com/2010/07/01/recover-blob-fields/&amp;T=Recover%20BLOB%20fields" title="Vote for this article on Netscape"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/netscape.gif" alt="netscape" /></a> | <a href="http://www.google.com/bookmarks/mark?op=add&amp;bkmk=http://www.mysqlperformanceblog.com/2010/07/01/recover-blob-fields/&amp;title=Recover%20BLOB%20fields" title="Add to Google Bookmarks"><img src="http://www.mysqlperformanceblog.com/wp-content/themes/boxy-but-gold/images/google.png" alt="Google Bookmarks" /></a></p><br/>PlanetMySQL Voting:
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=25184&vote=1&apivote=1">Vote UP</a> /
	 <a href="http://planet.mysql.com/entry/vote/?entry_id=25184&vote=-1&apivote=1">Vote DOWN</a>]]></content:encoded>
			<wfw:commentRss>http://planetmysql.ru/2010/07/01/recover-blob-fields/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

