Personal.X-Istence.com

Bert JW Regeer (畢傑龍)

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.

Want to own a limited edition geeky watch?

My room mate Kris has just gone live with his website and he is selling his custom built watch: Multiwatch. It is a watch that is able to display time in a variety of different means, for example binary, hexidecimal, octal and decimal. The entire watch is designed using only one button, and is activated by tapping the front of the watch to turn it on. With yet another tap you are able to change the time format from one of the above mentioned time formats to another format.

There are many different pictures of the watch available online at the website: MultiWatch pictures, check them out. Killbot 9000 is even wearing one!

As each watch is hand assembled they are all numbered, and thus you are guaranteed a unique watch that no-one else in the world will have. Once again, it is a limited edition watch made for the geek within you. There are two hundred being sold total. Once that magical number is reached there are no more, get your order in now!

Multiwatch product page at KBEmbedded

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.

FIRST Robotics mentoring

The last six weeks have been the fastest few weeks of this new semester that I am currently in. FIRST Robotics season had started again and I tagged along with two friends of mine, Zach and Jason, to mentor high school students at Hamilton High School in Chandler, AZ. The team number for those of you interested in 698, which is not that far away from 637 the team that I was on in 2006.

It was interesting being back in a High School. First and foremost because I had not realised how much I had grown up in just two years of University, and how different everything was. I forgot all about the scheduled classes with bells to signify when to go the next class, the weird schedules whereby classes shift around depending on the day, and various other oddities (the chairs for example are a lot smaller, and have desks attached to them). When I say I had not realised how much I had grown up, I mean that in the worst possible way. While me and my friends are able to joke around when we need to get something done we can sit down and get it done. Most of these students would sit around and joke and would not be able to get anything done no matter how long you gave them, they needed serious directions and to be told exactly what to do. Micromanaging in this environment is an absolute must. As for the differences, I am in University that means I get to decide if I got to class or not, I get to decide what classes I take, and I have to keep track of my schedule because my classes are not going to be offered one after the other, and there is not a single bell or paging system in the building.

Team 698 was off to a rocky start this build season, for various reasons, but the main issue was that the leader of the team was not leading but instead was trying to build the entire robot by himself, thereby killing team morale, and their reasons for even working, as everything they'd come up with would not be good enough. Once this was rectified and the team's mentors including myself started to pull the team in the right direction everything started rolling.

Tutoring people in high school is actually an awesome experience, and while I generally hate teaching people (Google is your best friend) I found that I enjoyed working with the students. Even if they could be a little childish, easy to derail and get off track from the task at hand. That being said, I have a much greater respect for my High School teachers now that I have gone through what they have to go through every single day. That is no easy task and it takes a lot of energy. The students in Robotics are probably a different breed though and they were more eager to learn and build new ideas than probably most other high school students.

The end result is that the robot was shipped. There are still some things that need to be worked on, but for now there is a small break before the Arizona FIRST Robotics Regionals. If you get the chance to be a mentor on a FIRST Robotics team I would totally suggest it. It is absolutely fantastic and more people should get involved. When I was a student and on the FIRST Robotics team it was an absolutely exhilarating experience, and something that even to this day I still remember vividly. I may have had some major arguments with people on the team (most notably my Physics teacher at the time), but we worked through them, and it is to this day that I remember something my Physics teacher, Mr. Giraud, said to me:

"You can write software expecting the hardware to be perfect, unfortunately hardware is not perfect and you have to fix it in code." (May not be exact, but the basic gist is there)

That has stayed with me, and it is something I will probably always remember. It has certainly changed the way I program for embedded devices.