<?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: Block device snapshots in NetBSD</title>
	<atom:link href="http://www.snell-pym.org.uk/archives/2008/12/03/block-device-snapshots-in-netbsd/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.snell-pym.org.uk/archives/2008/12/03/block-device-snapshots-in-netbsd/</link>
	<description>Sarah and Alaric Snell-Pym living in interesting times</description>
	<pubDate>Thu, 09 Feb 2012 03:18:10 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: alaric</title>
		<link>http://www.snell-pym.org.uk/archives/2008/12/03/block-device-snapshots-in-netbsd/comment-page-1/#comment-83787</link>
		<dc:creator>alaric</dc:creator>
		<pubDate>Thu, 11 Dec 2008 12:11:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.snell-pym.org.uk/?p=873#comment-83787</guid>
		<description>&lt;p&gt;I meant an &lt;em&gt;atomic&lt;/em&gt; sync rather than an &lt;em&gt;automatic&lt;/em&gt; sync. In a single operation, sync the filesystem and then snapshot it. So, yes, stop the world for a few ms! I suspect that's how VMware does it? When you install the VMware tools, it's meant to make "better" snapshots in some way, which might be just that, forcing a complete sync.&lt;/p&gt;

&lt;p&gt;That's only supported on FSes that declare they are re-entrant enough to support it - just FFS for now :-) For FAT et al, the snapshot needs to be on another filesystem (which can be another of the same type, as long as it's a different mount).&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I meant an <em>atomic</em> sync rather than an <em>automatic</em> sync. In a single operation, sync the filesystem and then snapshot it. So, yes, stop the world for a few ms! I suspect that's how VMware does it? When you install the VMware tools, it's meant to make "better" snapshots in some way, which might be just that, forcing a complete sync.</p>

<p>That's only supported on FSes that declare they are re-entrant enough to support it - just FFS for now <img src='http://www.snell-pym.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> For FAT et al, the snapshot needs to be on another filesystem (which can be another of the same type, as long as it's a different mount).</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.snell-pym.org.uk/archives/2008/12/03/block-device-snapshots-in-netbsd/comment-page-1/#comment-83786</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 11 Dec 2008 11:48:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.snell-pym.org.uk/?p=873#comment-83786</guid>
		<description>&lt;p&gt;There's still a race condition even with an automatic sync, unless the world stops.&lt;/p&gt;

&lt;p&gt;Volume manager: My bad. But fss is even more of a nasty design than a volume manager. I hate to think what it's doing to allow the snapshot to live on the FS it's snapshotting.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>There's still a race condition even with an automatic sync, unless the world stops.</p>

<p>Volume manager: My bad. But fss is even more of a nasty design than a volume manager. I hate to think what it's doing to allow the snapshot to live on the FS it's snapshotting.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: alaric</title>
		<link>http://www.snell-pym.org.uk/archives/2008/12/03/block-device-snapshots-in-netbsd/comment-page-1/#comment-83782</link>
		<dc:creator>alaric</dc:creator>
		<pubDate>Thu, 11 Dec 2008 10:19:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.snell-pym.org.uk/?p=873#comment-83782</guid>
		<description>&lt;p&gt;Ok!&lt;/p&gt;

&lt;p&gt;Consistency: I was thinking that it'd be nice if the kernel atomically did a &lt;code&gt;sync&lt;/code&gt; before taking the snapshot, in order to flush all pending data and metadata to the filesystem so it's in a consistent state, then it occurred to me that perhaps it does; I'd have to read the source to check. In which case, the warning about mounting a non-cleanly-unmounted filesystem when mounting a snapshot can safely be ignored. Even for a busy FS, this would mean that a snapshot just meant a short interruption in throughput.&lt;/p&gt;

&lt;p&gt;Duplication: What volume manager? The &lt;code&gt;fss&lt;/code&gt; snapshot driver just stores the snapshot in a file. Thus reusing the filesystem's block allocator. And what 2Gb file are you referring to?&lt;/p&gt;

&lt;p&gt;Performance: Again, what volume manager? &lt;code&gt;fss&lt;/code&gt; will hurt performance of the original disk during operation since it's doing a copy-on-write snapshot, so every write to the original disk becomes a read-write-write cycle, but not reads as they can just go straight to the original disk; while the snapshot virtual-disk is read-only, its reads will be a bit slower since they amount to looking the block up in an index structure in the snapshot file or falling back to the original disk. However, performance of the snapshot virtual-disk isn't really critical; the only real cost is the copy-on-write on the original disk. But this isn't hiding any details of the discs from the FS, it's just interposing an extra copy on write, and one that goes away as soon as you've removed the snapshot.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Ok!</p>

<p>Consistency: I was thinking that it'd be nice if the kernel atomically did a <code>sync</code> before taking the snapshot, in order to flush all pending data and metadata to the filesystem so it's in a consistent state, then it occurred to me that perhaps it does; I'd have to read the source to check. In which case, the warning about mounting a non-cleanly-unmounted filesystem when mounting a snapshot can safely be ignored. Even for a busy FS, this would mean that a snapshot just meant a short interruption in throughput.</p>

