Solaris and OS X Playing Together

4 11 2007

After winning my iPhone in a raffle, I was told by those who raffled it off that it was purchased before the price drop, and as a result, I could get the $100 credit.  What better to spend it on than upgrading to Leopard?  After all, a system with DTrace, DTrace-enabled Ruby, and a friendly GUI to boot is too good to pass up when you only have to pay $40 after taxes and credit. So I spent about 6 hours backing up my data to my Solaris box.  Why so long?  Well, I could not make Tiger and Solaris 10 play nicely with file sharing, so I had to resort to using scp to move 32GB of data.  Not pleasant.  I’d tried getting Tiger to mount NFS shares, but with little (read: no) success. So naturally one of the first things I did with my machine after installing Leopard, Firefox, and Adium was start poking around in the settings.  I quickly found a “Show Advanced” button in the Directory Utility.  And what appeared?  A tab for network mounts!  All I did was add a quick entry of the form you’d expect, start NFS on my Solaris machine, and voila!  Immediate access to my backups over NFS.  This is great – it means I can easily restore my iTunes collection to the fresh install of Leopard.  The ease with which this was done makes me suspect I missed something glaringly obvious in Tiger. Of course, a few things remain to be dealt with:

  • Supporting read/write access – just unifying the UID of my account on both machines.
  • Denying read access to other clients – probably just changing the permissions in my home directory.
  • Getting my Mac to dynamically resolve the hostname of my S10 box – we use DHCP on my home network, and I don’t want to change this.

Now, here’s to hoping this will get me to do more work on my ruby-on-rails project while I’m flying between coasts the next few weeks! 

A successful NFS configuration on OS X Leopard


Exciting Upcoming OS Improvements

19 10 2007

I must apologize for the lack of posts – the first few weeks of the semester, plus the job hunt, are extremely time-consuming. I have half-finished drafts of 3 articles, but no time to do the solid revising and research they need. I try to make my technical entries very precise, accurate, and backed by links to reputable sources.

But this is just a brief entry, because I’m excited for upcoming updates to three wonderful OSes:

Mac OS X Leopard
This has been anticipated for some time. It ships on the 26th of October if you weren’t already aware, and has some wonderful features. TimeMachine initially excited me the most. I heard about it while watching a periodically updated blog post of WWDC 2006 coverage with coworkers at NetApp, and to us it immediately suggested that Apple finally wised up a bit and implemented snapshots in one of their filesystems. The fact that TimeMachines requires an external hard drive makes it clear that this isn’t quite the case, which is a bit surprising given that it has been acknowledged that Leopard has at least some support for ZFS. Supposedly Leopard will only support reading from ZFS – alas, my dreams of a dual-boot Solaris/OS X Macbook with a shared ZFS pool will have to wait for another day.

More exciting to me is the addition of DTrace to Mac OS X in the form of Instruments, a snazzy GUI on top of DTrace. This is going to be a killer developer application. DTrace is very powerful, and fairly flexible, but has a bit of a learning curve to do more advanced things. I’m very optimistic about how discoverable an Apple GUI can make this.

And of course, after many years of using multiple desktops on Linux, they’re finally in OS X. For those who can’t wait, or don’t want to upgrade just for multiple desktops, Desktop Manager and Virtue Desktops work reasonably well, though for obvious reasons they’re no longer under development.

That said, my Powerbook is finally going, so I’m probably just going to buy a new Macbook next time the hardware is updated, and get Leopard that way instead of shelling out money for an upgrade. If it weren’t time for a hardware upgrade for me, I think I’d probably still do it just to have DTrace on my Mac.

OpenSolaris Project Indiana
What is Project Indiana? Many things, but primarily two things: an effort to create an all-open-source version of OpenSolaris (which currently includes some binary blobs to run well), and a place to prototype things like the new installer, stable ZFS root and boot, and the new package system. It was uncertain when a prototype of all these things would arrive, but it seems that a developer release will be available in the next couple weeks. This is enough to make me hold off on finishing customization on the new workstation I just got; I’m going to wait, and install this development version from scratch. I’m sure I’ll run into plenty of bugs, but that’s fine – it’s exciting! Also, an additional benefit of doing a reinstall is that I can make an extra slice for doing live upgrades of my system, which the preinstalled configuration doesn’t support. I can’t wait.

[Update: Found a very thorough description of Project Indiana.]

KGDB in Linux
Despite being postponed, it looks like a proper kernel debugger is headed into the mainline Linux kernel. Linux has actually had kernel debuggers for some time, but they were external patches. Being in the mainline kernel will mean better stability and will likely increase use among kernel developers.

