<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Trystian Sky &#187; freenas</title>
	<atom:link href="http://www.trystiansky.com/topic/freenas/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.trystiansky.com</link>
	<description>Serendipity Adrift - Flowing through Time &#38; Space; Observing, Exploring, and Finding interesting things new and old.</description>
	<lastBuildDate>Tue, 17 Nov 2009 17:41:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to display free space on FreeNAS system status page</title>
		<link>http://www.trystiansky.com/2008/07/30/how-to-display-free-space-on-freenas-system-status-page/</link>
		<comments>http://www.trystiansky.com/2008/07/30/how-to-display-free-space-on-freenas-system-status-page/#comments</comments>
		<pubDate>Wed, 30 Jul 2008 22:03:23 +0000</pubDate>
		<dc:creator>Trystian</dc:creator>
				<category><![CDATA[NAS]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[freenas]]></category>
		<category><![CDATA[hacking]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://www.trystiansky.com/?p=28</guid>
		<description><![CDATA[After a few weeks of researching which type of NAS (Network Attached Storage) system I wanted, I ultimately went with FreeNAS (0.686.4 revision 3374).
One thing that bothered me was that on the Status/System page, it only showed the percent used and maximum space, along with a graphic bar representing the same info. If you mouse-over [...]]]></description>
			<content:encoded><![CDATA[<p>After a few weeks of researching which type of NAS (Network Attached Storage) system I wanted, I ultimately went with FreeNAS (0.686.4 revision 3374).</p>
<p>One thing that bothered me was that on the Status/System page, it only showed the percent used and maximum space, along with a graphic bar representing the same info. If you mouse-over the light-colored area of the bar, it&#8217;ll show you how much space is free, as you can see below.</p>
<p><img src="http://www.trystiansky.com/wp-content/uploads/2008/07/freenas_systeminfo_1.jpg" alt="FreeNAS System Status (default)" title="FreeNAS System Status (default)" width="572" height="312" class="aligncenter size-medium wp-image-29" /></p>
<p>I would like to see how much used and free space there is for each drive at a glance, without having to mouse-over anything. Yes, I&#8217;m lazy, but not so lazy that I couldn&#8217;t find the code to change the system status display to my liking. Here&#8217;s the results&#8230;</p>
<p><img src="http://www.trystiansky.com/wp-content/uploads/2008/07/freenas_systeminfo_2.jpg" alt="FreeNAS System Status (Modified)" title="FreeNAS System Status (Modified)" width="572" height="312" class="aligncenter size-full wp-image-30" /></p>
<p>In order to do this, you have to navigate to the Advanced/Edit File menu at the bottom of the navigation panel on the left side of the page.  Once you&#8217;re there, type &#8220;/usr/local/www/index.php&#8221; (without quotes) into the <strong>File path</strong> box, and then click the <strong>Load</strong> button. From here, you will have to modify a line of code.</p>
<p>Find:<br />
<code>echo sprintf(gettext("%s of %sB"), $diskusev['capacity'], $diskusev['size']);</code><br />
and change to:<br />
<code>echo sprintf(gettext("%s of %sB (%sB Used / %sB Free)"), $diskusev['capacity'], $diskusev['size'], $diskusev['used'], $diskusev['avail']);</code></p>
<p>Once you&#8217;ve changed that line, click the <strong>Save</strong> button. The change will be effective immediately, so navigate to the Status/System page to see the results.</p>
<p>You will notice that the Free space + Used space doesn&#8217;t equal the total size that is shown.  For my system, I reserved 8% &#8220;Minimum free space&#8221; when formatting the drives. So I believe the erroneous total figure is a bug, because it doesn&#8217;t take into account the &#8220;Minimum free space&#8221; that you reserved. Perhaps I&#8217;ll look into fixing that at a later time, but for now, enjoy the hack.</p>
<p>Keep in mind that if you upgrade your version of FreeNAS, you will probably have to do this again.</p>
<p>-Trystian</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fwww.trystiansky.com%2F2008%2F07%2F30%2Fhow-to-display-free-space-on-freenas-system-status-page%2F&amp;linkname=How%20to%20display%20free%20space%20on%20FreeNAS%20system%20status%20page"><img src="http://www.trystiansky.com/wp-content/plugins/add-to-any/ts_share_save.png" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://www.trystiansky.com/2008/07/30/how-to-display-free-space-on-freenas-system-status-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
