Personal.X-Istence.com

Bert JW Regeer (畢傑龍)

Sun Microsystems: It Was Short and Fast

There is an announcement that was made today that makes many people feel sad, Oracle has agreed to buy Sun for chunk change. While I have never been a huge fan of Sun, mostly because of the Java programming language and a long lasting hatred for it, lately I have become increasingly aware of Sun and its products. Mostly related to OpenSolaris the free and open version of the Solaris 10 operating system. Other products have included the VirtualBox that Sun recently acquired and off course MySQL is still a big part of my life through the websites I manage.

Sun has slowly been declining, they used to be a monolith, a large giant that could stand up against IBM, Microsoft and various other companies. The issue has always been that they did not have a good PR system, they went on word of mouth and by selling to their clientele, they never made it clear what they wanted to do and where they wanted to go. Many people have no idea what Sun is doing, what projects they are working on, what they currently own. They have no idea about the innovations in the various products Sun makes, Solaris contains many improvements and ideas that are not available in other operating systems yet. Sun was a company made by programmers for programmers. The clients and the service contracts were secondary.

Selling Sun to Oracle is a cop-out. There is no way around it, Sun could have made radical changes, they could have changed what they offered and used the various projects they owned to create a new streamlined experience that would have given them an edge over the competition. Sun owned a lot of code to do various things and never made it a complete solution, never made it easy to use and even with the tools they had given you had to use 3rd party scripts to set up a basic structure. Most notably setting up a complete solution to do single authentication, much like Microsoft's Active Directory.

The biggest question is what is going to happen to the various products that Sun owns that are open source? Oracle is one of the biggest closed source companies in the world, they don't even allow benchmark tests to be completed against other database systems. What will happen to MySQL, OpenSolaris, GlassFish, VirtualBox, and xVM? Will Oracle close Java again? Will they make it harder for the community to work on OpenSolaris? These questions are what are causing the biggest question marks and there are no good answers. The real answer is we have to wait and see. OpenSolaris is an awesome open source operating system and I will be extremely sad if Oracle takes it down or makes it harder to participate.

I am extremely sad to see Sun Microsystems be sold, they have been around for a long time, what will happen to the brand? All the good people working at Sun, all the projects they own?

(Full disclosure: I currently own Sun Microsystems shares)

Sun should release ZFS under a GPL compatible license! ... Uhm, no!

Albert at Docunext is asking why ZFS is not under an GPL compatible license.
ZFS continues to get so much attention, its really bewildering to me that Sun doesn't release it under a GPL compatible license.
- ZFS?!!?!?!?
I posted a comment over at his blog, but I also wanted to post the same comment here. I have never really appreciated the whole Linux mindset of take take take, and wanted to have my position be known on this here blog because I feel it is an important matter that people ask me each time I mention ZFS to them.

--

Why should Sun be required to release their file system under a GPL compatible license just so that the GNU tards can take it and make it their own? Look at what happened to the wireless drivers that OpenBSD created, they were re-licensed under GPL meaning any new changes could not be brought back into the OpenBSD versions. The people doing so thought it was perfectly fine and so did many of the other Linux users. Yet when an OpenBSD developer had pieces of Linux code in his code so that he could slowly write his own driver for a certain piece of hardware there were harsh cries being made. Take take take, what do you give back?

Linux is not the end all be all open source operating system, I'll be honest, I have not used Linux for any of my contract work in the last year. Everything is FreeBSD. Why? Because the OS is more stable, everything comes as a whole, not everything is yet a different package from a random source. The kernel is generally secure, and so are the userland applications. Major bugs are less frequent and in general the whole thing is more solid because of the way it is put together.

Also, why can't Linus and the Linux kernel adapt and allow other licenses to sit in the kernel along side the rest of the kernel? This seems to be working for Mac OS X, and for FreeBSD. Where you can even choose to include ext2 support, thereby "tainting" your kernel with GPL code. Why can't Linux adapt the same possibility? Seems unfair that Sun should release their file system under a license that would benefit no-one else but the Linux community! What do they end up getting back for it?

Same thing is happening with DTrace, the Linux guys are re-making it from scratch because they like the feature set but they don't like the license. Once again, Mac OS X and FreeBSD seem to have no issues.