This doesn’t directly impact end users, because most users don’t debug kernels. It does however affect them indirectly, because it will help kernel developers find (and fix) bugs faster. For kernel developers, a proper kernel debugger is a blessing. I used kmdb extensively this summer working in the Solaris Kernel Group. I can’t imagine how frustrated I would have been without it. Being able to step kernel code makes it almost as easy to debug as userland code (with some exceptions, obviously). Mac OS X has also had a well integrated kernel debugger (two in fact) for some time as well.

I’m really glad Linux is finally going to integrate this – the Apple documentation on kernel debuggers is spartan, and Solaris is still (unfortunately) not as easy to get up and running as Linux, and anyone who wants to hack on a kernel benefits greatly from having a solid kernel debugger. Hopefully this will encourage more people to jump the gap to kernel work, since this makes it more approachable.

Bias in the Open Source OS World

24 08 2007

I like seeing posts like If you want the features of Solaris, then just use Solaris! cropping up. Not because I think everyone should use Solaris (which I do, but that is beside the point) but because it shows that some people still think about choice of OS rationally. There is a lot of bias among open source operating systems users – most of it completely blind. I won’t pretend to be innocent of this – I was very involved with Brown’s LUG in the past, and was for a time one of the Linux zealots (mostly desktop users) you will occasionally encounter, who treat anyone who favors any other OS with great disdain, and even resentment. Fortunately I mellowed out.

Why should you pick an OS? You should pick the one which best suits your needs. And you should always be open to the possibility that a different OS may serve your needs better than your current one. The main criteria for deciding this tend to be ease of general desktop use, support for common software uses (e.g. Firefox, Thunderbird, office suites), and hardware support.

But in the world of open source UNIX-like operating systems, after configuration, for most desktop users it doesn’t matter. You can use any CLI shell, and you can use any windowing environment. And most open source software will compile on (and is generally available in a package form for) any UNIX-like OS. Most desktop users only go through one main round of software installs, so as great as tools like apt-get are, most people won’t get that much use out of them. For a few the licensing and copyleft ideaology are really key. But for most desktop users, the deciding factor is ease of initial configuration – this is something that more polished Linux distributions* like Debian, Ubuntu, and Red Hat do well, and they certainly deserve credit for it (yes, I said Debian is polished – mostly because of apt-get). Do you really want to be a (possibly unjustified) elitist snob over some nice configuration utilities?

Developers and power users make use of a much wider range of software – compilers, code editors and IDEs, debuggers, more sysadmin-ish command line utilities for resource management and so on and so forth. These are the areas where differences start to emerge. Any of the BSDs, any Linux distribution, Solaris, and with Cygwin even Windows, can run vim/emacs, Eclipse, gcc, gdb and so forth. Want to track down a kernel bug easily, either on a live kernel or on a real, complete crash dump? Solaris is the clear winner: kmdb. Want to track down performance problems easily using a kernel tracing framework that goes through every part of the system and has no performance hit when it’s disabled? DTrace is only available on Solaris, and hopefully soon (eventually?) will be stable on FreeBSD. Need top-of-the-line security? You’re looking at Solaris and OpenBSD. Need fine-grained resource control? Solaris. A copy-on-write shadow-paging filesystem with cheap snapshots and a variation on RAID which can withstand two disk failures in a single disk array? You’re either looking at ZFS on Solaris and FreeBSD, or forking many thousands of dollars over to NetApp (there are other similar filesystems in development, but they’re not very far along). In-kernel support for some variety of native (same-OS) virtualization? FreeBSD, Solaris, and Linux all have their own versions, with their own ups and downs.

Notice any patterns in those lists? Like the fact that FreeBSD has adopted many of the innovations Solaris created and provides as open source? Or the fact that Linux has not? Why is that? Partly it’s licensing – the CDDL and GPL are not compatible, so code written under the two licenses cannot be linked and redistributed. Part of it is the fact that many of the notable Linux kernel developers carry this bias I described earlier. Some of you probably noted the fact that I did not mention SystemTap when I mentioned DTrace earlier. Look at the comment battle on or Adam Leventhal’s comments on SystemTap at OSCON and comments responding to his proposal for a DTrace Linux port. You’ll see why.

Andrew Morton has also made some small news with a wonderful quotes which have already been commented on by someone else.

Don’t get me wrong – I love Linux. I use it almost every day at school. I used it exclusively for a number of years, with great pleasure. But now that I’ve seen what else is out there, I sometimes wonder if it’s lack of innovation that’s holding Linux up, or the attitudes of its leaders and much of its community, of elitism and NIH (not-invented-here) syndrome. There are so many smart people involved, I strongly suspect the latter.

* For the BSDs: I haven’t played with PC-BSD, though I’ve heard good things. I’ve had bad experiences installing FreeBSD. Installing OpenBSD was a breeze, but getting *any* software installed on it was a royal pain in the ass. At some point I want to get around to playing with DragonflyBSD and it’s new vkernel take on virtualization.