<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Michael Richmond</title>
	
	<link>http://www.smallersystems.com/blog</link>
	<description>Just another random blog...</description>
	<lastBuildDate>Wed, 19 Oct 2011 22:05:40 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/MichaelRichmond" /><feedburner:info uri="michaelrichmond" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>And the Emmy goes to…    LTFS</title>
		<link>http://feedproxy.google.com/~r/MichaelRichmond/~3/4X7_svUFeO0/</link>
		<comments>http://www.smallersystems.com/blog/2011/10/and-the-emmy-goes-to-ltfs/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 22:04:14 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[LTFS]]></category>
		<category><![CDATA[award]]></category>
		<category><![CDATA[emmy]]></category>

		<guid isPermaLink="false">http://www.smallersystems.com/blog/?p=656</guid>
		<description><![CDATA[<p>OMFG! My project won an Emmy! The Academy of Television Arts &#038; Sciences has announced the recipients of the 63rd Primetime Emmy® Engineering Awards. This year, one of four Engineering Emmys will be awarded one of which goes to IBM &#8230; <a href="http://www.smallersystems.com/blog/2011/10/and-the-emmy-goes-to-ltfs/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/10/and-the-emmy-goes-to-ltfs/">And the Emmy goes to&#8230;&nbsp;&nbsp;&nbsp;&nbsp;LTFS</a>.&rdquo;</em></p></p>]]></description>
				<content:encoded><![CDATA[<p><div id="attachment_293" class="wp-caption alignright" style="width: 160px"><a href="http://www.smallersystems.com/blog/wp-content/uploads/2011/06/lto5.jpg"><img src="http://www.smallersystems.com/blog/wp-content/uploads/2011/06/lto5-150x150.jpg" alt="IBM_LTO5_media" title="IBM LTO5 Media" width="150" height="150" class="size-thumbnail wp-image-293" /></a><p class="wp-caption-text">IBM LTO5 data tape media.</p></div><br />
OMFG! My project won an Emmy!</p>
<p>The Academy of Television Arts &#038; Sciences has <a href="http://www.emmys.tv/news/2011/big-bang-theory-star-mayim-bialik-host-2011-engineering-emmys">announced</a> the recipients of the 63rd Primetime Emmy® Engineering Awards. This year, one of four Engineering Emmys will be awarded one of which goes to IBM for the LTFS technology.</p>
<p>I was responsible for the architecture, format specification, and development lead for the Linear Tape File System (LTFS) from the start of the product development. During my work on LTFS I was instrumental in   producing LTFS Single Drive Edition for Linux, OS X and Windows in 2010 (all platforms released within 12 months of starting the project); producing LTFS Library Edition in 2011; and laying plans for future LTFS products up to my last day at IBM.</p>
<p>omgbbqwtf!! Over.</p>
<p><em>&#8220;I&#8217;d like to thank the Academy, &#8230;&#8221;</em></p>
<p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/10/and-the-emmy-goes-to-ltfs/">And the Emmy goes to&#8230;&nbsp;&nbsp;&nbsp;&nbsp;LTFS</a>.&rdquo;</em></p></p><img src="http://feeds.feedburner.com/~r/MichaelRichmond/~4/4X7_svUFeO0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.smallersystems.com/blog/2011/10/and-the-emmy-goes-to-ltfs/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		<feedburner:origLink>http://www.smallersystems.com/blog/2011/10/and-the-emmy-goes-to-ltfs/</feedburner:origLink></item>
		<item>
		<title>joining Nimbula</title>
		<link>http://feedproxy.google.com/~r/MichaelRichmond/~3/QCzbKF2t3q8/</link>
		<comments>http://www.smallersystems.com/blog/2011/09/joining-nimbula/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 02:29:26 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Michael]]></category>
		<category><![CDATA[Michael Richmond]]></category>
		<category><![CDATA[Nimbula]]></category>

		<guid isPermaLink="false">http://www.smallersystems.com/blog/?p=635</guid>
		<description><![CDATA[<p>After popping the IBM stack frame off my call stack the next step is to push a new Nimbula frame onto the stack. Today is the end of my first week working at a startup and, as expected, the experience &#8230; <a href="http://www.smallersystems.com/blog/2011/09/joining-nimbula/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/09/joining-nimbula/">joining Nimbula</a>.&rdquo;</em></p></p>]]></description>
				<content:encoded><![CDATA[<p>After popping the IBM stack frame off my call stack the next step is to push a new <a href="http://www.nimbula.com" title="Nimbula">Nimbula</a> frame onto the stack. Today is the end of my first week working at a startup and, as expected, the experience is dramatically different from working at IBM.</p>
<p>I will need to come up to speed before I can talk intelligently about what Nimbula is doing and my role in the company. Right now, after a week I can only comment on the simplicity of the on-boarding process.</p>
<p><span id="more-635"></span></p>
<blockquote><dl>
<dt>Mon 9:30am good morning&#8230;</dt>
<dd>Arrive and shown to my desk.<br />
Monitor, Apple Keyboard, Magic Mouse, and 13&#8243; MacBook Pro already hooked up.<br />
Laptop is wired for ethernet and also already connected to company WiFi.</dd>
<dt>9:35am passwords changed, email working</dt>
<dd>Logged in.<br />
OS X password changed.<br />
Logged in to email.<br />
Changed email password.<br />
A bunch of applications are already installed&#8230; Chrome set as default browser, SIP softphone, Skype, Adium, DropBox, Evernote, VirtualBox, OpenOffice, TunnelBlick and others. Company-specific settings such as VPN and SIP are already configured.</dd>
<dt>10:10am</dt>
<dd>I have DropBox syncing with my personal account and 1Password installed waiting for DropBox to finish syncing my password vault.
</dd>
<dt>10:30am more passwords changed</dt>
<dd>IT guy comes over and points me to a wiki page with a list of new hire setup instructions and starts walking me through the handful of password changes I need to make. He realizes that I have already changed my OS X and Google Apps passwords so we run through the remaining company-specific passwords.</dd>
<dt>10:45am hr paperwork
<dt>
<dd>Our office admin comes by to point me at the HR web portal. Two screens later and I have completed my I-9 form by verifying the pre-populated data, entering my Alien number, typing name and the date for an esignature. Our admin hands me the 401k plan documents and points me to the benefits signup pages and some other online HR documents I should read.</dd>
<dt>11:10am making lists</dt>
<dd>I start putting together a list of account passwords to save into 1Password when DropBox finishes syncing. The list expands to other cascading setup tasks: install Office2011, extract old contacts from previous Outlook identity, investigate iCal or Outlook with Google Calendars, install XCode, setup Fink, etc, etc.</dd>
<dt>11:18am continue through the list</dt>
<dd>I paste a copy of the New Hire wiki page into TextEdit and strike off the completed tasks. Roughly 50% of tasks are already done.</dd>
<dt>12:05pm access bug tracking</dt>
<dd>I skim the current bug list after my new hire task list directs me to login to bug tracking site and verify my account is working.</dd>
<dt>12:20 lunch</dt>
<dd>Recruiter reminds me that lunch is brought in four days a week and there is a picnic table outside with a cafe umbrella in the sun.</dd>
</blockquote>
<p>By lunch I was largely done with the on-boarding process and had access to all the systems in use other than the development cluster. It was predominantly self-directed without the baggage of other &#8220;self-directed&#8221; training I have experienced. Throughout the morning a number of people came by to say hello and ask if I need anything.</p>
<p>Early afternoon my mentor, who I had met during my interviews, walked me around the office to introduce me to the people in the office. Without fail, everyone dropped what they were doing for a few minutes to say hello to the new guy.</p>
<p>By the end of day Friday I had finished the HR paperwork, read the Employee Handbook, largely finished configuring my laptop, arranged my desk, and have started getting up to speed on the product.</p>
<p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/09/joining-nimbula/">joining Nimbula</a>.&rdquo;</em></p></p><img src="http://feeds.feedburner.com/~r/MichaelRichmond/~4/QCzbKF2t3q8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.smallersystems.com/blog/2011/09/joining-nimbula/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.smallersystems.com/blog/2011/09/joining-nimbula/</feedburner:origLink></item>
		<item>
		<title>leaving IBM</title>
		<link>http://feedproxy.google.com/~r/MichaelRichmond/~3/i2EZ3c9UhVU/</link>
		<comments>http://www.smallersystems.com/blog/2011/08/leaving-ibm/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 00:00:19 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Michael]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[Michael Richmond]]></category>

		<guid isPermaLink="false">http://www.smallersystems.com/blog/?p=632</guid>
		<description><![CDATA[<p>Today was my last day at IBM Almaden. I&#8217;ve been walking into the same building 5 days a week for about 9 years now. It&#8217;ll be weird to not do the same next week. In my time here, I have &#8230; <a href="http://www.smallersystems.com/blog/2011/08/leaving-ibm/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/08/leaving-ibm/">leaving IBM</a>.&rdquo;</em></p></p>]]></description>
				<content:encoded><![CDATA[<p>Today was my last day at IBM Almaden. I&#8217;ve been walking into the same building 5 days a week for about 9 years now. It&#8217;ll be weird to not do the same next week.</p>
<p>In my time here, I have shipped 4 different LTFS releases, numerous LTFS fixpacks, 3 LTFS Format Specifications, the first Information Archive appliance release, several internal projects, along with multiple papers and patents. I&#8217;ve worked with some extremely talented people and have helped an industry change the way they store and manage their data.</p>
<p>I will be taking some personal time before starting in my new role. I will continue posting my brain dumps about LTFS to capture as much information as I can share publicly. Over time I expect to post more about the new space in which I will be working.</p>
<p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/08/leaving-ibm/">leaving IBM</a>.&rdquo;</em></p></p><img src="http://feeds.feedburner.com/~r/MichaelRichmond/~4/i2EZ3c9UhVU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.smallersystems.com/blog/2011/08/leaving-ibm/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.smallersystems.com/blog/2011/08/leaving-ibm/</feedburner:origLink></item>
		<item>
		<title>LTFS Format Specification and Open-Source</title>
		<link>http://feedproxy.google.com/~r/MichaelRichmond/~3/fAfbHdpLvXw/</link>
		<comments>http://www.smallersystems.com/blog/2011/08/ltfs-format-specification-and-open-source/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 05:22:27 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[LTFS]]></category>
		<category><![CDATA[DataStorage]]></category>
		<category><![CDATA[OpenSource]]></category>
		<category><![CDATA[Specification]]></category>

		<guid isPermaLink="false">http://www.smallersystems.com/blog/?p=339</guid>
		<description><![CDATA[<p>In an earlier post I mentioned that prior to the introduction of LTFS an application typically relied on proprietary APIs to read and write data tape. These proprietary APIs typically have used proprietary data formats on the tape media. These &#8230; <a href="http://www.smallersystems.com/blog/2011/08/ltfs-format-specification-and-open-source/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/08/ltfs-format-specification-and-open-source/">LTFS Format Specification and Open-Source</a>.&rdquo;</em></p></p>]]></description>
				<content:encoded><![CDATA[<p>In an <a href="http://www.smallersystems.com/blog/2011/06/a-filesystem-for-tape-why/" title="A filesystem for tape? Why?">earlier post</a> I mentioned that prior to the introduction of LTFS an application typically relied on proprietary APIs to read and write data tape. These proprietary APIs typically have used proprietary data formats on the tape media. These proprietary APIs and data formats lock an application developer to a specific layer of software which mediates access to the data tape storage.</p>
<p>With LTFS we took a very different approach. The LTFS filesystem-based approach to accessing data stored on tape brings significant benefits to the tape market. For example, application developers no longer need to learn specialized APIs, and users get a fully self-describing storage medium that largely behaves the same as more common storage media such as hard-disk drives and memory sticks.</p>
<p>The benefits afforded by LTFS are arguably sufficient to support releasing LTFS as proprietary software that uses a closed data format on the tape media. Rather than treating LTFS as yet another proprietary on-tape format, the LTFS team at IBM elected to release the LTFS Single Drive Edition (LTFS-SDE) software as open-source<sup class='footnote'><a href='#fn-339-1' id='fnref-339-1'>1</a></sup>. The LTFS open-source software release is licensed under the LGPL license to protect the LTFS format while providing application developers the ability to dynamically link with LTFS binary code without risking their own intellectual property. Each fix-pack released for LTFS-SDE has also been released under the LGPL.</p>
<p>In addition to the open-source software release, the LTFS team wrote the LTFS Format Specification document and released this specification to the public. This Format Specification describes the on-media data structures in sufficient detail for independent developers to read and write LTFS tapes that are compatible with other LTFS implementations.</p>
<p>During development of the LTFS software and the LTFS Format Specification the IBM team built a working relationship with developers at both HP and Quantum through the <a href="http://www.lto.org/" title="LTO">LTO Consortium</a>. These relationships afforded an opportunity to inform HP and Quantum about the up-coming LTFS technology and allowed for some pre-release co-ordination between these three LTO 5 vendors. These on-going relationships have provided the opportunity to conduct inter-operablity testing between all three vendors. We are fortunate to enjoy continuing discussions between vendors on the direction and development of the LTFS format.</p>
<p>This communication, the open-specification, and the open-source approach to software distribution is motivated by a desire for LTFS to become an industry-wide standard. During LTFS development we recognized that if LTFS was a proprietary release then we would be adding to the fragmentation and incompatibility of data tape use. Instead, a release of LTFS as an open implementation with an open specification would create an environment that may lead to broad industry adoption. Broad adoption along with the ease of use benefits may result in expanded use of tape media for data storage. Expansion of the tape market would be good for the industry and all of us involved in the data tape business.</p>
<div class='footnotes'>
<div class='footnotedivider'></div>
<ol>
<li id='fn-339-1'>Open-source release of LTFS-SDE is available for Linux and Mac OS X. The LTFS-SDE implementation for MS Windows is freely available as a binary release. The MS Windows implementation could not be released as open-source due to licensing terms on necessary third-party components <span class='footnotereverse'><a href='#fnref-339-1'>&#8617;</a></span></li>
</ol>
</div>
<p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/08/ltfs-format-specification-and-open-source/">LTFS Format Specification and Open-Source</a>.&rdquo;</em></p></p><img src="http://feeds.feedburner.com/~r/MichaelRichmond/~4/fAfbHdpLvXw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.smallersystems.com/blog/2011/08/ltfs-format-specification-and-open-source/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.smallersystems.com/blog/2011/08/ltfs-format-specification-and-open-source/</feedburner:origLink></item>
		<item>
		<title>Problem with video-stream playback in OS X Lion (10.7)</title>
		<link>http://feedproxy.google.com/~r/MichaelRichmond/~3/ImK3vd4hi-4/</link>
		<comments>http://www.smallersystems.com/blog/2011/08/problem-with-video-stream-playback-in-os-x-lion-10-7/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 04:25:02 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[OS X]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[streaming]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://www.smallersystems.com/blog/?p=591</guid>
		<description><![CDATA[<p>My home IT infrastructure includes an Apple Mac Mini computer that is used as our media server and primary playback machine. The Mac Mini is connected to a 1080p LCD Television, 1GB LAN, and accesses a NAS for media storage. &#8230; <a href="http://www.smallersystems.com/blog/2011/08/problem-with-video-stream-playback-in-os-x-lion-10-7/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/08/problem-with-video-stream-playback-in-os-x-lion-10-7/">Problem with video-stream playback in OS X Lion (10.7)</a>.&rdquo;</em></p></p>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.smallersystems.com/blog/wp-content/uploads/2011/08/OSXLion.png"><img src="http://www.smallersystems.com/blog/wp-content/uploads/2011/08/OSXLion-150x150.png" alt="" title="OS X Lion" width="150" height="150" class="alignright size-thumbnail wp-image-594" /></a><br />
My home IT infrastructure includes an <a href="http://www.apple.com/macmini/" title="Apple Mac Mini">Apple Mac Mini</a> computer that is used as our media server and primary playback machine. The Mac Mini is connected to a 1080p LCD Television, 1GB LAN, and accesses a NAS for media storage. The main job of this machine is audio playback using iTunes, and video playback using <a href="http://www.hulu.com/labs/hulu-desktop" title="Hulu Desktop" class="broken_link">Hulu Desktop</a> with the occasional web-video streaming using Safari in fullscreen<sup class='footnote'><a href='#fn-591-1' id='fnref-591-1'>1</a></sup>.</p>
<p>This Mac Mini is a late 2009 model with a 2.26GHz Core 2 Duo processor, 4GB of RAM, and an NVIDIA GeForce 9400 GPU. Since this machine is not mission-critical for our household I figured it would be a reasonable candidate for our first Lion upgrade.</p>
<p>After the upgrade video streaming has become practically impossible. Both Hulu Desktop and web-based video streaming suffers from decompression artifacts that result in blocky video and video freezes. After a minute or so of playback the video stream will freeze on the current image and audio playback will continue. When the video freezes if I use VNC to access the machine I can see that the mouse cursor is beach-balling.</p>
<p>I have found that video playback can be made reliable and returned to the same quality as provided by OS X Snow Leopard (10.6) by disabling the new Lion functionality that restores applications to their running state after a reboot. To disable this function, open the <code>System Preferences->General</code> panel and uncheck the &#8220;Restore windows when quitting and re-opening apps&#8221; option. The option is shown unchecked in the screenshot below.</p>
<div id="attachment_592" class="wp-caption aligncenter" style="width: 587px"><a href="http://www.smallersystems.com/blog/wp-content/uploads/2011/08/VideoPlayback.png"><img src="http://www.smallersystems.com/blog/wp-content/uploads/2011/08/VideoPlayback.png" alt="" title="OS X Lion restore windows when quitting and re-opening apps option" width="577" height="160" class="size-full wp-image-592" /></a><p class="wp-caption-text">The OS X Lion 'Restore windows when quitting and re-opening apps' option. Option shown unchecked.</p></div>
<p>My suspicion is that the background task that takes a snapshot of the memory and system state for each running application is failing behind in taking snapshots when large amounts of RAM are updated. In video streaming by definition the application memory is undergoing large frequent updates. If my suspicion is correct, then instead of dropping work items the snapshot application is trying to process an ever-increasing list of work. The result appears to be CPU starvation to video playback. This starvation probably occurs in the Quicktime stack since the behavior is demonstrated in different playback applications.</p>
<div class='footnotes'>
<div class='footnotedivider'></div>
<ol>
<li id='fn-591-1'>We generally use our XBox360 for <a href="http://www.netflix.com" title="Netflix">Netflix</a> streaming since the interface is nicer. We also have a Sony BluRay player that is supposed to stream Amazon video on demand. It has been a 3 month and counting battle with Sony and Amazon support to get incorrect server-side state flushed before this device will stream correctly. <span class='footnotereverse'><a href='#fnref-591-1'>&#8617;</a></span></li>
</ol>
</div>
<p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/08/problem-with-video-stream-playback-in-os-x-lion-10-7/">Problem with video-stream playback in OS X Lion (10.7)</a>.&rdquo;</em></p></p><img src="http://feeds.feedburner.com/~r/MichaelRichmond/~4/ImK3vd4hi-4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.smallersystems.com/blog/2011/08/problem-with-video-stream-playback-in-os-x-lion-10-7/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.smallersystems.com/blog/2011/08/problem-with-video-stream-playback-in-os-x-lion-10-7/</feedburner:origLink></item>
		<item>
		<title>Filesystem recovery examples with ltfsck</title>
		<link>http://feedproxy.google.com/~r/MichaelRichmond/~3/S3CTuTUXKMg/</link>
		<comments>http://www.smallersystems.com/blog/2011/07/filesystem-recovery-examples-with-ltfsck/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 23:06:55 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[LTFS]]></category>
		<category><![CDATA[Data Safety]]></category>
		<category><![CDATA[DataStorage]]></category>

		<guid isPermaLink="false">http://www.smallersystems.com/blog/?p=527</guid>
		<description><![CDATA[<p>In addition to the filesystem implementation, the Linear Tape File System (LTFS) software ships with two core utilities, “mkltfs” and “ltfsck”. mkltfs (pronounced &#8220;make LTFS&#8221;) is used to format LTO cartridges with the LTFS Format. ltfsck is used to check &#8230; <a href="http://www.smallersystems.com/blog/2011/07/filesystem-recovery-examples-with-ltfsck/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/07/filesystem-recovery-examples-with-ltfsck/">Filesystem recovery examples with <code style="font-family: monospace; font-size: larger; font-weight: lighter;">ltfsck</code></a>.&rdquo;</em></p></p>]]></description>
				<content:encoded><![CDATA[<p>In addition to the filesystem implementation, the <a href="http://en.wikipedia.org/wiki/LTFS" title="Linear Tape File System">Linear Tape File System (LTFS) software</a> ships with two core utilities, “<code style="font-family: monospace;">mkltfs</code>” and “<code style="font-family: monospace;">ltfsck</code>”. <code style="font-family: monospace;">mkltfs</code> (pronounced &#8220;make LTFS&#8221;) is used to format <a href="http://www.trustlto.com/" title="Linear Tape Open">LTO</a> cartridges with the LTFS Format. <code style="font-family: monospace;">ltfsck</code> is used to check and if necessary recover a partially corrupted LTFS Volume back to a consistent and usable state.</p>
<p>In this post I describe some inconsistent states a volume may wind up in, the scenarios that may lead to these states (often power-loss), and how <code style="font-family: monospace;">ltfsck</code> recovers to a consistent state. <span id="more-527"></span></p>
<p>I&#8217;ve described the layout of a consistent LTFS Volume <a href="http://www.smallersystems.com/blog/2011/06/how-does-ltfs-work/" title="How does LTFS work?">here</a> and <a href="http://www.smallersystems.com/blog/2011/07/ltfs-consistency-and-index-snapshots/" title="LTFS consistency and Index Snapshots">here</a>. A consistent LTFS Volume is illustrated below. An LTFS Volume must be consistent at mount time otherwise the LTFS software will reject the volume and instruct the user to run the <code style="font-family: monospace;">ltfsck</code> utility to recover the volume to a consistent state.</p>
<div id="attachment_489" class="wp-caption alignright" style="width: 650px"><a href="http://www.smallersystems.com/blog/wp-content/uploads/2011/07/IndexGenerations.png"><img src="http://www.smallersystems.com/blog/wp-content/uploads/2011/07/IndexGenerations-1024x510.png" alt="" title="LTFS Index Generations" width="640" height="318" class="size-large wp-image-489" /></a><p class="wp-caption-text">Logical layout of an LTFS volume showing historical Indexes with back-pointers and multiple files written and edited in-place.</p></div>
<p>Notice that this consistent LTFS Volume matches the definition of a <em>consistent state</em>. Specifically, that the current Index is written at the end of both partitions on the media.</p>
<p><strong>Power-loss after writing DP Index</strong></p>
<p>In the event of a power loss while unmounting the LTFS Volume the volume may end up in the state illustrated below.</p>
<div id="attachment_538" class="wp-caption alignright" style="width: 650px"><a href="http://www.smallersystems.com/blog/wp-content/uploads/2011/07/IndexGenerations-IPIndexPowerLoss.png"><img src="http://www.smallersystems.com/blog/wp-content/uploads/2011/07/IndexGenerations-IPIndexPowerLoss-1024x506.png" alt="" title="LTFS Index Generations - After power-loss writing IP Index" width="640" height="316" class="size-large wp-image-538" /></a><p class="wp-caption-text">Logical layout of an LTFS volume showing historical Indexes with back-pointers and multiple files written and edited in-place after power-loss during IP Index write.</p></div>
<p>In the example above, the LTFS cartridge was unmounted after writing File A and B to the volume. This unmount resulted in Index<sup>2</sup>. The cartridge was then mounted again and File A was opened for writing and had some new data written. This new data is stored in the purple extent labeled “File A<sup>3</sup>”. The cartridge was then unmounted. This unmount processing wrote the current Index as Index<sup>3</sup> and switched to the Index Partition and started to write the current Index. This unmount processing follows the order listed <a href="http://www.smallersystems.com/blog/2011/07/ltfs-consistency-and-index-snapshots/" title="LTFS consistency and Index Snapshots">here</a>. Before the Index write completed the system crashed or lost power. This loss of power prevented completion of the Index write to the IP.</p>
<p>If this cartridge is mounted again the LTFS software will identify that the volume is inconsistent and recommend that <code style="font-family: monospace;">ltfsck</code> be used with the volume. <code style="font-family: monospace;">ltfsck</code> will identify the partial write of the Index to the IP and attempt to read the Index<sup>3</sup> stored on the DP. If the Index at the end of the DP can be read successfully then <code style="font-family: monospace;">ltfsck</code> will over-write the partial Index on the IP with a duplicate of Index<sup>3</sup> from the DP. After this write the cartridge will be consistent and in the state shown in the first diagram on this page.</p>
<p>A similar situation occurs if the power loss occurs after the current Index is written to the DP but before the current Index is written to the IP. The resultant volume structure is shown below.</p>
<div id="attachment_544" class="wp-caption aligncenter" style="width: 650px"><a href="http://www.smallersystems.com/blog/wp-content/uploads/2011/07/IndexGenerations-IPIndexNoWrite.png"><img src="http://www.smallersystems.com/blog/wp-content/uploads/2011/07/IndexGenerations-IPIndexNoWrite-1024x506.png" alt="" title="LTFS Index Generations – After power-loss while changing partitions" width="640" height="316" class="size-large wp-image-544" /></a><p class="wp-caption-text">Logical layout of an LTFS volume showing historical Indexes with back-pointers and multiple files written and edited in-place after power-loss during partition change.</p></div>
<p>In the example above, encountering a power-loss while the tape drive is changing partitions has resulted in a correct DP with the current Index as Index<sup>3</sup>, but the IP still has the old Index<sup>2</sup>. In this scenario, the LTFS software will identify that the Index<sup>2</sup> on the IP is out of date based on the values stored in the cartridge MAM parameters and reject the LTFS Volume. <code style="font-family: monospace;">ltfsck</code> will identify based on the MAM parameters that Index<sup>3</sup> at the end of the DP is the most current Index and will over-write Index<sup>1</sup> on the DP with a copy of Index<sup>3</sup>.</p>
<p>This recovery is equivalent to the previous recovery of the partially written Index. In both cases, there is no loss of user data.</p>
<p><strong>Power-loss before writing DP Index</strong></p>
<p>In the event of a power loss while writing file data to the LTFS Volume the volume may end up in the state illustrated below.</p>
<div id="attachment_554" class="wp-caption aligncenter" style="width: 650px"><a href="http://www.smallersystems.com/blog/wp-content/uploads/2011/07/IndexGenerations-DPIndexNoWrite.png"><img src="http://www.smallersystems.com/blog/wp-content/uploads/2011/07/IndexGenerations-DPIndexNoWrite-1024x506.png" alt="" title="LTFS Index Generations – After power-loss while writing file data " width="640" height="316" class="size-large wp-image-554" /></a><p class="wp-caption-text">Logical layout of an LTFS volume showing historical Indexes with back-pointers and multiple files written and edited in-place after power-loss during write of new data file.</p></div>
<p>In the example above, the file data write for “File ?” was in progress when the system crashed or lost power. Immediately before the loss of power the filename for this file existed in memory in the Index but the LTFS software was waiting for the write operation to complete before laying down the current Index as “Index<sup>4</sup>”. Due to the power loss, the updated Index was written to the media and there is no way of knowing whether the data stored in the black extent labeled “File ?” is complete or just a partial write.</p>
<p>In this example, the LTFS software will refuse to mount the volume and suggest that <code style="font-family: monospace;">ltfsck</code> be run against the volume. When <code style="font-family: monospace;">ltfsck</code> is run the user has a few different courses of action. By default the <code style="font-family: monospace;">ltfsck</code> utility will identify the “unexpected” data at the end of the DP and perform recovery actions to:</p>
<ol>
<li>read Index<sup>3</sup> from the IP,</li>
<li>create a directory at the root of the LTFS filesystem named “<code style="font-family: monospace;">_ltfs_lostandfound</code>” if the directory doesn&#8217;t already exist,
<li>update Index<sup>3</sup> to include the “File ?” data as the contents of one or more files with generated filenames. Each separate file contains the data written to a single block on the media. The files are stored in “<code style="font-family: monospace;">_ltfs_lostandfound</code>”,
<li>write the updated Index out as Index<sup>4</sup> to the DP, and
<li>perform normal unmount processing to write Index<sup>4</sup> to the IP.
</ol>
<p>The layout of the LTFS Volume after these recovery steps have been performed by <code style="font-family: monospace;">ltfsck</code> is illustrated below.</p>
<div id="attachment_561" class="wp-caption aligncenter" style="width: 650px"><a href="http://www.smallersystems.com/blog/wp-content/uploads/2011/07/IndexGenerations-DPIndexNoWriteRecovery.png"><img src="http://www.smallersystems.com/blog/wp-content/uploads/2011/07/IndexGenerations-DPIndexNoWriteRecovery-1024x506.png" alt="" title="LTFS Index Generations – After power-loss while writing file data, followed by full recovery" width="640" height="316" class="size-large wp-image-561" /></a><p class="wp-caption-text">Logical layout of an LTFS volume showing historical Indexes with back-pointers and multiple files written and edited in-place after power-loss during write of new data file, followed by full data recovery by <code style=font-family:monospace;>ltfsck</code>.</p></div>
<p>In the illustration above, the LTFS Volume is consistent but the data blocks shown in black have generated filenames rather than the user-specified filename. Additionally, these recovered data blocks are most likely to contain only partially written data. Recovering the blocks to the volume as recovered files provides the ability for the user to copy these blocks off the volume and re-construct the original data if no other copy exists. In most scenarios the user will still have a copy of the original data elsewhere because the file write to LTFS had not completed before the power loss.</p>
<p>After the user has finished working with the recovered files on the LTFS Volume there is probably no need to leave the blocks on the LTFS Volume. Rather than deleting the recovered files the user can use <code style="font-family: monospace;">ltfsck</code> to rollback the LTFS Volume to the Index<sup>3</sup> snapshot. Using <code style="font-family: monospace;">ltfsck</code> to roll the volume back, rather than deleting the recovered files, means that the space occupied by the partial write (shown in black) will be reclaimed and the LTFS Volume will be returned the the state shown in the first illustration at the top of this page.</p>
<p>If the user has encountered a power loss during file write as described above and the user is not interested in recovering the partially written data, <code style="font-family: monospace;">ltfsck</code> provides a command-line option to automate the recovery of the LTFS Volume. With this automated recovery, rather than generating Index<sup>4</sup> (described above), <code style="font-family: monospace;">ltfsck</code> simply erases the “File ?” data thereby returning the volume to the consistent state shown in the first illustration at the top of this page.</p>
<p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/07/filesystem-recovery-examples-with-ltfsck/">Filesystem recovery examples with <code style="font-family: monospace; font-size: larger; font-weight: lighter;">ltfsck</code></a>.&rdquo;</em></p></p><img src="http://feeds.feedburner.com/~r/MichaelRichmond/~4/S3CTuTUXKMg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.smallersystems.com/blog/2011/07/filesystem-recovery-examples-with-ltfsck/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.smallersystems.com/blog/2011/07/filesystem-recovery-examples-with-ltfsck/</feedburner:origLink></item>
		<item>
		<title>LTFS consistency and Index snapshots</title>
		<link>http://feedproxy.google.com/~r/MichaelRichmond/~3/UydSS2rICMk/</link>
		<comments>http://www.smallersystems.com/blog/2011/07/ltfs-consistency-and-index-snapshots/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 19:37:12 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[LTFS]]></category>
		<category><![CDATA[Data Safety]]></category>
		<category><![CDATA[DataStorage]]></category>
		<category><![CDATA[Resiliency]]></category>

		<guid isPermaLink="false">http://www.smallersystems.com/blog/?p=316</guid>
		<description><![CDATA[<p>An LTFS Volume must be in a consistent state when the volume is exchanged with another LTFS system. The LTFS Format Specification defines consistent state as: “A volume is consistent when both partitions are complete and the last Index Construct &#8230; <a href="http://www.smallersystems.com/blog/2011/07/ltfs-consistency-and-index-snapshots/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/07/ltfs-consistency-and-index-snapshots/">LTFS consistency and Index snapshots</a>.&rdquo;</em></p></p>]]></description>
				<content:encoded><![CDATA[<p>An LTFS Volume must be in a consistent state when the volume is exchanged with another LTFS system. The <a href="http://www.trustlto.com/LTFS_Format_To%20Print.pdf" title="LTFS Format Specification">LTFS Format Specification</a> defines <em>consistent state</em> as:</p>
<blockquote><p><em style="font-size: xx-large;">“</em>A volume is consistent when both partitions are complete and the last Index Construct in the Index Partition has a back pointer to the last Index Construct in the Data Partition.<em style="font-size: xx-large;">”</em></p></blockquote>
<p>where a <em>complete parition</em> is:</p>
<blockquote><p><em style="font-size: xx-large;">“</em>An LTFS partition that consists of an LTFS Label Construct and a Content Area, where the last construct in the Content Area is an Index Construct.<em style="font-size: xx-large;">”</em></p></blockquote>
<p>The LTFS Format Specification additionally includes the following conformance statement:</p>
<blockquote><p><em style="font-size: xx-large;">“</em>Recorded media claiming conformance to this format shall be in a consistent state when interchanged or stored.<em style="font-size: xx-large;">”</em></p></blockquote>
<p>In practice this conformance statement means that when an LTFS Volume is ejected from an LTO drive the volume must be consistent. Software implementing support for the LTFS format can expect a consistent LTFS cartridge when the cartridge is loaded and reject inconsistent cartridges.</p>
<div id="attachment_489" class="wp-caption aligncenter" style="width: 710px"><img src="http://www.smallersystems.com/blog/wp-content/uploads/2011/07/IndexGenerations-1024x510.png" alt="" title="LTFS Index Generations" width="700" class="size-large wp-image-489" /><p class="wp-caption-text">Logical layout of a consistent LTFS volume showing historical Indexes with back-pointers and multiple files written and edited in-place.</p></div>
<p>The LTFS software writes an updated Index to the end of the Data Partition (DP). The Indexes stored in the DP are interleaved with the file content that is also stored in the DP. LTFS maintains each Index written to the DP for three core reasons:</p>
<blockquote style="font-style: normal;"><ul>
<li>data safety,</li>
<li>performance, and</li>
<li>snapshots/rollback.</li>
</ul>
</blockquote>
<p><strong>Data safety</strong><br />
To protect the data stored on the media it is vital that LTFS commit an updated Index to the media soon after the file content is written. Without the updated Index, new file content cannot be accessed. Additionally, maintaining the current Index in the DP along with the same logical Index stored in the Index Partition (IP) provides a redundant copy of the Index on the media. These redundant copies mean that in the event of catastrophic failure there is a second chance to read a valid current Index.</p>
<p><strong>Performance</strong><br />
In normal LTFS operation the tape head is positioned in the DP to allow rapid access the file content storage area to service read and write requests. When a new Index needs to be written to the media the LTFS software will write the new Index to the DP and continue servicing any concurrent write operations. By writing the Index to the DP in-line with the file content the LTFS software does not incur a penalty for switching to the other partition and seeking back to the Beginning of Tape (BOT).</p>
<p><strong>Snapshots and rollback</strong><br />
The Indexes written to the DP are likely to be followed by file content during write operations. LTO data tape is sequential media which makes it impossible to delete these Indexes without destroying any file content data that is written after the Index. Maintaining these Indexes provides the ability to inspect and potentially revert the LTFS Volume to any earlier time for which an Index exists on the media. For example, if you work with an LTFS Volume by adding, updating, and deleting files. If you later decide that these changes are not wanted then you can either mount the LTFS Volume read-only using an earlier Index to show and access an earlier version of the volume, or you can permanently revert the LTFS Volume to the an earlier state using a rollback operation.</p>
<p>The Index written to the IP is typically written during unmount processing of the LTFS file-system. During unmount the following operations are performed in order:</p>
<blockquote style="font-style: normal;"><ol>
<li>all file content written to the volume but still in memory is flushed to the DP,</li>
<li>an updated Index is written to the DP,</li>
<li>LTO cartridge memory is written with new MAM parameters,</li>
<li>the tape head is moved to the IP,</li>
<li>any file content destined for the IP is written overwriting the old Index,</li>
<li>a replica of the current Index is written to the IP overwriting the old Index,</li>
<li>LTO cartridge memory is written with new MAM parameters, and</li>
<li>media is rewound then optionally ejected.</li>
</ol>
</blockquote>
<p>Note that it is safe to overwrite the old Index on the IP because the LTFS software has successfully written the current Index at the end of the DP in operation #2. The details of how MAM parameters are used and the conditions in which file content may be written to the IP are described in a later blog post.</p>
<p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/07/ltfs-consistency-and-index-snapshots/">LTFS consistency and Index snapshots</a>.&rdquo;</em></p></p><img src="http://feeds.feedburner.com/~r/MichaelRichmond/~4/UydSS2rICMk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.smallersystems.com/blog/2011/07/ltfs-consistency-and-index-snapshots/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.smallersystems.com/blog/2011/07/ltfs-consistency-and-index-snapshots/</feedburner:origLink></item>
		<item>
		<title>Can you use LTFS on LTO4 or earlier media?</title>
		<link>http://feedproxy.google.com/~r/MichaelRichmond/~3/DkR0FJBv8ks/</link>
		<comments>http://www.smallersystems.com/blog/2011/07/can-you-use-ltfs-on-lto4-or-earlier-media/#comments</comments>
		<pubDate>Wed, 13 Jul 2011 18:58:42 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[LTFS]]></category>
		<category><![CDATA[DataStorage]]></category>

		<guid isPermaLink="false">http://www.smallersystems.com/blog/?p=461</guid>
		<description><![CDATA[<p>I have noticed a pattern of Google searches related to the question “Can LTFS be used with LTO4 media?”. This question is implicitly answered in other posts but the frequency of the Google searches motivate me to post the following &#8230; <a href="http://www.smallersystems.com/blog/2011/07/can-you-use-ltfs-on-lto4-or-earlier-media/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/07/can-you-use-ltfs-on-lto4-or-earlier-media/">Can you use LTFS on LTO4 or earlier media?</a>.&rdquo;</em></p></p>]]></description>
				<content:encoded><![CDATA[<p>I have noticed a pattern of Google searches related to the question <em>“Can LTFS be used with LTO4 media?”</em>. This question is implicitly answered in other posts but the frequency of the Google searches motivate me to post the following explicit answer.</p>
<p>LTFS relies on the cartridge partitioning support that was introduced in the LTO5 specification by the <a href="http://www.lto.org">LTO Consortium</a>. Earlier generations of LTO media and drives do not have this partitioning capability and are therefore unable to support the LTFS on-tape format. </p>
<p>Support for multiple partitions at the media and hardware level is the key enabling functionality that allowed my team at IBM to invent and implement the LTFS technology. The details of how LTFS uses partitioning and the tape media are the subject of other posts on this blog, specifically <em><a href="http://www.smallersystems.com/blog/2011/06/partitions-on-lto5/">Partitioning in LTO5 and LTFS</a></em>, and <em><a href="http://www.smallersystems.com/blog/2011/06/how-does-ltfs-work/">How does LTFS work?</a></em>.</p>
<p>Without partitioning support there are limited options for where the file-system metadata (or &#8220;Index&#8221;) may be stored on the media. With LTO generations prior to LTO5 these limited options are all that we have to work with. None of these options provide a satisfactory mix of performance, data safety, and business opportunity to make it practical to pursue LTFS on these older generations.</p>
<p>LTFS is available for LTO5 from all current drive vendors (<a href="http://www-03.ibm.com/systems/storage/tape/ltfs/">IBM</a>, <a href="http://h71028.www7.hp.com/enterprise/us/en/solutions/storage-linear-tape-file-system.html">HP</a>, and <a href="http://www.quantum.com/Products/TapeDrives/LTOUltrium/LTO-5/LTFS/Index.aspx">Quantum</a>). Additionally, LTFS is available for IBM&#8217;s enterprise tape product the <a href="http://www-03.ibm.com/systems/storage/tape/ts1140/">TS1140</a> (aka Jaguar) and has been ported by Oracle to their <a href="http://www.oracle.com/us/products/servers-storage/storage/tape-storage/t10000c-tape-drive-292151.html" class="broken_link">T10000C</a> product line. At this point LTFS has been adopted by all actively developed data tape technologies.</p>
<p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/07/can-you-use-ltfs-on-lto4-or-earlier-media/">Can you use LTFS on LTO4 or earlier media?</a>.&rdquo;</em></p></p><img src="http://feeds.feedburner.com/~r/MichaelRichmond/~4/DkR0FJBv8ks" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.smallersystems.com/blog/2011/07/can-you-use-ltfs-on-lto4-or-earlier-media/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.smallersystems.com/blog/2011/07/can-you-use-ltfs-on-lto4-or-earlier-media/</feedburner:origLink></item>
		<item>
		<title>sync() behavior in LTFS</title>
		<link>http://feedproxy.google.com/~r/MichaelRichmond/~3/gU9_VdR8N7U/</link>
		<comments>http://www.smallersystems.com/blog/2011/07/sync-behavior-in-ltfs/#comments</comments>
		<pubDate>Thu, 07 Jul 2011 02:46:45 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[LTFS]]></category>
		<category><![CDATA[DataStorage]]></category>
		<category><![CDATA[sync]]></category>
		<category><![CDATA[system call]]></category>

		<guid isPermaLink="false">http://www.smallersystems.com/blog/?p=318</guid>
		<description><![CDATA[<p>Modern operating systems typically maintain an in-kernel cache of file-system metadata and small buffers of recent writes to open files. The file-system metadata typically includes data such as the filename, timestamps, and permissions for recently accessed files and directories. This &#8230; <a href="http://www.smallersystems.com/blog/2011/07/sync-behavior-in-ltfs/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/07/sync-behavior-in-ltfs/"><code style="font-family: monospace; font-size: larger; font-weight: lighter;">sync()</code> behavior in LTFS</a>.&rdquo;</em></p></p>]]></description>
				<content:encoded><![CDATA[<p>Modern operating systems typically maintain an in-kernel cache of file-system metadata and small buffers of recent writes to open files. The file-system metadata typically includes data such as the filename, timestamps, and permissions for recently accessed files and directories. This metadata cache and the write buffers are periodically flushed to the storage media automatically by the system. This flush operation is commonly referred to as the <code style="font-family: monospace;">sync()</code> operation named after the user-space system call that exposes the functionality in UN*X-based systems such as Linux and Mac OS X. In Microsoft Windows this functionality is exposed by the <code style="font-family: monospace;">FlushFileBuffers()</code> call. <code style="font-family: monospace;">sync()</code> is so named because the system call &#8220;synchronizes&#8221; the file-system.</p>
<p>This blog entry outlines the <code style="font-family: monospace;">sync()</code> behavior in <a href="http://en.wikipedia.org/wiki/LTFS" title="Linear Tape File System">LTFS</a> and the rational behind the associated design choices. <span id="more-318"></span>In this post, comments that reference the <code style="font-family: monospace;">sync()</code> system call  apply equally to the <code style="font-family: monospace;">FlushFileBuffers()</code> call in LTFS-SDE for Windows.</p>
<p><!--more--></p>
<p>The Linear Tape File System &#8211; Single Drive Edition (LTFS-SDE) maintains the working copy of the Index for the LTFS Volume in main memory while the file-system is mounted. Additionally, individual write calls are cached in memory in block-size memory buffers in an attempt to write large blocks of data to the media rather than performing many very small writes to the media. This write-caching dramatically increases write performance of the file-system. The metadata caching is briefly described in <a href="http://www.smallersystems.com/blog/2011/06/how-does-ltfs-work/" title="How does LTFS work?">an earlier blog post</a>. Write-buffer caching in LTFS-SDE will be discussed in a future post. This metadata cache and the write-buffers are at risk in the event of a system crash or power-loss.</p>
<p>In LTFS there is also the additional concern about frequency of <code style="font-family: monospace;">sync()</code> operations. A file-system on random access media such as flash or a hard-drive can update the on-media Index in-place. This means that frequent updates to the on-media Index will over-write older versions and therefore will usually occupy the same amount of media space. With sequential media there is a real risk of consuming all of the media space with metadata Indexes leaving no room for data storage. Careful design of our <code style="font-family: monospace;">sync()</code> operations in LTFS has resulted in a balanced and safe range of <code style="font-family: monospace;">sync()</code> functionality that can be tweaked to meet differing user scenarios.</p>
<h3 style="font-family: sans-serif;">LTFS v1.0 and v1.1</h3>
<p>The first two releases (v1.0 and v1.1) of the Linear Tape File System took a very simple approach to synchronizing the metadata cache and write-buffers. In these releases, the Index metadata is only flushed to the media is when a partition change occurs, or when the Volume is unmounted. In typical operation (without a data placement policy defined) there will never be a partition change to the Index Partition. In effect, an Index will only be flushed during <code style="font-family: monospace;">unmount</code>. (For the purpose of this blog post I will ignore data placement policies to simplify the discussion.)</p>
<p>Since LTFS v1.0 and v1.1 will only flush the Index during unmount, if the system loses power the user is exposed to potentially losing all of the data changes made to the Volume during the entire mount session. This data loss would include any files written to the LTFS Volume, any changes made to files already on the LTFS Volume, and any metadata updates such as file deletes, file renames, file moves, and timestamp updates.</p>
<h3 style="font-family: sans-serif;">Traditional file-systems</h3>
<p>Traditional file-systems (NTFS, HFS+, ext3, etc) maintain a similar in-memory working cache of parts of the file-system Index and write-buffers. These caches and write-buffers help improve file-system performance. At any point with these traditional systems there is the potential for the same types of data loss described above if the in-memory file-system Index has not been flushed to the storage media. This is the primary reason for requiring an explicit unmount operation before disconnecting a hard drive from a running system. In Linux, the unmount operation is performed using the “<code style=font-family: monospace;">umount</code>” command. In Windows, the unmount operation is performed using the “Safely Eject Device” GUI action.</p>
<p>In modern systems the a background kernel thread takes periodic action to reduce the this risk of data loss by triggering a flush of the in-memory file-system Index cache. This periodic action is typically performed every 5 seconds and flushes any changes to mounted file-systems. As a result, the window of risk with traditional file-systems is limited to the last 5 seconds of operation.</p>
<h3 style="font-family: sans-serif;">LTFS v1.2</h3>
<p>With LTFS-SDE v1.2 we added two new <code style=font-family: monospace;">sync()</code> behaviors to help reduce the risk of data loss. These behaviors have different semantics and are appropriate in different user scenarios. The new behaviors are:</p>
<ul>
<li>Time-based sync, and</li>
<li>Sync-on-close.</li>
</ul>
<p>“Time-based sync” behaves as logically equivalent to the traditional operating system driven <code style=font-family: monospace;">sync()</code> operation. That is, at a defined time period the file-system will flush the in-memory Index to the media if there are any changes to the Index that only exist in-memory. The sequential nature of tape prompted me to set the default time period for time-based sync at 5 minutes. Thus the user is exposed to data loss for only the past 5 minutes of operation. On balance I felt that 5 minutes was a reasonable compromise between “wasting” a large amount of tape space for frequent Index updates versus the time period during which the user is exposed to data loss. The default time period can be overridden at mount time by users who have particular requirements.</p>
<p>“Sync-on-close” provides a <code style=font-family: monospace;">sync()</code> semantic where each time a file is closed the in-memory Index is flushed to the media if the Index has been updated. This ensures that each time the user finishes operating on a file all changes in the file-system are flushed to the media. Some metadata changes do not involve a <code style=font-family: monospace;">close()</code> operation. With these metadata operations there is potential risk to losing the result of these operations in the event of power-loss. Myself and the other members of the LTFS development team felt that the metadata operations that remain at risk are operations that can tolerate higher risk than file-content.</p>
<p>In LTFS-SDE v1.2 the user can specify “time-based sync” or “sync-on-close” at file-system mount time. The desired <code style="font-family: monospace;">sync()</code> behavior can also be configured system-wide in the ltfs configuration file.</p>
<p>If “time-based sync” or “sync-on-close” are enabled the file-system will still perform a <code style="font-family: monospace;">sync()</code> during unmount operations.</p>
<h3 style="font-family: sans-serif;">Manual <code style="font-family: monospace; font-size: x-large;">sync()</code></h3>
<p>LTFS-SDE v1.2 also exposes the ability for the user (or an application) to manually trigger a file system <code style="font-family: monospace;">sync()</code> by writing to the <code style="font-family: monospace;">ltfs.sync</code> extended attribute. If this <code style="font-family: monospace;">sync()</code> is triggered while there are open file handles there is the potential that the Index written will contain partially written files.</p>
<p>All versions of LTFS-SDE to date ignore <code style="font-family: monospace;">sync()</code> system calls from user-space. This is a limitation of the <a href="http://fuse.sourceforge.net/" title="Filesystem in Userspace">FUSE</a> library. The FUSE developers are rightfully concerned about a FUSE-based file-system taking an arbitrarily long time to complete a <code style="font-family: monospace;">sync()</code> during which the whole system will be blocked. The <code style="font-family: monospace;">ltfs.sync</code> extended attribute and the time-based sync are approaches to provide traditional <code style="font-family: monospace;">sync()</code> functionality without FUSE support for the <code style="font-family: monospace;">sync()</code> system call.</p>
<h3 style="font-family: sans-serif;">Potential user concerns</h3>
<p>In the situation where “time-based sync” is enabled and a file copy is performed that exceeds the sync timeout value an Index may be written to the media in the middle of the copy operation. Assume that Index generation 4 was written before the copy started and Index generation 5 is written in the middle of the file copy operation. Index generation 5 will contain an entry for the file that is in the middle of the copy operation and only the data that has landed on the media will be referenced in this Index. This means that if the file copy is 50% done when the <code style="font-family=monospace;">sync()</code> occurs then the Index will only reference the first half of the file being copied. If, at a later date, the user chooses to roll-back the Volume to Index generation 5 then the Volume will only contain the first half of the file after the roll-back. This may be perceived by the user as a data-loss scenario, but technically the roll-back has not resulted in a loss of data. Index generation 5 will correctly represent the state of the LTFS Volume at the point in time when the Index was written.</p>
<p>We explored ways to remove this perceived problem but none of the potential changes will eliminate this issue. In fact, this partial-write being perceived as data-loss exists with any <code style="font-family: monospace;">sync()</code> operation that is performed outside of the unmount processing. For example, consider a Volume that is mounted with only sync-on-close enabled and two files (<code style="font-family: monospace;">A.txt</code> and <code style="font-family: monospace;">B.txt</code>) are simultaneously copied to the filesystem from two different copy commands. If <code style="font-family: monospace;">A.txt</code> is significantly smaller than <code style="font-family: monospace;">B.txt</code> then the <code style="font-family: monospace;">close()</code> operation on <code style="font-family: monospace;">A.txt</code> will trigger a sync operation. Assume that this <code style="font-family: monospace;">sync()</code> operation produces Index generation 10 on the Volume. If a user then rolls back the volume to generation 10 they will find that only part of file <code style="font-family: monospace;">B.txt</code> exists on the Volume.</p>
<p>A potential solution would be to track open file handles that are open as a side-effect of a <code style="font-family: monospace;">create()</code> call. If these handles were tracked the file system could theoretically prevent a sync operation until these handles were closed. This approach would reduce the potential for partial files on roll-back. However, this approach would not cover cases where a copy operation is performed on a filename that already exists in the filesystem. In the case where the file already exists applications typically use &#8220;<code style="font-family: monospace;">open()</code>&#8221; followed by either a truncate or seek to the beginning of the file and just start overwriting the file contents. In these cases we still would get partial writes on the Volume if a roll-back is performed.</p>
<p>All of these partial write scenarios exist in traditional file-systems that operate on flash and hard drive media. However the scenarios are hidden on the traditional media because the Index is updated in place rather than recording a sequence of Index snapshots as happens with LTFS. </p>
<p>My team explored a number of potential changes to address the concern over partially written files appearing after a file-system roll-back. We did not find an approach to addressed all partially written file scenarios without introducing significant complexity into the file-system. My judgement was that the risk of added complexity did not justify the development effort.</p>
<p>In a future version of the LTFS Specification I hope to extend the LTFS Format to keep track of the number of open files when an Index is written to the media. If this open file count is written as part of the LTFS Index it could be exposed in the roll-back point list. This change would not remove the potential for partially written files but it would expose to the user the necessary information for them to understand which Index generations may have partial files. The user can then make an informed choice about which generation to select. I believe that this extension the best way to address concerns over partially written files.</p>
<p><!--<br />
These caches and write-buffers help improve file-system performance and are a significant reason for the need to "Safely Eject Hardware" (on Microsoft Windows) or use the <code style="font-family: monospace;">unmount</code> command (on Linux/Mac OS X) before removing a storage device. Typically the background kernel thread will trigger the <code style="font-family: monospace;">sync()</code> operation on the order of every 5 seconds.<br />
--></p>
<p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/07/sync-behavior-in-ltfs/"><code style="font-family: monospace; font-size: larger; font-weight: lighter;">sync()</code> behavior in LTFS</a>.&rdquo;</em></p></p><img src="http://feeds.feedburner.com/~r/MichaelRichmond/~4/gU9_VdR8N7U" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.smallersystems.com/blog/2011/07/sync-behavior-in-ltfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.smallersystems.com/blog/2011/07/sync-behavior-in-ltfs/</feedburner:origLink></item>
		<item>
		<title>How does LTFS work?</title>
		<link>http://feedproxy.google.com/~r/MichaelRichmond/~3/lxn9rMwP5Tw/</link>
		<comments>http://www.smallersystems.com/blog/2011/06/how-does-ltfs-work/#comments</comments>
		<pubDate>Sat, 25 Jun 2011 04:09:36 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[LTFS]]></category>
		<category><![CDATA[DataStorage]]></category>

		<guid isPermaLink="false">http://www.smallersystems.com/blog/?p=343</guid>
		<description><![CDATA[<p>The Linear Tape File System (LTFS) relies on support for partitioning was introduced in LTO generation 5. Partitioning a LTO5 cartridge divides the media in two separate data storage areas known as &#8220;partitions&#8221;. Each partition can be written to without &#8230; <a href="http://www.smallersystems.com/blog/2011/06/how-does-ltfs-work/">Continue reading <span class="meta-nav">&#8594;</span></a></p><p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/06/how-does-ltfs-work/">How does LTFS work?</a>.&rdquo;</em></p></p>]]></description>
				<content:encoded><![CDATA[<p>The Linear Tape File System (LTFS) relies on support for partitioning was introduced in LTO generation 5. Partitioning a LTO5 cartridge divides the media in two separate data storage areas known as &#8220;partitions&#8221;. Each partition can be written to without impacting data stored in the other partition on the media.</p>
<p>A data tape formatted for use with LTFS has two partitions, an Index Partition (IP) and a Data Partition (DP). The Index Partition has a relatively small capacity of 37.5GB. The Data Partition comprises the remaining 1.43TB of available capacity on the media.</p>
<p>LTFS writes an Index that holds all the file and folder meta-data for the LTFS Volume to the Index Partition. The <a href="http://www.ultrium.com/technology/ltfs.html">LTFS Format Specification</a> defines that a consistent LTFS Volume must, along with other properties, have the most-recent Index written to the end of both the IP and the DP. In the diagram below, &#8220;Index<sup>2</sup>&#8221; is the most-recent Index. The specification defines that an LTFS  Volume must be consistent when it is exchanged with another system. In practice, this means that any compliant implementation of the specification that operates on an LTFS Volume must ensure that the media is consistent when the media is ejected.</p>
<p>At mount-time the LTFS software reads the current Index from the IP and builds an in-memory structure representing all of the folders and files stored on the media. This structure contains meta-data such as file timestamps, file permissions, file name, file size, etc. The structure also contains the location on the DP for each data extent that holds part of the file content.</p>
<p>When a user or an application traverses a mounted Linear Tape File System the LTFS software can return filenames, folders, timestamps, file sizes, and other meta-data from the in-memory index structure. When the user double-clicks on a file to open it, or an application reads from a file the LTFS software causes the tape drive to seek to the start of the relevant data extents and reads the data from the tape media.</p>
<p>LTO5 tape drives are able to stream data for reading and writing at 140MB/s. This speed is about 40% higher than the best hard-drives which top out at around 100MB/s. Of course, since LTO data tape is sequential access media there is a high seek time for data tape. Worst case seek time is moving from one end of the physical tape to the other end. An end-to-end seek will take roughly 90 seconds. So the average seek time is around 45 seconds.</p>
<div id="attachment_347" class="wp-caption aligncenter" style="width: 765px"><img src="http://www.smallersystems.com/blog/wp-content/uploads/2011/06/LTFS-Logical-Layout.png" alt="" width="700"  class="size-full wp-image-347" /><p class="wp-caption-text">Logical layout of a LTFS Volume on LTO5 media. Beginning of Tape (BOT) at the left edge of diagram, End of Tape (EOT) at the right edge. Diagram is not to scale. BOT to EOT is 846 meters (~2775 feet) and tape width top-to-bottom is 1.27 centimeters (1/2 inch).</p></div>
<p>LTO5 data tape writes data in a sequence of wraps on the physical media. Each wrap consists of one track of data written in a forward direction along the length of the tape plus another track of data written in a reverse direction along the length of the tape. There are 80 such wraps on LTO5 media. To fully traverse all of the stored data on a full LTO 5 cartridge requires traversing the length of the tape one-hundred and sixty times. (Eighty times in the forward direction interleaved with eighty times in the reverse direction.)</p>
<p>As a result of the wrap-based data layout a seek to the beginning of a randomly selected file is often quite fast. Typically a seek to the beginning of a file will only require a short tape movement along the length of the tape along with a lateral head movement that is perpendicular to the axis of tape movement. These lateral head moves are performed in a few seconds.</p>
<p>Writes to a file stored in LTFS are performed by seeking to the end of the data and writing the file content to the media. If the file already exists in the LTFS volume then only the &#8220;over-written&#8221; areas of the file are written at the end of the DP. The extent list for such files that are modified &#8220;in-place&#8221; (on tape media) is updated to insert the new extents into the appropriate offsets in the extent list for the file.</p>
<p><p><em style="color: #B0B0B0; text-decoration: none;">&ldquo;Original article found at  <a href="http://www.smallersystems.com/blog/2011/06/how-does-ltfs-work/">How does LTFS work?</a>.&rdquo;</em></p></p><img src="http://feeds.feedburner.com/~r/MichaelRichmond/~4/lxn9rMwP5Tw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.smallersystems.com/blog/2011/06/how-does-ltfs-work/feed/</wfw:commentRss>
		<slash:comments>28</slash:comments>
		<feedburner:origLink>http://www.smallersystems.com/blog/2011/06/how-does-ltfs-work/</feedburner:origLink></item>
	</channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

 Served from: www.smallersystems.com @ 2013-05-15 00:42:47 by W3 Total Cache -->
