Archive for the ‘opensolaris’ Category

Using Intel ATOM as OpenSolaris NAS engine

April 4, 2010 1 comment

I  recently started searching for a power- and price-efficient engine for modest-sized NAS, running OpenSolaris (Nexenta) of course.

The idea to go to Intel ATOM first comes from their high power efficiency (1-13W TDP). To really benefit from it, do not only take into account the power used by the CPU, but also the whole motherboard (you know, chipset and GPU [Graphic Processing Unit]).

ATOM is supposed to dissipate so little heat that a fan might not be necessary, so most motherboards for ATOM ship with passive/fanless cooling. I still wonder if it should not rely on some cooling offered from the case itself, especially when mechanical disks are part of the equation.

To fully benefit from OpenSolaris, and ZFS, a 64-bits CPU is recommended, and multiple cores would benefit a ZFS NAS without any doubt. So we are left with two families, or rather generations, (this is a shortcut, but it makes sense given the tiny pricing difference), the ATOM 330 and the ATOM D510 (have a look at At first glance, they are quite similar, except the D510 embeds a GPU on-die, which means its 13W TDP is about all it gets, while a 330 motherboard as a whole (including an added GPU) will significantly draw more power than the 8W advertised. And honestly, we don’t care about the performances of this GPU.

Then, most motherboards are somewhat limited in size, which means many extensions are just not available here:

  • RAM slot number (many times they are even SO-DIMM ones) and speeds, and lack of ECC support
  • PCI(e) slot number
  • SATA/PATA connectors
  • NIC numbers

Note that despite the restricted on-board size, most motherboards present a lot of different external connectors (USB, DVI, D-SUB, PS/2, IEEE 1394, …).

And finally, most motherboards only ship in mini-ITX form-factor, which is not even really compatible with (micro)ATX, though some claim it (is this real, I honestly can’t tell). This clearly makes it difficult to find an inexpensive, yet solid, case to host it.

Compare all that to regular AMD or Intel CPU and motherboards pricings, and you will see what I mean in this article.

So Intel’s ATOM is (not yet) wonderland for OpenSolaris-based NAS today. But I will probably try some day anyway. ;-)


Installing Squid on ZFS

March 24, 2010 1 comment

The recommended filesystem for Squid on OpenSolaris is ZFS:

It is also recommended to disable the atime property on the filesystem holding the cache, and you may want to avoid using any type of RAID.

To achieve this on Nexenta (or OpenSolaris, whatever), first create the ZFS filesystem:

# zfs create -o atime=off -o mountpoint=/var/spool/squid3 syspool/squidcache

Then install Squid (here for version 3.x, as you might have noticed from the command). On Nexenta Core Platform 3 (NCP3):

# apt-get install squid3

To further improve the setup, use the aufs storage. To do this, just enable and update option cache_dir in /etc/squid3/squid.conf to read aufs instead of ufs (and further modify that line to best suit your real cache usage).

Nexenta (OpenSolaris + Ubuntu)

May 31, 2009 3 comments

Vous le savez probablement, Sun a libéré (GPL v3) le code de son OS-phare (Solaris) il y a déjà quelques années.
La version communautaire de cet OS s’appelle assez logiquement OpenSolaris.
De cette version, en développement constant, sont issues les versions propriétaires de Sun (appelées “Solaris 10”).

Il tourne sous plusieurs architectures différentes: x86, x86_64 (selon la nomenclature Solaris, AMD64 selon la nomenclature Linux), et Sparc (l’architecture de Sun, pour les incultes). Il faut d’ailleurs savoir que cela fait longtemps que Solaris est à la fois 32 et 64 bits (multiarch, selon la nomenclature Linux).

Après une période de prise en main par une communauté (toujours assez réduite aujourd’hui, il faut bien le dire), plusieurs dérivés ont commencé à apparaître, menant à des versions LiveCD, des versions seulement pour une architecture ou une autre, …
Toutes intègrent tout ou parties des fonctionnalités particulières de Solaris (ZFS, SMF, Containers, DTrace, …).

Le problème de Solaris venant plutôt des outils utilisateurs (non-)fournis. Le choix (et souvent la qualité ou le côté pratique) est beaucoup plus vaste sous GNU/Linux.

Alors, plusieurs jouent le rapprochement avec Debian/Ubuntu, à des niveaux divers (avec ou sans Glibc, avec ou sans système de packaging correct, …).
Parmi celles-ci, l’une d’entre elles à retenu toute mon attention: Nexenta.