All the mainline kernel developers have been doing is putting ZFS down, Andrew Morton for example called it a Rampant Layering Violation (http://lkml.org/lkml/2006/6/9/389) (Jeff Bonwick replies: http://blogs.sun.com/bonwick/entry/rampant_layering_violation). Yet, now btrfs is supposed to make everything better, yet it has those exact same layering violations. What gives?

Sun should and probably will never release ZFS under a GPL or GPL compatible license. It just does not make sense. There is no business need for them to do so, nor is there any return for them when they do. The people that are serious about storage right now are able to use ZFS through Solaris 10, OpenSolaris, FreeBSD, and Mac OS X Server.

Hosting NFS shares from a Zone

I am currently trying to get my web development environment all set up. While I like using vi, I really do prefer TextMate on my Mac OS X to do the real heavy lifting and all of the editing.

As I was working on getting my homedir on my zone to be shared over NFS I was getting errors that NFS was not a valid protocol from sharemgr, the program that is used to add new shares to the system.

xistence@webdev.network.lan:~# sharemgr create -P nfs homedir  
Invalid protocol specified: nfs

A little bit of Googling brought me to a mailling list message saying that some server packages may be missing. This is entirely possible since my Zone was created with a minimal set of packages, so I log into the global host where NFS sharing does work and run the following:

xistence@Keyhole.network.lan:~# pkg list | grep nfs
SUNWnfsc                                      0.5.11-0.101    installed  ----
SUNWnfsckr                                    0.5.11-0.101    installed  ----
SUNWnfss                                      0.5.11-0.101    installed  ----
SUNWnfsskr                                    0.5.11-0.101    installed  ----

Ah, so those are probably not installed in the zone, quick pkg install later:

xistence@webdev.network.lan:~# pkg install SUNWnfsc SUNWnfsckr SUNWnfss SUNWnfsskr
DOWNLOAD                                    PKGS       FILES     XFER (MB)
Completed                                    3/3       17/17     0.28/0.28

PHASE                                        ACTIONS
Install Phase                                  55/55 
PHASE                                          ITEMS
Reading Existing Index                           9/9 
Indexing Packages                                3/3

Now, lets re-run the sharemgr command again and see if this time we do indeed get our group created:

xistence@webdev.network.lan:~# sharemgr create -P nfs homedir
xistence@webdev.network.lan:~# sharemgr show -vp
default nfs=()
zfs
homedir nfs=()

Yes, there we go. Now I can add a share to that group. Until more errors start showing up:

xistence@webdev.network.lan:~# sharemgr add-share -s /export/home/xistence/ homedir
NFS: Cannot share remote filesystem: /export/home/xistence
NFS: Service needs to be enabled by a privileged user
Failed to enable share for "nfs": system error

This time Google does not help out, instead it gives me the option to search without quotes around the search terms which gives me absolutely nothing.

Well, lets see if the services are running in the first place:

xistence@webdev.network.lan:~# svcs -a | grep nfs    
disabled       22:19:04 svc:/network/nfs/client:default
disabled       22:24:26 svc:/network/nfs/server:default
online         22:24:20 svc:/network/nfs/rquota:default
online         22:24:20 svc:/network/nfs/status:default
online         22:24:20 svc:/network/nfs/mapid:default
online         22:24:20 svc:/network/nfs/cbd:default
online         22:24:21 svc:/network/nfs/nlockmgr:default

Nope, for some reason the nfs server keeps being disabled eventhough I did enable it using svcadmin.

Okay, lets take a look with svcs what is going on:

xistence@webdev.network.lan:/# svcs -l nfs/server
fmri         svc:/network/nfs/server:default
name         NFS server
enabled      false (temporary)
state        disabled
next_state   none
state_time   Fri Feb 20 22:25:26 2009
logfile      /var/svc/log/network-nfs-server:default.log
restarter    svc:/system/svc/restarter:default
contract_id  
dependency   require_any/error svc:/milestone/network (online)
dependency   require_all/error svc:/network/nfs/nlockmgr (online)
dependency   optional_all/error svc:/network/nfs/mapid (online)
dependency   require_all/restart svc:/network/rpc/bind (online)
dependency   optional_all/none svc:/network/rpc/keyserv (disabled)
dependency   optional_all/none svc:/network/rpc/gss (absent)
dependency   optional_all/none svc:/network/shares/group (multiple)
dependency   require_all/error svc:/system/filesystem/local (online)

Ah, it has a log file, lets see what that log file says:

xistence@webdev.network.lan:/# cat /var/svc/log/network-nfs-server\:default.log 
[ Feb 20 22:11:07 Disabled. ]
[ Feb 20 22:11:07 Rereading configuration. ]
[ Feb 20 22:18:43 Enabled. ]
[ Feb 20 22:19:04 Enabled. ]
[ Feb 20 22:24:21 Executing start method ("/lib/svc/method/nfs-server start"). ]
The NFS server is not supported in a local zone

Eh? What? That seems weird, but it is off course plausible. Zones are new to Solaris and thus not everything may be virtualised yet. Taking that query to google brings me to a web page asking the same question I am asking: Local zone as NFS server. Taking a look it brings me to a bug report and ultimately to: Bug ID: 4964859 RFE: Zones should be able to be NFS servers. Well, I guess that ends that little stunt. I will be sharing it from the global zone. While this is acceptable to me, I do not believe that it is acceptable to most other people using Zones, and while it is unfortunate but it does not look like there is a whole lot of activity on the bug, as apparently there are no resources available.

Well, I learned something new, and wasted a few minutes of my time attempting to set this up. While generally I don't post my failures I find it important as other people may run into the same errors and have the same issue with getting things up and running.

I ended up doing the following:

sharemgr create -P nfs webdev-homedir

Then I followed that up with some servers that should be allowed access, and others that should not:

sharemgr set -P nfs -S sys -p 'rw=10.10.10.226 none=*' webdev-homedir

And then finally I added the share I wanted to share all along:

sharemgr add-share -r "homedir" -d "xistence home dir" -s /storage/zones/dev-web/root/export/home/xistence webdev-homedir

This creates a long NFS share to type in, since the full path now becomes:

nfs://keyhole/storage/zones/dev-web/root/export/home/xistence

Which is not that big of a problem for me, especially since I just save it in my favourites in Mac OS X and everything is peachy. It works like a charm.