<p>Duplication: What volume manager? The <code>fss</code> snapshot driver just stores the snapshot in a file. Thus reusing the filesystem's block allocator. And what 2Gb file are you referring to?</p>

<p>Performance: Again, what volume manager? <code>fss</code> will hurt performance of the original disk during operation since it's doing a copy-on-write snapshot, so every write to the original disk becomes a read-write-write cycle, but not reads as they can just go straight to the original disk; while the snapshot virtual-disk is read-only, its reads will be a bit slower since they amount to looking the block up in an index structure in the snapshot file or falling back to the original disk. However, performance of the snapshot virtual-disk isn't really critical; the only real cost is the copy-on-write on the original disk. But this isn't hiding any details of the discs from the FS, it's just interposing an extra copy on write, and one that goes away as soon as you've removed the snapshot.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.snell-pym.org.uk/archives/2008/12/03/block-device-snapshots-in-netbsd/comment-page-1/#comment-83780</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 11 Dec 2008 10:04:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.snell-pym.org.uk/?p=873#comment-83780</guid>
		<description>&lt;p&gt;Consistency: How do you know the FS is consistent before making a snapshot it? Can you ever snapshot a busy FS?&lt;/p&gt;

&lt;p&gt;Duplicate databases: Both the FS and volume manager do block allocation. So two bits of duplicate code to go wrong, plus the volume manager doesn't know it can reuse the blocks when you delete that 2Gb file.&lt;/p&gt;

&lt;p&gt;Performance: The volume manager hides details of the discs from the FS which can be used to increase performance. See how fast Sun's ZFS + write optimised flash + read optimised flash + slow SATA discs combination goes in it's new Amber Road products for an example of why you'd want such a blatant layering violation.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Consistency: How do you know the FS is consistent before making a snapshot it? Can you ever snapshot a busy FS?</p>

<p>Duplicate databases: Both the FS and volume manager do block allocation. So two bits of duplicate code to go wrong, plus the volume manager doesn't know it can reuse the blocks when you delete that 2Gb file.</p>

<p>Performance: The volume manager hides details of the discs from the FS which can be used to increase performance. See how fast Sun's ZFS + write optimised flash + read optimised flash + slow SATA discs combination goes in it's new Amber Road products for an example of why you'd want such a blatant layering violation.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: alaric</title>
		<link>http://www.snell-pym.org.uk/archives/2008/12/03/block-device-snapshots-in-netbsd/comment-page-1/#comment-83756</link>
		<dc:creator>alaric</dc:creator>
		<pubDate>Wed, 10 Dec 2008 23:23:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.snell-pym.org.uk/?p=873#comment-83756</guid>
		<description>&lt;p&gt;I think it's bad layering to put snapshots in at the FS level.&lt;/p&gt;

&lt;p&gt;For a start, it's much more complex to implement at that level. More bloated code to harbour bugs. Block-level snapshotting is much easier to validate, which is nice for something trusted with our MP3 stashes.&lt;/p&gt;

&lt;p&gt;And snapshots at the FS level make your snapshot system orthogonal to your file system, so they can be chosen and developed independently. Under NetBSD's system, I can happily snapshot a FAT32 filesystem.&lt;/p&gt;

&lt;p&gt;What the &lt;code&gt;fss&lt;/code&gt; driver does is the same thing NetApp does when used as an iSCSI target rather than an NFS server, or what virtualisation systems do when snapshotting a virtual disk - it's a tried and tested technique. It's just nice to have it available at the OS level...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I think it's bad layering to put snapshots in at the FS level.</p>

<p>For a start, it's much more complex to implement at that level. More bloated code to harbour bugs. Block-level snapshotting is much easier to validate, which is nice for something trusted with our MP3 stashes.</p>

<p>And snapshots at the FS level make your snapshot system orthogonal to your file system, so they can be chosen and developed independently. Under NetBSD's system, I can happily snapshot a FAT32 filesystem.</p>

<p>What the <code>fss</code> driver does is the same thing NetApp does when used as an iSCSI target rather than an NFS server, or what virtualisation systems do when snapshotting a virtual disk - it's a tried and tested technique. It's just nice to have it available at the OS level...</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.snell-pym.org.uk/archives/2008/12/03/block-device-snapshots-in-netbsd/comment-page-1/#comment-83413</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Thu, 04 Dec 2008 10:06:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.snell-pym.org.uk/?p=873#comment-83413</guid>
		<description>&lt;p&gt;Sounds like a horrid hack.&lt;/p&gt;

&lt;p&gt;Shouldn't it be supported at the FS level? Like ZFS and the NetApp stuff.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Sounds like a horrid hack.</p>

<p>Shouldn't it be supported at the FS level? Like ZFS and the NetApp stuff.</p>]]></content:encoded>
	</item>
</channel>
</rss>