Nexenta est une petite société spécialisée dans le storage à base d’OpenSolaris (grâce à ZFS, qui Tue(tm)[1]). Pour son produit-phare, NexentaStor, elle a décidé d’utiliser un kernel OpenSolaris avec un userland Ubuntu[2].
Et pour (avoir une chance d’)obtenir de l’aide de l’extérieur, ils se basent sur une version communautaire, totalement libre[3], et appelée Nexenta Core Platform (qui en est à sa version 2.0, la version 3.0 étant en préparation).

Le problème principal de NCP est la fraîcheur des logiciels qui viennent du monde GNU/Linux, puis la non-intégration des Zones dans apt-clone (on ne peut pas mettre à jour les packages d’une zone non-globale). Mais c’est déjà actuellement une solution particulièrement adaptée comme serveur (de fichiers ou même applicatif).

Et donc voilà, c’est cool, mais il y a encore du travail pour que ce soit vraiment utilisable par le commun des mortels.

Read more…

HOWTO Rotate logs on Sun Solaris

September 15, 2004 2 comments
This article was first written in September 2004 for the BeezNest technical
website (

There is no generalized system to rotate and compress logs in Solaris, like GNU logrotate on Linux or newsyslog on FreeBSD.

Hopefully, Shaun Rowland wrote one: rotatelog. It is written as a Perl script meant to be run from cron, with a configuration file and documentation available.

Note: Starting from Solaris 9, there is a standard tool, called logadm, to rotate logs.

Go download the tar.gz file and untar it. Then go in the new directory, and execute make install. It will install everything by default under /usr/local/ (mainly /usr/local/sbin/rotatelog and /usr/local/etc/rotatelog.conf).

Adapt the rotatelog.conf file to your needs/wishes. Here is a sample, working configuration file for Solaris 8:

# $Id: rotatelog.conf,v 1.2 2001/04/22 23:01:36 rowland Exp $

# This a sample rotatelog configuration file.


# File (full path)    Trigger   Owner:Group     Mode  Compress  Archive Limit
# ================    =======   ===========     ====  ========  =============

/var/adm/wtmpx          4M      root:wheel      644     none            4
/var/adm/messages       8M      root:wheel      664     gz              5
/var/log/syslog         8M      root:wheel      664     gz              5


# Shell Command :file1,file2,file3 ... fileN
# ==========================================

rotate1                                 : /var/adm/wtmpx
kill -HUP `cat /var/run/`     : /var/adm/messages, /var/log/syslog


# Person to receive email rotation notification
# =============================================


Modify the section of the rotatelog script where appears the following lines to your actual setup:

# Solaris path settings.
my $compress = "/bin/compress";
my $gzip = "/usr/local/bin/gzip";
my $sendmail = "/usr/lib/sendmail";
my $hostname = "/bin/hostname";

On Solaris 8, it should be like this:

# Solaris path settings.
my $compress = "/usr/bin/compress";
my $gzip = "/usr/bin/gzip";
my $sendmail = "/usr/lib/sendmail";
my $hostname = "/usr/bin/hostname";

Please note that on Solaris 8 newsyslog exist, is already started from cron, and is a basic shell script meant only to rotate /var/adm/messages without even compressing it. Let’s deactivate it, and put our rotatelog instead. Existing crontab:

# crontab -e

#ident  "@(#)root       1.19    98/07/06 SMI"   /* SVr4.0       */
# The root crontab should be used to perform accounting data collection.
# The rtc command is run to adjust the real time clock if and when
# daylight savings time changes.
10 3 * * 0,4 /etc/cron.d/logchecker
10 3 * * 0   /usr/lib/newsyslog
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean

We’ll comment line

10 3 * * 0   /usr/lib/newsyslog

by adding a ‘#’ to it at the beginning and adding our line calling rotatelogs.Our crontab becomes:

#ident  "@(#)root       1.19    98/07/06 SMI"   /* SVr4.0       */
# The root crontab should be used to perform accounting data collection.
# The rtc command is run to adjust the real time clock if and when
# daylight savings time changes.
10 3 * * 0,4 /etc/cron.d/logchecker
#10 3 * * 0   /usr/lib/newsyslog
10 3 * * 0   /usr/local/sbin/rotatelogs
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
1 2 * * * [ -x /usr/sbin/rtc ] && /usr/sbin/rtc -c > /dev/null 2>&1
30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
Categories: English, opensolaris
%d bloggers like this: