Tag Archives: OpenSolaris

OpenSolaris and SATA Controller Dawicontrol DC-310e

Finding a SATA controller for OpenSolaris is a bit more difficult than for Windows or Linux. Having scanned various web sites and mailing list archives I had come to the conclusion that something based on a Silicon Image 3124 or 3132 (SIL 3124/3132) would probably be the best choice. The other thing that proved to be challenging was to find something I could actually buy in Germany. Various models had received good feedback but were seemingly not available here, whereas it seemed easy to get them in the US or UK. So I finally ended up with the Dawicontrol DC-310e (product overview in German), that works with OpenSolaris. (Interestingly, you will probably not find this controller outside of German speaking countries.)

What is nice about the DC-310e is its capability to disable the BIOS by removing a jumper. Most such adapters come with some obscure form of RAID functionality, which is certainly something you want to be careful about. And for ZFS you definitely just want a plain controller without anything else. So for almost all SATA controllers the first thing you need to do is flash their BIOS with a non-RAID version. Although technically not so challenging it is a tedious activity and I was happy not having to do it.

During initial testing of the Dawicontrol DC-310e I witnessed a few situations when my system (running Nexenta 3.0) froze completely under load. This had not happened with the built-in SATA ports.  My final approach, or rather workaround, was to only use one of the two ports of the DC-310e and since then I have had no problems. I am still not really sure what the actual root cause was. E.g. I had also changed the PCIe slot because the one used initially did not put a firm grip on the card. Since I stopped working on the issue once I had found a working configuration,  it would be unfair to simply blame the controller. The system has been in use for more than six months now without issues.

OpenSolaris Upgrade

I just upgraded my OpenSolaris box from 2009.06 (snv_111b) to the latest development build (snv_131 from January 14th, 2010). The main reason was the broken CIFS server that comes with 2009.06. And although the next release is pretty much around the corner (2010.02), I needed the beast in a working state now.

The good thing about such upgrades is that thanks to ZFS and its snapshot functionality, a roll-back is trivial. The package manager will automatically create the snapshot and also create a new entry in the Grub menu for the upgraded OS. So if things go badly wrong, you can just select the old version and continue from there.

The upgrade itself is a three-step process

  • Change repository URL from release to development builds
  • Upgrade package manager
  • Upgrade other packages

The URL change for the repository is done with the following command
$ pfexec pkg set-publisher -O http://pkg.opensolaris.org/dev opensolaris.org
The update of the package manager is done like that
$ pfexec pkg install SUNWipkg
To start the upgrade from a shell, run this command
$ pfexec pkg image-update
If you want the GUI version, please execute
$ gksu packagemanagerand press the “Update All” button.

Part of the upgrade (bug or feature?) is that the permissions of /dev/ptmx will be changed. The result is that shell access via an SSH login is not possible any more. Since my box is headless, SSH is the only way to work on it. So it’s a real problem. Fortunately, it is only the shell access that is blocked (and this not only via SSH but universally) and giving the error message:
PTY allocation request failed on channel 0

The execution of commands via SSH is still working. So you just have to issue the following command:
$ ssh -l user host "pfexec chmod 666 /dev/ptmx"

which will fix the problem. It seems that for people working directly on the machine, the solution is to blindly enter the command from above.

Building a NAS with OpenSolaris and ZFS

A few weeks ago I have finally made the big step and built my own NAS with OpenSolaris using the ZFS file system. The main reason for this was the hassle of having multiple USB hard disks for redundancy purposes and also the relatively poor performance of USB 2.0. In the course of the decision process I had looked into the NAS systems that are available off-the-shelve. But they were either too slow or too expensive. If you want proper speed and resilience against hardware failure you pretty soon end up with systems that are 500+ Euros without any hard disk. And those are still somewhat inflexible. Of course they have the advantage of relatively low power consumption and special-purpose cases with mostly hot-swappable drives. In my case neither was relevant because I am the only person using it and the system is running only when my main machine is up.

When looking into the possible solutions I quickly realized that I want ZFS. It’s reliable, easy to set up, has fantastic features and does not require a hardware RAID controller (which alone saves you about half a grand). There is a ZFS module available for Linux but at the time people seemed to agree that it was in its infancy (relatively speaking). So it was down to FreeNAS and OpenSolaris. There were performance issues with FreeNAS (a known problem at the time), so I decided to go for the reference implementation, which of course meant Solaris. Interestingly, FreeNAS has recently announced to switch to Debian instead of FreeBSD and will therefore cease to support ZFS in the future.

There is bunch of great stuff on the net for exactly my use-case and I recommend you use your favourite search engine to find out more about the details. The one place that really stuck out was and still is Simon Breden’s blog. Make sure to check it out!

For those interested here is my setup:

  • 5* 1 TB WD Green configured as RAID-Z2 (equiv. RAID-6) with 2.8 TB net capacity
  • Asus M3A78-CM with AMD Athlon II X2 250
  • 8 GB ECC RAM
  • Intel® PRO/1000 GT Desktop Adapter (OpenSolaris did not work reliably with the built-in NIC)
  • Case Tacens Prior M

I have not really done any performance tuning so far and get around 55 MB/sec using CIFS server (not Samba). Neither have I used FTP or NFS so far (solely for lack of time). For those that have only worked with Linux before, be advised that Solaris is sufficiently different to greatly increase the time needed to set up things. Nevertheless I think it was the right decision and gives me a pretty flexible system.