<?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: XFS Snapshots with LVM2</title>
	<atom:link href="http://www.paragon-cs.com/wordpress/?feed=rss2&#038;p=67" rel="self" type="application/rss+xml" />
	<link>http://www.paragon-cs.com/wordpress/?p=67</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 21 Oct 2009 14:10:28 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: k-gee</title>
		<link>http://www.paragon-cs.com/wordpress/?p=67&#038;cpage=1#comment-1015</link>
		<dc:creator>k-gee</dc:creator>
		<pubDate>Wed, 20 Feb 2008 09:29:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.paragon-cs.com/wordpress/?p=67#comment-1015</guid>
		<description>lvm2 kind of knows about xfs and thus applies the xfs_freeze command automatically .... therefore it hangs if you try to apply it by hand.</description>
		<content:encoded><![CDATA[<p>lvm2 kind of knows about xfs and thus applies the xfs_freeze command automatically &#8230;. therefore it hangs if you try to apply it by hand.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.paragon-cs.com/wordpress/?p=67&#038;cpage=1#comment-1017</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sat, 19 Jan 2008 01:26:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.paragon-cs.com/wordpress/?p=67#comment-1017</guid>
		<description>I haven&#039;t had time to really look into this more (other than insuring my lvm backups weren&#039;t done off xfs partitions).  However, I had another interesting experience just yesterday.  I had upgrade a server and went to resync it off the master.  I realized when I went to do it that the master data partition was xfs.  Since I had already started I went ahead and did the transfer and started it (the slave) up.  Surprisingly it worked.

I had  tried the same thing on the previous set of servers at least four times without success.  It took a relatively long time to start up, but it did.  I don&#039;t have any explanation at this point.  My only guess might be some hardware difference causing a problem on the first setup.</description>
		<content:encoded><![CDATA[<p>I haven&#8217;t had time to really look into this more (other than insuring my lvm backups weren&#8217;t done off xfs partitions).  However, I had another interesting experience just yesterday.  I had upgrade a server and went to resync it off the master.  I realized when I went to do it that the master data partition was xfs.  Since I had already started I went ahead and did the transfer and started it (the slave) up.  Surprisingly it worked.</p>
<p>I had  tried the same thing on the previous set of servers at least four times without success.  It took a relatively long time to start up, but it did.  I don&#8217;t have any explanation at this point.  My only guess might be some hardware difference causing a problem on the first setup.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron</title>
		<link>http://www.paragon-cs.com/wordpress/?p=67&#038;cpage=1#comment-1016</link>
		<dc:creator>Aaron</dc:creator>
		<pubDate>Sat, 19 Jan 2008 00:48:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.paragon-cs.com/wordpress/?p=67#comment-1016</guid>
		<description>Does anyone have more information about LVM &quot;knowing about&quot; XFS? I&#039;m currently running XFS on Suse 10.1 with LVM2 version 2.02. I must be using an older version than people on here because I don&#039;t see the lvcreate hanging behavior. In fact, I have to run xfs_freeze before lvcreate or I end up with corrupted tables. I&#039;d really appreciate it if someone could point me towards some more in depth information with regard to XFS and LVM2.

Thanks,
-Aaron</description>
		<content:encoded><![CDATA[<p>Does anyone have more information about LVM &#8220;knowing about&#8221; XFS? I&#8217;m currently running XFS on Suse 10.1 with LVM2 version 2.02. I must be using an older version than people on here because I don&#8217;t see the lvcreate hanging behavior. In fact, I have to run xfs_freeze before lvcreate or I end up with corrupted tables. I&#8217;d really appreciate it if someone could point me towards some more in depth information with regard to XFS and LVM2.</p>
<p>Thanks,<br />
-Aaron</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.paragon-cs.com/wordpress/?p=67&#038;cpage=1#comment-1018</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Mon, 31 Dec 2007 04:45:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.paragon-cs.com/wordpress/?p=67#comment-1018</guid>
		<description>Kristian,

I have used the mylvmbackup tool before.  I didn&#039;t in this case but you are right -- it just duplicates the steps you  outlined.  Those steps are exactly what I did except I didn&#039;t do step one.  I started with the &#039;flush tables with read lock&#039;.  All other steps where the same.  And executing the &#039;flush tables&#039; first, if I understand, just makes the &#039;flush tables with read lock&#039; execute faster.

So, I still don&#039;t know why it happens.</description>
		<content:encoded><![CDATA[<p>Kristian,</p>
<p>I have used the mylvmbackup tool before.  I didn&#8217;t in this case but you are right &#8212; it just duplicates the steps you  outlined.  Those steps are exactly what I did except I didn&#8217;t do step one.  I started with the &#8216;flush tables with read lock&#8217;.  All other steps where the same.  And executing the &#8216;flush tables&#8217; first, if I understand, just makes the &#8216;flush tables with read lock&#8217; execute faster.</p>
<p>So, I still don&#8217;t know why it happens.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kristian Köhntopp</title>
		<link>http://www.paragon-cs.com/wordpress/?p=67&#038;cpage=1#comment-1023</link>
		<dc:creator>Kristian Köhntopp</dc:creator>
		<pubDate>Sun, 30 Dec 2007 22:50:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.paragon-cs.com/wordpress/?p=67#comment-1023</guid>
		<description>There is a tool &quot;mylvmbackup&quot; at http://lenz.homelinux.org/mylvmbackup/ written by MySQL&#039;s Lenz Grimmer. It will do everything for you.

The procedure basically is

1. FLUSH TABLES. Force MyISAM buffers to disk as far as possible. Does not lock.
2. FLUSH TABLES WITH READ LOCK. Force MyISAM buffers to disk that have been dirtied since the last FLUSH TABLES. This time, all writeres are stalled.
3. lvcreate -s the snap.
4. UNLOCK TABLES, writers resume.

5. Mount the snap, using -o nouuid in the case of XFS.
6. tar and rsync the snap away.
7. Destroy the snap.

Optionally, a step 5b is performed, starting a secondary server on a different port for InnoDB log recovery before backup. This code currently is slightly broken.

The xfs_freeze is no longer necessary with LVM2. LVM2 and XFS know of each other and will do just fine. As you observed, it does not even work any longer. That is precisely because of the XFS lock around the lvcreate -s.

When moving InnoDB it is very important to get the actual error message from the log. It is also very important to have the my.cnf file with the exact original InnoDB tablespace parameters and match it to the copy. InnoDB will not start if the tablespace declarations of the log size declarations are botched. The actual exact error message from the log will tell you.

An lvcreate -s of an InnoDB is recording InnoDB in a &quot;crashed&quot; state - when you mount and copy that InnoDB, it will be reported as crashed and will do a Redo and an Undo log recovery. That is normal and not a problem - FLUSH TABLES WITH READ LOCK does not flush the dirty blocks from the InnoDB buffer pool. It will however force out all outstanding Redo and Undo log writes, so the snapshot will be complete and after log recovery also consistent. It is just that the log recovery will need to be performed. A wait is not necessary.</description>
		<content:encoded><![CDATA[<p>There is a tool &#8220;mylvmbackup&#8221; at <a href="http://lenz.homelinux.org/mylvmbackup/" rel="nofollow">http://lenz.homelinux.org/mylvmbackup/</a> written by MySQL&#8217;s Lenz Grimmer. It will do everything for you.</p>
<p>The procedure basically is</p>
<p>1. FLUSH TABLES. Force MyISAM buffers to disk as far as possible. Does not lock.<br />
2. FLUSH TABLES WITH READ LOCK. Force MyISAM buffers to disk that have been dirtied since the last FLUSH TABLES. This time, all writeres are stalled.<br />
3. lvcreate -s the snap.<br />
4. UNLOCK TABLES, writers resume.</p>
<p>5. Mount the snap, using -o nouuid in the case of XFS.<br />
6. tar and rsync the snap away.<br />
7. Destroy the snap.</p>
<p>Optionally, a step 5b is performed, starting a secondary server on a different port for InnoDB log recovery before backup. This code currently is slightly broken.</p>
<p>The xfs_freeze is no longer necessary with LVM2. LVM2 and XFS know of each other and will do just fine. As you observed, it does not even work any longer. That is precisely because of the XFS lock around the lvcreate -s.</p>
<p>When moving InnoDB it is very important to get the actual error message from the log. It is also very important to have the my.cnf file with the exact original InnoDB tablespace parameters and match it to the copy. InnoDB will not start if the tablespace declarations of the log size declarations are botched. The actual exact error message from the log will tell you.</p>
<p>An lvcreate -s of an InnoDB is recording InnoDB in a &#8220;crashed&#8221; state &#8211; when you mount and copy that InnoDB, it will be reported as crashed and will do a Redo and an Undo log recovery. That is normal and not a problem &#8211; FLUSH TABLES WITH READ LOCK does not flush the dirty blocks from the InnoDB buffer pool. It will however force out all outstanding Redo and Undo log writes, so the snapshot will be complete and after log recovery also consistent. It is just that the log recovery will need to be performed. A wait is not necessary.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.paragon-cs.com/wordpress/?p=67&#038;cpage=1#comment-1021</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 30 Dec 2007 01:30:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.paragon-cs.com/wordpress/?p=67#comment-1021</guid>
		<description>Partha,

I am aware of the parameters to use with mounting.  So you just issue a &#039;flush tables with read lock&#039; on a running server and wait for some period of time..then do the lvm snapshot?  Or are you doing something else?  If so, please outline as there seem to be a number of people who have run into this..

thanks,

keith</description>
		<content:encoded><![CDATA[<p>Partha,</p>
<p>I am aware of the parameters to use with mounting.  So you just issue a &#8216;flush tables with read lock&#8217; on a running server and wait for some period of time..then do the lvm snapshot?  Or are you doing something else?  If so, please outline as there seem to be a number of people who have run into this..</p>
<p>thanks,</p>
<p>keith</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Partha Dutta</title>
		<link>http://www.paragon-cs.com/wordpress/?p=67&#038;cpage=1#comment-1022</link>
		<dc:creator>Partha Dutta</dc:creator>
		<pubDate>Sat, 29 Dec 2007 17:33:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.paragon-cs.com/wordpress/?p=67#comment-1022</guid>
		<description>We also use XFS for our reporting server farm for InnoDB. We routinely rsync the filesystem to other servers using LVM snapshots without problems.

What we have found out is that we wait till the innodb buffer pool finishes flushing to disk before creating the snapshot. Also, when mounting the snapshot, we have to mount it a special way, else LVM runs into issues. For example: mount -onouuid,ro /dev/sysvg/mysql2 /inno2

With this, we have flawless snapshoting and rsync capabilities. Hope this helps.

Partha</description>
		<content:encoded><![CDATA[<p>We also use XFS for our reporting server farm for InnoDB. We routinely rsync the filesystem to other servers using LVM snapshots without problems.</p>
<p>What we have found out is that we wait till the innodb buffer pool finishes flushing to disk before creating the snapshot. Also, when mounting the snapshot, we have to mount it a special way, else LVM runs into issues. For example: mount -onouuid,ro /dev/sysvg/mysql2 /inno2</p>
<p>With this, we have flawless snapshoting and rsync capabilities. Hope this helps.</p>
<p>Partha</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: William</title>
		<link>http://www.paragon-cs.com/wordpress/?p=67&#038;cpage=1#comment-1020</link>
		<dc:creator>William</dc:creator>
		<pubDate>Fri, 28 Dec 2007 15:40:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.paragon-cs.com/wordpress/?p=67#comment-1020</guid>
		<description>Thanks for the tip. I was thinking about migrating to xfs the for our new servers. I think that will have to be shelved for now.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip. I was thinking about migrating to xfs the for our new servers. I think that will have to be shelved for now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Moody</title>
		<link>http://www.paragon-cs.com/wordpress/?p=67&#038;cpage=1#comment-1019</link>
		<dc:creator>Michael Moody</dc:creator>
		<pubDate>Fri, 28 Dec 2007 09:02:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.paragon-cs.com/wordpress/?p=67#comment-1019</guid>
		<description>Just a mention here, we were looking for decent mysql backup solutions for a while, and while the lvm method works fine, we also stumbled across a company called r1soft (r1soft.com) that makes a fairly good hot backup software, working on the same principle as the lvm method.

Let me know if you get the xfs/lvm2 snapshot working, I&#039;d be very interested to know how.

Michael</description>
		<content:encoded><![CDATA[<p>Just a mention here, we were looking for decent mysql backup solutions for a while, and while the lvm method works fine, we also stumbled across a company called r1soft (r1soft.com) that makes a fairly good hot backup software, working on the same principle as the lvm method.</p>
<p>Let me know if you get the xfs/lvm2 snapshot working, I&#8217;d be very interested to know how.</p>
<p>Michael</p>
]]></content:encoded>
	</item>
</channel>
</rss>
