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 the light-colored area of the bar, it’ll show you how much space is free, as you can see below.

FreeNAS System Status (default)

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’m lazy, but not so lazy that I couldn’t find the code to change the system status display to my liking. Here’s the results…

FreeNAS System Status (Modified)

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’re there, type “/usr/local/www/index.php” (without quotes) into the File path box, and then click the Load button. From here, you will have to modify a line of code.

Find:
echo sprintf(gettext("%s of %sB"), $diskusev['capacity'], $diskusev['size']);
and change to:
echo sprintf(gettext("%s of %sB (%sB Used / %sB Free)"), $diskusev['capacity'], $diskusev['size'], $diskusev['used'], $diskusev['avail']);

Once you’ve changed that line, click the Save button. The change will be effective immediately, so navigate to the Status/System page to see the results.

You will notice that the Free space + Used space doesn’t equal the total size that is shown. For my system, I reserved 8% “Minimum free space” when formatting the drives. So I believe the erroneous total figure is a bug, because it doesn’t take into account the “Minimum free space” that you reserved. Perhaps I’ll look into fixing that at a later time, but for now, enjoy the hack.

Keep in mind that if you upgrade your version of FreeNAS, you will probably have to do this again.

-Trystian

  • Share/Bookmark
Trystian Sky is powered by WordPress. Theme designed by TrystianSky.com
5437 visitors since June 24, 2008