<?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: How I plan to implement my own WHS Drive Extender-like system [UPDATED]</title>
	<atom:link href="http://www.pommepause.com/blog/2009/11/how-i-plan-to-implement-my-own-whs-drive-extender-like-system/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pommepause.com/blog/2009/11/how-i-plan-to-implement-my-own-whs-drive-extender-like-system/</link>
	<description>My Geek Life</description>
	<lastBuildDate>Thu, 02 Feb 2012 13:05:50 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Guillaume Boudreau</title>
		<link>http://www.pommepause.com/blog/2009/11/how-i-plan-to-implement-my-own-whs-drive-extender-like-system/comment-page-1/#comment-994</link>
		<dc:creator>Guillaume Boudreau</dc:creator>
		<pubDate>Sun, 28 Nov 2010 12:49:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.pommepause.com/blog/?p=121#comment-994</guid>
		<description>I was a ZFS user in the past (on Nexenta), but gave up when I tried to add drives to my zpool.
I was using RAID-Z to protect my files against hardware failures, but when I wanted to add more capacity, I found out I would have to add 3 more drives. You can&#039;t just increase the size of a zpool; you need to create a second pool, and then merge both pools.
Sun also said it wouldn&#039;t work on fixing this issue, since this is a &#039;home user&#039; issue, and ZFS is targeted to business users, for whom adding 3 drives wouldn&#039;t be an issue.</description>
		<content:encoded><![CDATA[<p>I was a ZFS user in the past (on Nexenta), but gave up when I tried to add drives to my zpool.<br />
I was using RAID-Z to protect my files against hardware failures, but when I wanted to add more capacity, I found out I would have to add 3 more drives. You can&#8217;t just increase the size of a zpool; you need to create a second pool, and then merge both pools.<br />
Sun also said it wouldn&#8217;t work on fixing this issue, since this is a &#8216;home user&#8217; issue, and ZFS is targeted to business users, for whom adding 3 drives wouldn&#8217;t be an issue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Doogie</title>
		<link>http://www.pommepause.com/blog/2009/11/how-i-plan-to-implement-my-own-whs-drive-extender-like-system/comment-page-1/#comment-991</link>
		<dc:creator>Doogie</dc:creator>
		<pubDate>Sun, 28 Nov 2010 02:47:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.pommepause.com/blog/?p=121#comment-991</guid>
		<description>ZFS/OpenSolaris.</description>
		<content:encoded><![CDATA[<p>ZFS/OpenSolaris.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Atamido</title>
		<link>http://www.pommepause.com/blog/2009/11/how-i-plan-to-implement-my-own-whs-drive-extender-like-system/comment-page-1/#comment-149</link>
		<dc:creator>Atamido</dc:creator>
		<pubDate>Mon, 21 Dec 2009 21:06:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.pommepause.com/blog/?p=121#comment-149</guid>
		<description>One of the huge benefits of Drive Extender is I can take a single drive out of a 20 drive array and read all of the files off of it by just connecting it to another computer. It is also possible to lose multiple drives and not lose any files.  Granted, it&#039;s not terribly space efficient, but it is dead simple.</description>
		<content:encoded><![CDATA[<p>One of the huge benefits of Drive Extender is I can take a single drive out of a 20 drive array and read all of the files off of it by just connecting it to another computer. It is also possible to lose multiple drives and not lose any files.  Granted, it&#8217;s not terribly space efficient, but it is dead simple.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guillaume Boudreau</title>
		<link>http://www.pommepause.com/blog/2009/11/how-i-plan-to-implement-my-own-whs-drive-extender-like-system/comment-page-1/#comment-143</link>
		<dc:creator>Guillaume Boudreau</dc:creator>
		<pubDate>Thu, 17 Dec 2009 00:58:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.pommepause.com/blog/?p=121#comment-143</guid>
		<description>I did look at unRaid before I started this.
But I really wanted to be able to choose the redundancy level per share.
I have a lot of recorded TV that I don&#039;t care that much about, so I don&#039;t protect that.
I don&#039;t protect CrashPlan and TimeMachine backups either, as those can easily be re-created if a hard drive fails and take some files with it.
Having redundancy on those would cost me 2-3 TB more than what I currently have.
Plus, with my own system, I can now &#039;super-duplicate&#039; certain shares, like the Photos share, which contains 60k+ photos we took of our family since 2000. I really don&#039;t want to loose those, so Greyhole now makes sure those files are on all my hard drives.
I can unplug one of them, and mount it anywhere ext3 partitions can be mounted, and I&#039;ll be able to see my files without requiring any rebuilding / processing.</description>
		<content:encoded><![CDATA[<p>I did look at unRaid before I started this.<br />
But I really wanted to be able to choose the redundancy level per share.<br />
I have a lot of recorded TV that I don&#8217;t care that much about, so I don&#8217;t protect that.<br />
I don&#8217;t protect CrashPlan and TimeMachine backups either, as those can easily be re-created if a hard drive fails and take some files with it.<br />
Having redundancy on those would cost me 2-3 TB more than what I currently have.<br />
Plus, with my own system, I can now &#8216;super-duplicate&#8217; certain shares, like the Photos share, which contains 60k+ photos we took of our family since 2000. I really don&#8217;t want to loose those, so Greyhole now makes sure those files are on all my hard drives.<br />
I can unplug one of them, and mount it anywhere ext3 partitions can be mounted, and I&#8217;ll be able to see my files without requiring any rebuilding / processing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom</title>
		<link>http://www.pommepause.com/blog/2009/11/how-i-plan-to-implement-my-own-whs-drive-extender-like-system/comment-page-1/#comment-142</link>
		<dc:creator>Tom</dc:creator>
		<pubDate>Thu, 17 Dec 2009 00:39:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.pommepause.com/blog/?p=121#comment-142</guid>
		<description>You should look into unRaid (http://www.lime-technology.com). You can put up to 20 drives in it (pro version), mix and match IDE and Sata and whatever sizes you want. It also protects against a single drive failure. You do not even need a system disk, just a flash drive to run it. Alot better than DE if you ask me, but that&#039;s just me.

Good luck with your project.</description>
		<content:encoded><![CDATA[<p>You should look into unRaid (<a href="http://www.lime-technology.com" rel="nofollow">http://www.lime-technology.com</a>). You can put up to 20 drives in it (pro version), mix and match IDE and Sata and whatever sizes you want. It also protects against a single drive failure. You do not even need a system disk, just a flash drive to run it. Alot better than DE if you ask me, but that&#8217;s just me.</p>
<p>Good luck with your project.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guillaume Boudreau</title>
		<link>http://www.pommepause.com/blog/2009/11/how-i-plan-to-implement-my-own-whs-drive-extender-like-system/comment-page-1/#comment-140</link>
		<dc:creator>Guillaume Boudreau</dc:creator>
		<pubDate>Wed, 16 Dec 2009 20:38:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.pommepause.com/blog/?p=121#comment-140</guid>
		<description>I just posted the first public version of Greyhole - Easily expandable &amp; redundant storage pool using Samba.

Read about that here:
http://www.pommepause.com/blog/2009/12/greyhole-easily-expandable-redundant-storage-pool-using-samba/</description>
		<content:encoded><![CDATA[<p>I just posted the first public version of Greyhole &#8211; Easily expandable &#038; redundant storage pool using Samba.</p>
<p>Read about that here:<br />
<a href="http://www.pommepause.com/blog/2009/12/greyhole-easily-expandable-redundant-storage-pool-using-samba/" rel="nofollow">http://www.pommepause.com/blog/2009/12/greyhole-easily-expandable-redundant-storage-pool-using-samba/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guillaume Boudreau</title>
		<link>http://www.pommepause.com/blog/2009/11/how-i-plan-to-implement-my-own-whs-drive-extender-like-system/comment-page-1/#comment-133</link>
		<dc:creator>Guillaume Boudreau</dc:creator>
		<pubDate>Mon, 30 Nov 2009 07:15:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.pommepause.com/blog/?p=121#comment-133</guid>
		<description>The .tombstones weren&#039;t such a good idea after all. Since I don&#039;t really control the file system, the client was able to remove that file using rm!
So I started saving the metadata I needed in a separate mirror tree, which the client can&#039;t see. I&#039;m now using the original filenames as tombstones, instead of saving all the tombstones for the files in a directory in a single file; easier to work with that way too.
Since I want to keep more info than just the other copies of the file (I want to keep &#039;online&#039; flags for example), I can&#039;t just use symlinks in there.

I also needed to change how I select drives to receive the file copies; the drives with the most free space are used first, instead of random drives. Duh!

And I realized that I needed hard links, not soft links, for Samba to be happy. Trying to delete a soft link didn&#039;t work, where deleting a regular file, or a hard link, worked fine. Not sure if this expected behaviour, but hard links are fine, I guess, since I do keep the info about the links targets in my &#039;graveyard&#039;.

I&#039;m almost done now. File/directory creation, modification &amp; deletion all work, and I tried to catch most cases of the &#039;create-modify-delete-recreate&#039; kind. This is where I&#039;ll need to make most of my tests &amp; bugfixes, I&#039;m sure.</description>
		<content:encoded><![CDATA[<p>The .tombstones weren&#8217;t such a good idea after all. Since I don&#8217;t really control the file system, the client was able to remove that file using rm!<br />
So I started saving the metadata I needed in a separate mirror tree, which the client can&#8217;t see. I&#8217;m now using the original filenames as tombstones, instead of saving all the tombstones for the files in a directory in a single file; easier to work with that way too.<br />
Since I want to keep more info than just the other copies of the file (I want to keep &#8216;online&#8217; flags for example), I can&#8217;t just use symlinks in there.</p>
<p>I also needed to change how I select drives to receive the file copies; the drives with the most free space are used first, instead of random drives. Duh!</p>
<p>And I realized that I needed hard links, not soft links, for Samba to be happy. Trying to delete a soft link didn&#8217;t work, where deleting a regular file, or a hard link, worked fine. Not sure if this expected behaviour, but hard links are fine, I guess, since I do keep the info about the links targets in my &#8216;graveyard&#8217;.</p>
<p>I&#8217;m almost done now. File/directory creation, modification &#038; deletion all work, and I tried to catch most cases of the &#8216;create-modify-delete-recreate&#8217; kind. This is where I&#8217;ll need to make most of my tests &#038; bugfixes, I&#8217;m sure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Atamido</title>
		<link>http://www.pommepause.com/blog/2009/11/how-i-plan-to-implement-my-own-whs-drive-extender-like-system/comment-page-1/#comment-132</link>
		<dc:creator>Atamido</dc:creator>
		<pubDate>Mon, 30 Nov 2009 04:23:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.pommepause.com/blog/?p=121#comment-132</guid>
		<description>The .tombstones are a good idea.  The benefit of using a second set of symlinks is they could be browsed directly, although I&#039;m not entirely sure how useful that would be.  I&#039;m very interested in how well it ends up working for you though.</description>
		<content:encoded><![CDATA[<p>The .tombstones are a good idea.  The benefit of using a second set of symlinks is they could be browsed directly, although I&#8217;m not entirely sure how useful that would be.  I&#8217;m very interested in how well it ends up working for you though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Guillaume Boudreau</title>
		<link>http://www.pommepause.com/blog/2009/11/how-i-plan-to-implement-my-own-whs-drive-extender-like-system/comment-page-1/#comment-131</link>
		<dc:creator>Guillaume Boudreau</dc:creator>
		<pubDate>Sun, 29 Nov 2009 15:43:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.pommepause.com/blog/?p=121#comment-131</guid>
		<description>Thanks for the feedback.
My method is indeed more a hack than anything else, but I&#039;m pretty sure it should work fine, and it doesn&#039;t have too much overhead. Plus it has the positive of me not having to code in C! :) I started implementation yesterday, and should be done tomorrow, with some testing and bugfixes after that (all this only part time, since I do have a day job...)

About your suggestion: Instead of keeping a tree of symlinks to point to the backup files, I&#039;ll have .tombstones files in each directory, containing information about files contained in that directory. One such information will be an array of all the copies of the file, one of which will be flagged &#039;is_linked&#039;, meaning it&#039;s the one currently pointed to by the symlink. I&#039;ll use those .tombstones data files when maintenance is required, or when I need to find all copies of a file to update it.</description>
		<content:encoded><![CDATA[<p>Thanks for the feedback.<br />
My method is indeed more a hack than anything else, but I&#8217;m pretty sure it should work fine, and it doesn&#8217;t have too much overhead. Plus it has the positive of me not having to code in C! <img src='http://www.pommepause.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I started implementation yesterday, and should be done tomorrow, with some testing and bugfixes after that (all this only part time, since I do have a day job&#8230;)</p>
<p>About your suggestion: Instead of keeping a tree of symlinks to point to the backup files, I&#8217;ll have .tombstones files in each directory, containing information about files contained in that directory. One such information will be an array of all the copies of the file, one of which will be flagged &#8216;is_linked&#8217;, meaning it&#8217;s the one currently pointed to by the symlink. I&#8217;ll use those .tombstones data files when maintenance is required, or when I need to find all copies of a file to update it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Atamido</title>
		<link>http://www.pommepause.com/blog/2009/11/how-i-plan-to-implement-my-own-whs-drive-extender-like-system/comment-page-1/#comment-130</link>
		<dc:creator>Atamido</dc:creator>
		<pubDate>Sun, 29 Nov 2009 15:12:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.pommepause.com/blog/?p=121#comment-130</guid>
		<description>I&#039;d also thought of implementing something similar, but instead writing a simple semi-fake Drive Extender file system driver instead of using Samba, so that it would be directly accessible instead of needing to access via a file share (like Drive Extender and your method).   And Samba would be able to make use of it as a regular mount point.
* It would have its own two trees of symlinks stored somewhere.
* The symlink in the first tree for the primary copy of the file.  The symlink in the second tree to the backup file.  This would make finding the backup copy much easier when you have more drives.
* File read/write/deletes are passed through to drive/filesystem/mountpoint specified in the symlink tree.  Results are piped back through the Drive Extender driver to the requester.
* Creates would select a drive/filesystem/mountpoint based on some criteria, create the symlink, and then pass the create command to the destination.  Windows Drive Extender tries to create new files on the same drive as other files in the same directory. (Read the Balancing Storage section of the Windows Home Server Technical Brief - Drive Extender.docx for the reasoning.)
* From here it looks similar to your method. Any modifications would be logged in a database to be duplicated to the backup.
* A cron job would periodically sort the database by file and time, condense commands, then update the backup at the lowest I/O priority.  IE, if a file is modified 10 times, you just need to copy the primary to the backup once.  If the file is modified 10 times and then deleted, then just delete the backup.  If the file is modified 10 times, deleted, then a new one created in place, just copy the primary to the backup, etc.  
* Only remove entries from the database that you condensed and performed on the backup copies.
* If a drive goes missing, step through every file on both trees to see if they still exist, and make another copy if appropriate.

Possible optimizations:
* Hash file path/names for a field in the database as fixed field sizes are faster for indexing/sorting.
* Perform deletes first because they are so fast and will free up space.  Then perform creates as having an out of date backup of a file is better than having no update at all.  Finally, perform copies.
* Store the symlink trees in a virtual file system file.  Since you&#039;re only storing symlinks, you don&#039;t need a lot of space, you can store the whole file system in RAM, and you can select a file system that is specifically fast at sorting lots of small files (symlinks). VFS described here: http://freshmeat.net/articles/virtual-filesystem-building-a-linux-filesystem-from-an-ordinary-file

Obviously your method is much easier as you wouldn&#039;t have to maintain your own filesystem interface.  The only thing I think I would add to yours would be to maintain a second set of symlinks that point to the backups.  This would remove the need to hunt for the backup file for updates and syncing on a drive removal or reboot.</description>
		<content:encoded><![CDATA[<p>I&#8217;d also thought of implementing something similar, but instead writing a simple semi-fake Drive Extender file system driver instead of using Samba, so that it would be directly accessible instead of needing to access via a file share (like Drive Extender and your method).   And Samba would be able to make use of it as a regular mount point.<br />
* It would have its own two trees of symlinks stored somewhere.<br />
* The symlink in the first tree for the primary copy of the file.  The symlink in the second tree to the backup file.  This would make finding the backup copy much easier when you have more drives.<br />
* File read/write/deletes are passed through to drive/filesystem/mountpoint specified in the symlink tree.  Results are piped back through the Drive Extender driver to the requester.<br />
* Creates would select a drive/filesystem/mountpoint based on some criteria, create the symlink, and then pass the create command to the destination.  Windows Drive Extender tries to create new files on the same drive as other files in the same directory. (Read the Balancing Storage section of the Windows Home Server Technical Brief &#8211; Drive Extender.docx for the reasoning.)<br />
* From here it looks similar to your method. Any modifications would be logged in a database to be duplicated to the backup.<br />
* A cron job would periodically sort the database by file and time, condense commands, then update the backup at the lowest I/O priority.  IE, if a file is modified 10 times, you just need to copy the primary to the backup once.  If the file is modified 10 times and then deleted, then just delete the backup.  If the file is modified 10 times, deleted, then a new one created in place, just copy the primary to the backup, etc.<br />
* Only remove entries from the database that you condensed and performed on the backup copies.<br />
* If a drive goes missing, step through every file on both trees to see if they still exist, and make another copy if appropriate.</p>
<p>Possible optimizations:<br />
* Hash file path/names for a field in the database as fixed field sizes are faster for indexing/sorting.<br />
* Perform deletes first because they are so fast and will free up space.  Then perform creates as having an out of date backup of a file is better than having no update at all.  Finally, perform copies.<br />
* Store the symlink trees in a virtual file system file.  Since you&#8217;re only storing symlinks, you don&#8217;t need a lot of space, you can store the whole file system in RAM, and you can select a file system that is specifically fast at sorting lots of small files (symlinks). VFS described here: <a href="http://freshmeat.net/articles/virtual-filesystem-building-a-linux-filesystem-from-an-ordinary-file" rel="nofollow">http://freshmeat.net/articles/virtual-filesystem-building-a-linux-filesystem-from-an-ordinary-file</a></p>
<p>Obviously your method is much easier as you wouldn&#8217;t have to maintain your own filesystem interface.  The only thing I think I would add to yours would be to maintain a second set of symlinks that point to the backups.  This would remove the need to hunt for the backup file for updates and syncing on a drive removal or reboot.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

