04/11/2013
***Solaris vs GNU/Linux – A functional comparison***
With Solaris 11 being pretty much “Free” (well, for non-commercial use anyhow) I have been sitting on the fence wondering which I should use for my home file server. While there isn’t really a need to have any sort of “end-all be-all” operating system (each has a valid use) when choosing an os for a home server you dont really want to run a ton of expensive hardware so you really want something which can do it all.
As far as GNU/Linux and Solaris are concerned each has its pro’s and cons, and so I was hoping to put together a comparison list, and perhaps through a collaborative effort help the community and myself put together a really great pro/con list.
The Killer features for each OS would be:
Solaris: ZFS, Zones, and dtrace
GNU/LINUX: Virtualization, firewall, applications available.
Below you will find a breakdown of each feature/functionality and who has the stronger footing.
Service management (+ to Solaris for its SMF)
*Linux
Relies on sys-V style init scripts
Can be cumbersome to manage any sort of interdependence as all you can do is change the start order (each file is numbered).
sys-V init scripts can become complex shell commands and there is no real “standard” on how to write them.
No automatic “restarter” if the service dies unexpectedly.
No automatic service log files (if you want the service to log you need to configure this in your startup script or the service it is starting.
*Solaris
SMF makes it incredibly simply to say that A depends on B by simply adding a dependency to the XML definition.
Almost anything can become a Solaris service as long as you code up the XML.
Standardized XML interface (you include the necessary sections in the XML document, SMF does the rest).
Automatic logs for any SMF service without you doing anything.
Fault Management (+ to Solaris for FMA)
Solaris
Fault Management Architecture (FMA)
Provides automated diagnosis of faulty hardware, and can take proactive measures to correct.
**Linux
Some individual components can do FMA functions such as mdadm emailing issues but at a global system level this is a lot more difficult to implement then under Solaris with FMA
File system/disk management (+ to Solaris for ZFS)
This was actually a tough call because Linux offers the ability to reshape a raid 5 array which is some pretty cool technology. Flip side, who among us has not had some sort of linux mdadm related issues (kernel upgrade breaks array, etc).
**Linux
Overly complicated (LVM, mdadm, dmraid….)
You need to create the storage (mdadm), then the file system on top (mkfs), usually using LVM to give you flexibility in the future.
numerous commands, mdadm is responsible for the array, while lvm is responsible for the storage layer, and the file system sits on top of this.
fsck
mdadm can reshape raid 5 arrays making it possible to add a single drive to an existing array.
While you can run ZFS as a kernel module now (not FUSE) any kernel upgrade would break your ZFS module. Depending on your distribution you would then have to rebuild it from sources.
**Solaris
Two commands (zpool to manage the pool, and zfs to manage the file systems).
Existing pools can be expanded, but only by adding similar redundant units. Basically if you have a raidz pool built on a single vdev it can expanded but only by adding a new vdev with similar redundancy (raidz in this case). You can not add a single drive to ‘reshape’ the array, and you should avoid mixing redundancy levels.
The limits of ZFS are sufficiently high you will never reach them.
Any subsequent Solaris upgrade always leaves you in a “SAFE” position meaning Solaris upgrades will never update your zpool/zfs versions automatically.
No fsck, the system is always in sync since its based on COW (copy on write).
Actual implementation details to hopefully show the differences:
Linux
mdadm to create the array (/sbin/mdadm –create –verbose /dev/md0 –level=5 –raid-devices=3 /dev/hdb1 /dev/hda1 /dev/hdf1).
pvcreate to create the physical layout on LVM (/sbin/pvcreate /dev/md0).
vgcreate to create the volume group (/sbin/vgcreate lvm-raid /dev/md0).
mkfs to create the file system (/sbin/mkfs.ext4 /dev/lvm-raid/lvm0).
Now you have your file system, you need to mount it (or automount via fstab)
**Solaris
zpool to create the array (zpool create -f tank raidz c7t1d0 c7t2d0 c7t3d0 c7t4d0 c7t5d0 c8t0d0 c8t1d0) Note how Solaris wants DISKS not partitions
zfs to create the file system (zfs create tank/myfilesystem)
That is it, you are done, /tank/myfilesystem is auto-mounted and will auto-mount on the next boot up.
Community support (+ Linux).
Virtualization (+Linux for KVM)
**Linux
Linux has KVM and XEN, both very powerful and incredibly easy to use.
Ability to “remote connect” to a KVM/XEN server via Virtual Machine Manager (http://virt-manager.org/)
**Solaris
Solaris use to have Linux Zones, but this was discontinued in Solaris 11 leaving Virtualbox as the only opensource VM solution.
VirtualBox isn’t easy to have things like having a VM start once the system is loaded.
Ability to run Virtual Box in a zone opens up some interesting doors such as enforcing the Solaris ”Fair scheduler” on your VM’s.
VirtualBox isn’t as robust as the Linux offering. You need to install additional software, and use odd management tools (VboxManage).
System Upgrades (+ to Solaris for boot environments)
**Solaris
Any upgrade to the CORE OS results in a ZFS snapshot being made before the upgrade. if you need to revert to your pre-upgrade system state you simply select it on the boot menu.
**Linux
Upgrading Linux has gotten cleaner over the years but is no way near the the level of boot-able ZFS snapshots
Licensing (+ to GNU/Linux for using GPL)
**Linux
GNU/Linux follows a very liberal “fair use” license (GPL). This license is so generous it allows things like centos and Scientific Linux to rebuild Redhat legally.
**Solaris
CDDL – incompatible which the GPL which prevents some of the Solaris technologies from being incorporated into LINUX directly. Case in point zfs on Linux which has the SPL (Solaris Porting Layer) to separate the GPL/CDDL code.
Package Management (+ to Linux )
Most Linux distro’s have better repositories and a better system then IPS.
Security (+ to Linux)
The only way to get updates for Solaris 11 is to wait for a full release from Oracle, or have a support contract.
Under Linux, security updates are always available as they are released.