Aug 30 2009

Setting up a home NAS using OpenSolaris and ZFS

I got my inspiration for this project from reading the following posts on Adam Retter’s blog:

I particularly liked that he made every attempt to make the NAS energy efficient. The hardware he chose made sense, so I essentially bought the same parts he used.

Part suppliers used:

NewEgg has been a great supplier. I use them often and have always been provided great service. One of my hard drives went bad within two days and they made the RMA process painless. Lucky for me ZFS saved the day and I did not lose any data. OrbitMicro provided excellent service as well.

This post does not cover the parts used or steps for assembling the NAS. Please use the steps on Adam Retter’s blog. The posts are linked above.

Here are the steps that I took to set up OpenSolaris and turn it into a storage server for the house.

Downloaded and burned the OpenSolaris iso. I used version 2009.06 which was current at the time of writing. Downloads are available from http://www.opensolaris.com/get/

Tweaked BIOS settings:

  • Disabled all Serial ports
  • Enabled IDE Busmastering
  • Enabled hyperthreading

Booted up the NAS with the OpenSolaris CD in the drive and double-clicked on Install OpenSolaris. The install took some time, and then booted into the Gnome-based environment.

Downloaded the gani driver for my NICs. The built-in rge driver appears to have problems. To install it, I followed the directions in the README.txt file that was distributed with it.

Commands below assume that you are in a root shell. The easiest way seems to be using this command:

  • pfexec bash

This device is going to be a server and I did not want to use up resources having the graphical environment loaded, so I took the following steps:

  • Opened the terminal
  • Typed svcadm disable gdm to disable the graphical environment (you can always type the same command substituting enabled to bring back the GUI)

Then I logged in to the console

Now I disabled the graphical boot and sped up the boot process

  • nano /rpool/boot/grub/menu.lst
  • Changed timeout 30 to timeout 2
  • Removed:
    splashimage /boot/solaris.xpm
    foreground d25f00
    background 115d93
    ,console=graphics

Then I wiped out a lot of the system configuration to properly set up networking:

  • sys-unconfig

Now the system booted into a text-based setup where I set up networking. There are ways to do this all by hand, but the setup makes it easier.

I followed the directions in the Building my DIY NAS post on Adam Retter’s blog to:

  • set up my zfs pool
  • installed the solaris smb software
  • set up users*
  • created zfs file systems

* I set up the users a little differently. After using groupadd to add the groups, I modified the command used to create the users. I essentially removed creating a home directory for the user and changed their shell to /bin/false so they could not log in to the NAS at the console or using SSH:
useradd -c "Name" -g group -G vusers -s /bin/false name

If you have problems with permissions, it my be related to Solaris ACLs and inheritance. These links might help with that:

Performance tweaks I saw listed here and there on the internet.

  • nano /etc/system
  • added the following lines to the bottom of the file
    set pcplusmp:apic_intr_policy=1
    set zfs:zfs_txg_synctime=1

Then I rebooted the NAS. My understanding is the first line changes how interrupts are handled and may increase network IO. The second seems to tell zfs to sync changes to disk more often.

Before these changes I could not use gzip-2 compression on the pool. (Remember this is a very underpowered dual-core Intel Atom processor.) From time to time kernel CPU percentage would spike and file transfers would freeze. Now while writing a file, the kernel CPU % jumps up and down more frequently, but never goes as high.

Maybe someone else could chime in and give us further insight on the performance tuning.

Additional steps taken:
Automatic email alerting of zpool problems and weekly zpool scrub
Using MDNS to advertise OpenSolaris NAS to Mac computers

Please see the OpenSolaris and Storage categories for any future posts about this that may not be linked here.


Sep 14 2006

Happily impressed with Myth 0.20

I’m not going to spend too much time on this post. Maybe in the near future. I just spent a lot of time trying to analyze the National Surveillance Act of 2006.

I am impressed so far. After switching MythTV over to using OpenGL I am greeted with a nice fade-in and fade-out on the menus.

The integrated upnp server has been working perfectly (except for fast-forward, but I’ve had that problem with another upnp server too). It is nicer than my previous solution of using uShare and a renaming script to produce prettily-named symlinks to the video files. The integrated upnp server allows you to search by date recorded, title of the show, channel it was recorded from, … My old solution could only sort by title of show.

Good job Myth Team!


Sep 11 2006

MythTV 0.20 has been released!

This release has one feature that I have been longing for, an internal UPnP server. I have been using uShare, the MythRename.pl script, and a a few cron jobs to pipe the PVR content to my D-Link DSM-320.

Thread on the progress of the MythTV 0.20 Ebuild
Continue reading


Aug 31 2006

Old News – Computerworld.com: Offshore outsourcing cited in Florida data leak

This is old news. The only reason that I am posting it is because it has to do with the contractor who is handling the improperly programmed People First Employment Portal.

Offshore outsourcing cited in Florida data leak
Employees who worked for the state during the 18-month period between Jan. 1, 2003, and June 30, 2004, may be affected, according to an e-mail message sent to all state employees on March 16. The state’s Department of Management Services (DMS), which oversees the People First system, estimates that 108,000 current and former state employees may be affected by the data breach, although that estimate could change as the department’s investigation into the matter continues.

The e-mail was sent after a subcontractor of outsourcing service provider Convergys Corp. improperly allowed subcontractors in India to index state personnel files, said DMS spokeswoman Tiffany Koenigkramer. The offshoring was done as part of Convergys’s nine-year, $350 million contract to manage the state’s personnel work.

This looks not to be Convergys Corp’s fault. The simple to remedy problem with the People First Portal; however, is their fault. I emailed them to no avail.


Aug 28 2006

Vixenk.net: Why Should I Use Free Software as Opposed to Pirating Non-free Software

I had come to the conclusion that pirating software was not at all in my best interests quite some time ago. I just found Vixenk.net’s post
Why Should I Use Free Software as Opposed to Pirating Non-free Software. The author lays down the argument against pirating software far more eloquently than I could have. She also provides a list to some free programs that are very useful.


Aug 27 2006

Email to state – PeopleFirst@dms.myflorida.com

I followed the the advice of a user of digg, Sillywampa, on Digg’s entry about my earlier post on Florida’s People First Job Portal and emailled PeopleFirst@dms.myflorida.com about this issue. Here is what I wrote:
Continue reading


Aug 26 2006

IVTV DMA error fix? Patch from Author

Hans Verkuil, the developer behind ivtv, thinks that he may have found the source of the DMA problems that some have been experiencing. From the mailing list:
Continue reading


Aug 25 2006

State of Florida job portal shuts out alternative browsers

Update: I wrote a post about an email I sent to the State of Florida and the response I received. This was suggested by Sillywampa on Digg. Thanks Sillywampa for the email address.

The State of Florida’s People First job portal is still running an outdated script that locks out users of alternative browsers from applying to state jobs. The only supported browsers are Internet Explorer and Netscape Navigator.
Continue reading


Aug 10 2006

NewsForge: Stallman, Torvalds, Moglen share views on DRM and GPLv3

The GPLv3 license is in the works. One of the provisions is to restrict software from using DRM. This, argues Linus Torvalds, is not the job of a license. He is against these new provisions. The article below goes on to defend the license.

I have been deeply against DRM for some time. Linus Torvald’s objection to the license really makes me think. He is the one who got the linux operating system going. I respect his point of view, and am not sure on which side of the fence I stand about the license itself. I am still against DRM.
Continue reading


Aug 9 2006

Slashdot: Intel Open Sources Graphics Drivers

Many graphics drivers in linux are currently reverse-engineered. A lot of them only support 2d. Intel has open-sourced their graphics drivers for the 965 Express chipset family. Bravo, Intel. This will allow for computers with those graphics cards to take full advantage of the hardware.

Slashdot | Intel Open Sources Graphics Drivers:

“Intel’s Keith Packard announced earlier today that Intel was open sourcing graphics drivers for their new 965 Express Chipset family graphics controllers.