<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>system-log:tyr</title>
	<atom:link href="http://system-log.tyr.org.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://system-log.tyr.org.uk</link>
	<description>Skyscraper I love you</description>
	<lastBuildDate>Wed, 25 Nov 2009 15:07:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Using mod_proxy_html on OS X 10.6</title>
		<link>http://system-log.tyr.org.uk/2009/11/25/using-mod_proxy_html-on-os-x-10-6/</link>
		<comments>http://system-log.tyr.org.uk/2009/11/25/using-mod_proxy_html-on-os-x-10-6/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 15:07:01 +0000</pubDate>
		<dc:creator>tyr</dc:creator>
				<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://system-log.tyr.org.uk/?p=110</guid>
		<description><![CDATA[To use mod_proxy_html on OS X 10.6 Snow Leopard you can do this.
Download it from here.
Unpack it then run

$ sudo apxs -ci -I /usr/include/libxml2 mod_xml2enc.c
$ sudo apxs -ci -I /usr/include/libxml2 -I . mod_proxy_html.c

Then update you httpd.conf to include

LoadFile /usr/lib/libxml2.dylib
LoadModule	proxy_html_module	libexec/apache2/mod_proxy_html.so
LoadModule	xml2enc_module		libexec/apache2/mod_xml2enc.so

Also take a look at the proxy-httpd.conf file that ships with mod_proxy_html for additional config you may [...]]]></description>
			<content:encoded><![CDATA[<p>To use mod_proxy_html on OS X 10.6 Snow Leopard you can do this.</p>
<p>Download it from <a href="http://apache.webthing.com/mod_proxy_html/mod_proxy_html.tar.bz2" onclick="javascript:pageTracker._trackPageview('/outbound/article/apache.webthing.com');">here</a>.</p>
<p>Unpack it then run<br />
<code><br />
$ sudo apxs -ci -I /usr/include/libxml2 mod_xml2enc.c<br />
$ sudo apxs -ci -I /usr/include/libxml2 -I . mod_proxy_html.c<br />
</code><br />
Then update you httpd.conf to include</p>
<p><code><br />
LoadFile /usr/lib/libxml2.dylib<br />
LoadModule	proxy_html_module	libexec/apache2/mod_proxy_html.so<br />
LoadModule	xml2enc_module		libexec/apache2/mod_xml2enc.so<br />
</code></p>
<p>Also take a look at the proxy-httpd.conf file that ships with mod_proxy_html for additional config you may want.</p>
]]></content:encoded>
			<wfw:commentRss>http://system-log.tyr.org.uk/2009/11/25/using-mod_proxy_html-on-os-x-10-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How I learned to stop worrying and love dual parity RAID</title>
		<link>http://system-log.tyr.org.uk/2009/06/17/how-i-learned-to-stop-worrying-and-love-dual-parity-raid/</link>
		<comments>http://system-log.tyr.org.uk/2009/06/17/how-i-learned-to-stop-worrying-and-love-dual-parity-raid/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 00:38:37 +0000</pubDate>
		<dc:creator>tyr</dc:creator>
				<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://system-log.tyr.org.uk/?p=96</guid>
		<description><![CDATA[It&#8217;s been assumed for a long time, by myself and others, that RAID 1+0 is the obvious choice for enterprise storage from a performance and reliability point of view. I&#8217;ve recently had cause to review this opinion and (re)read some articles about the subject.
Read on for links to some interesting articles and my conclusions.

First a [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been assumed for a long time, by myself and others, that RAID 1+0 is the obvious choice for enterprise storage from a performance and reliability point of view. I&#8217;ve recently had cause to review this opinion and (re)read some articles about the subject.</p>
<p>Read on for links to some interesting articles and my conclusions.<br />
<span id="more-96"></span><br />
First a quick word about terminology. Dual Parity raid is often implemented as RAID 6, this involves having 2 disks for parity rather than the single disk in RAID 5. I&#8217;m going to look at articles regarding two vendor implementations of dual parity raid, these differ from traditional RAID 6 in a number of ways. They are NetApp&#8217;s RAID-DP and Sun&#8217;s raidz2.</p>
<p>I came across <a href="http://blogs.sun.com/relling/entry/a_story_of_two_mttdl" onclick="javascript:pageTracker._trackPageview('/outbound/article/blogs.sun.com');">this article</a> from one of Sun&#8217;s engineers some time ago, and the project I&#8217;m working on caused me to review it again. The article compares two MTTDL models, one &#8216;traditional&#8217; mode, which takes Mean Time Before Failure (MTBF) and Mean Time To Repair (MTTR) into account, and a second more interesting one that takes into account the unrecoverable error rate (UER).</p>
<p>It is the UER that I find particularly interesting, this is the rate at which a read for a bit will result in an unrecoverable error. In a single parity system such as RAID 1+0  or RAID5 you need your parity data to be 100% readable in the event of a disk failure,otherwise your going to be looking at data loss, which will inevitably be in the worst location.</p>
<p>Disk sizes continue their march towards ever larger capacities (a possible move to smaller, faster SSD drives excepted). However the UER has remained fairly flat. The linked Sun blog above has this to say</p>
<blockquote><p>
Typically, UER will be 1 per 10^14 bits read for consumer class drives and 1 per 10^15 for enterprise class drives. This can be alarming, because you could also say that consumer class drives should see 1 UER per 12.5 TBytes of data read. Today, 500-750 GByte drives are readily available and 1 TByte drives are announced. Most people will be unhappy if they get an unrecoverable read error once every dozen or so times they read the whole disk.
</p></blockquote>
<p><a href="http://www.netapp.com/us/library/white-papers/wp_3298.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.netapp.com');">This NetApp white paper</a> about their implementation of RAID-DP has this to say:</p>
<blockquote><p>As disk drives have gotten larger, their reliability has not improved, and, more importantly, the bit error likelihood per drive has increased proportionally with the larger media.</p></blockquote>
<p>As we push drives sizes higher and higher we increase the likelihood of finding an unreadable bit and have to consider the real possibility that we cannot recover a volume that was protected with single parity.</p>
<p>So what can we do about it. A three-way mirror is an option, but try explaining the cost of that to your customer. A more practical solution is to consider double parity RAID. With this configuration you can lose an entire drive, and if you hit an unreadable bit you still have one more location to retrieve that data from before it is lost.</p>
<p>&#8220;But what about write performance&#8221; I hear you cry! In a traditional RAID5/6 implementation if you make writes that are not across a full stripe then there performance can tank considerably, increasingly so as you add more spindles. The reason for this is that for a partial stripe write, the section of the stripe that is not being written to must first be read from disk in order for the parity to be calculated. Then the new data and parity can be written out to disk.</p>
<p>ZFS&#8217;s raidz2 has a solution for this and that is that all writes are made as full stripe writes. This is achieved by dynamically altering the width of the stripe to match the write being made. This also neatly works around the RAID5/6 write hole. Have a read of <a href="http://blogs.sun.com/bonwick/entry/raid_z" onclick="javascript:pageTracker._trackPageview('/outbound/article/blogs.sun.com');">this document</a> if you&#8217;d like more info about this.</p>
<p>NetApp&#8217;s RAID-DP is actually an extension of RAID4 rather than RAID5. This means that there a two dedicated columns for parity, rather than a distributed layout. The aforementioned <a href="http://www.netapp.com/us/library/white-papers/wp_3298.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.netapp.com');">white paper</a> has more detail as to the specific layout used. NetApp also uses a file system called WAFL, I&#8217;ve been unable to easily find any documentation around this and partial stripe write performance, please comment if you know of any.</p>
<p>The whole issue with partial stripe write is obviated somewhat in an environment where you are supporting a single application, such as Oracle, where the block size is known and configurable. In this instance the Oracle block size can be configured in partnership with the storage to eliminate (or greatly reduce) the need for partial stripe writes.</p>
<p>Read performance from a raidz2 device is not as great as you might imagine, typically it will be limited to the performance of a single disk, for reasons that are explained in <a href="http://blogs.sun.com/relling/entry/zfs_raid_recommendations_space_performance" onclick="javascript:pageTracker._trackPageview('/outbound/article/blogs.sun.com');">this article</a>.</p>
<p>I expect that the read performance of RAID-DP matches that of a traditional RAID4/5 system much more closely, i.e. that reads can be striped across all the spindles. However I don&#8217;t have any stats to back this up.</p>
<p>I would like to have the opportunity to benchmark the systems against each other with a realistic workload but at the moment I don&#8217;t have that option. For me the increased data reliability of a dual parity system, when faced with an increasing UER per disk, is enough to covert me, even if it means a loss of some performance. Providing the performance the array can deliver is adequate then I see dual parity RAID as worthy of significant consideration.</p>
]]></content:encoded>
			<wfw:commentRss>http://system-log.tyr.org.uk/2009/06/17/how-i-learned-to-stop-worrying-and-love-dual-parity-raid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux zones on Solaris Express X86</title>
		<link>http://system-log.tyr.org.uk/2009/01/26/linux-zones-on-solaris-express-x86/</link>
		<comments>http://system-log.tyr.org.uk/2009/01/26/linux-zones-on-solaris-express-x86/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 21:29:25 +0000</pubDate>
		<dc:creator>tyr</dc:creator>
				<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://system-log.tyr.org.uk/?p=60</guid>
		<description><![CDATA[There are 3 ways to run Linux binaries on a Solaris Express X86 server.

xVM VirtualBox
xVM Server
Linux Branded Zone

This post takes a look at the interesting world of the Linux branded zone. I&#8217;ve posted about VirtualBox before and I hope to take a look at xVM Server (Xen) in a future post. Read on for my [...]]]></description>
			<content:encoded><![CDATA[<p>There are 3 ways to run Linux binaries on a Solaris Express X86 server.</p>
<ul>
<li>xVM VirtualBox</li>
<li>xVM Server</li>
<li>Linux Branded Zone</li>
</ul>
<p>This post takes a look at the interesting world of the Linux branded zone. I&#8217;ve posted about VirtualBox <a href="http://system-log.tyr.org.uk/2008/06/27/building-a-solaris-cluster-express-cluster-in-a-virtualbox-on-opensolaris/" >before</a> and I hope to take a look at xVM Server (Xen) in a future post. Read on for my first steps with Linux branded zones.<br />
<span id="more-60"></span><br />
I&#8217;ve used Solaris Express (SXCE) Build 106 here as it delivers <a href="http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6774519" onclick="javascript:pageTracker._trackPageview('/outbound/article/bugs.opensolaris.org');">this fix</a> which is pretty much required for running a 2.6 kernel in a branded zone. The OpenSolairs pkg repository does not yet appear to be updated to Build 106 at the moment.</p>
<p>Linux branded zones are perhaps the screwball option for running Linux binaries on Solaris. Rather than provide a fully self contained Linux environment it provides a Linux compatible zone in this case based on CentOS 5.2 i386. Currently the only install method for a Linux 2.6 based distribution is to install the OS somewhere else then create a tarball of the image and use that as the source media. Installing direct from the distribution iso files is not yet supported.</p>
<p>You must disable SELinux in the image you are going to create. You can either do this during the install or select &#8216;Administration&#8217; / &#8216;Security Level and Firewall&#8217; and disable SELinux.</p>
<p>So to start we need a running 32-bit CentOS 5.2 image, it&#8217;s trivial to install one in VirtualBox. Then create an tarball of the running image like so:</p>
<pre>tar -jcf /net/192.168.0.10/iso/centos5.2.i386.tar.bz --exclude dev --exclude proc --exclude sys --exclude boot --exclude media --exclude net *</pre>
<p>To begin configuring the zone you need to download a Linux 2.6 zone template file, simply do this</p>
<pre>cd /etc/zones
wget http://www.opensolaris.org/os/community/brandz/files/SUNWlx26.xml</pre>
<p>Then create the zone, the difference between this process and a normal Solaris zone is that the Linux 2.6 template must be specified</p>
<pre>bash-3.2# zonecfg -z centos52
centos52: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:centos52&gt; create -t SUNWlx26
zonecfg:centos52&gt; set zonepath=/vm/zones/centos52
zonecfg:centos52&gt; add net
zonecfg:centos52:net&gt; set address=192.168.0.50
zonecfg:centos52:net&gt; set physical=e1000g0
zonecfg:centos52:net&gt; end
zonecfg:centos52&gt; commit
zonecfg:centos52&gt; verify
zonecfg:centos52&gt; exit</pre>
<p>The install the archive into the zone</p>
<pre>bash-3.2# zoneadm -z centos52 install -d /net/192.168.0.10/iso/centos/centos5.2.i386.tar
A ZFS file system has been created for this zone.
Installing zone 'centos52' at root directory '/vm/zones/centos52'
from archive '/net/192.168.0.10/mnt/usbdisk1/iso/centos/centos5.2.i386.tar'

This process may take several minutes.

Setting up the initial lx brand environment.
System configuration modifications complete.
Setting up the initial lx brand environment.
System configuration modifications complete.

Installation of zone 'centos52' completed successfully.

Details saved to log file:
    "/vm/zones/centos52/root/var/log/centos52.install.1615.log"</pre>
<p>Check that it is installed</p>
<pre>bash-3.2# zoneadm list -cv
  ID NAME             STATUS     PATH                           BRAND    IP
   0 global           running    /                              native   shared
   - centos52         installed  /vm/zones/centos52             lx       shared</pre>
<p>The boot it up</p>
<pre>bash-3.2# zoneadm -z centos52 boot
zone 'centos52': WARNING: e1000g0:1: no matching subnet found in netmasks(4) for 192.168.0.50; using default of 255.255.255.0.
bash-3.2# zlogin -C centos52
[Connected to zone 'centos52' console]
Entering non-interactive startup
--snip start up messages---
CentOS release 5.2 (Final)
Kernel 2.6.18 on an i686

centos52 login: root
Password:
Last login: Mon Jan 26 22:56:35 on :0
[root@centos52 ~]# uname -a
Linux centos52 2.6.18 BrandZ fake linux i686 i686 i386 GNU/Linux</pre>
<p>Then processes running in the zone</p>
<pre>[root@centos52 ~]# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
xfs       3120  2688  0 Jan27 ?        00:00:00 xfs -droppriv -daemon
root      3228     1  0 Jan27 ?        00:00:00 /bin/login -- root
root         1     0  0 Jan27 ?        00:00:00 /sbin/init
root      3141  2688  0 Jan27 ?        00:00:00 /usr/sbin/atd
root      2891  2688  0 Jan27 ?        00:00:00 klogd -x
root      3229  3228  0 Jan27 ?        00:00:00 -bash
root      2688  2688  0 Jan27 ?        00:00:00 [zsched]
root      3253  3229  0 Jan27 ?        00:00:00 ps -ef
root      3131  2688  0 Jan27 ?        00:00:00 anacron -s
root      3052  2688  0 Jan27 ?        00:00:00 /usr/sbin/sshd
root      2888  2688  0 Jan27 ?        00:00:00 syslogd -m 0 -p /var/run/syslog
root      3063  2688  0 Jan27 ?        00:00:00 cupsd
root      3003  2688  0 Jan27 ?        00:00:00 pcscd
root      3089  2688  0 Jan27 ?        00:00:00 crond
root      3173  2688  0 Jan27 ?        00:00:00 /usr/bin/python -tt /usr/sbin/yu
root      3175  2688  0 Jan27 ?        00:00:00 /usr/libexec/gam_server
[root@centos52 ~]#</pre>
<p>And the related processes in the global zone</p>
<pre># ps -efZ | grep centos52
centos52 0000043  3120     1   0 23:30:05 ?           0:00 xfs -droppriv -daemon
  global     root  2687     1   0 23:29:19 ?           0:00 zoneadmd -z centos52
centos52     root  3228  2702   0 23:31:06 ?           0:00 /bin/login -- root
centos52     root  2702  2688   0 23:29:19 ?           0:00 /sbin/init
centos52     root  3141     1   0 23:30:05 ?           0:00 /usr/sbin/atd
  global     root  2822  1551   0 23:29:21 pts/3       0:00 zlogin -C centos52
centos52     root  2891     1   0 23:29:32 ?           0:00 klogd -x
centos52     root  3229  3228   0 23:31:37 zoneconsole    0:00 -bash
centos52     root  2688     1   0 23:29:19 ?           0:00 zsched
centos52     root  3131     1   0 23:30:05 ?           0:00 anacron -s
centos52     root  3052     1   0 23:29:34 ?           0:00 /usr/sbin/sshd
centos52     root  2888     1   0 23:29:22 ?           0:00 syslogd -m 0 -p /var/run/syslog
centos52     root  3063     1   0 23:29:34 ?           0:00 cupsd
centos52     root  3003     1   0 23:29:33 ?           0:00 pcscd
centos52     root  3089     1   0 23:30:04 ?           0:00 crond
centos52     root  3173     1   0 23:30:05 ?           0:00 /usr/bin/python -tt /usr/sbin/yum-updatesd
centos52     root  3175     1   0 23:30:05 ?           0:00 /usr/libexec/gam_server</pre>
<p>Notably you can see that &#8216;init&#8217; in process &#8216;1&#8242; in the zone but process &#8216;2702&#8242; in the global zone, presumably to maintain compatibility.</p>
<p>Due to this being a zone rather than a full on emulation you still only have one running kernel, the Solaris one, so you can presumably manage resources for this processes like you can for any normal Solaris zone, notably the memory space is shared as are the file systems, this has the potential to provide better performance than adding a full virtualisation layer and running a Linux kernel. Hopefully I&#8217;ll have a chance to do some rudimentary tests in the next week or so.</p>
]]></content:encoded>
			<wfw:commentRss>http://system-log.tyr.org.uk/2009/01/26/linux-zones-on-solaris-express-x86/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A customized Aperture web gallery</title>
		<link>http://system-log.tyr.org.uk/2009/01/21/a-customized-aperture-web-gallery/</link>
		<comments>http://system-log.tyr.org.uk/2009/01/21/a-customized-aperture-web-gallery/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 15:20:29 +0000</pubDate>
		<dc:creator>tyr</dc:creator>
				<category><![CDATA[Holidays]]></category>
		<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://system-log.tyr.org.uk/?p=32</guid>
		<description><![CDATA[For many years I&#8217;ve used an install of Gallery to manage my photos online, with a customised front end written for AxKit, and I&#8217;ve also been using Aperture to manage my photo library. Managing two separate libraries became a chore and meant that photos weren&#8217;t been uploaded for friends and family to view. I tried [...]]]></description>
			<content:encoded><![CDATA[<p>For many years I&#8217;ve used an install of <a title="Gallery" href="http://gallery.menalto.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/gallery.menalto.com');">Gallery</a> to manage my photos online, with a customised front end written for <a href="http://axkit.org/" onclick="javascript:pageTracker._trackPageview('/outbound/article/axkit.org');">AxKit</a>, and I&#8217;ve also been using <a href="http://www.apple.com/aperture/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.apple.com');">Aperture</a> to manage my photo library. Managing two separate libraries became a chore and meant that photos weren&#8217;t been uploaded for friends and family to view. I tried the built in Aperture web gallery functionality and found it to be rather inflexible and it didn&#8217;t handle hierarchies very well, the other option was to export to <a href="http://www.flickr.com/tools/aperture" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.flickr.com');">flickr</a> or something similar, which I wasn&#8217;t keen on as I&#8217;d rather host the images myself.</p>
<p>So instead I decided to write my own exporting tool, you can see the end result at <a href="http://photos.tyr.org.uk" >http://photos.tyr.org.uk</a> the default view is a match of the project/folder/album structure within my Aperture library and the &#8216;quilt&#8217; view (see top right) is just for fun.  To export photos to the website I just tag them with the &#8216;Web&#8217; keyword then run the export/sync script, it couldn&#8217;t be quicker and certainly much less hastle than maintaining two libraries.</p>
<p>Read on if you want to know more about how it was put together</p>
<p><span id="more-32"></span>The project consists of two parts. Firstly a method to get information out of Aperture and secondly some method of displaying the exported photos to the end user. I&#8217;ll cover the process I used to extract the metadata and images from Aperture in some detail in the hope it is useful to others wanting to achieve the same thing, the end user web front end is more specific to my requirements so I won&#8217;t go into it in so much depth but I&#8217;ll give some pointers to some tools used.</p>
<p>The functionaility I wanted to achieve with the export was to export all images tagged with a specific keyword and create metadata describing the folder/album structure and the image metadata. After much playing about with the inbuilt Aperture export tools I couldn&#8217;t find anything that would do this for me.</p>
<p>However all is not lost as Aperture uses a SQLite database to store it&#8217;s catalogue. Whilst it is not inteded to be accessed directly it is possible to open it up and take a look inside and figure out what is going on. However the layout of the database is not published publically not is it likelly to be stable between Aperture releases, in fact much of this code was originally written for Aperture 1.5 and had to be rewritten when 2.0 was released.</p>
<p>The first step to using the data in the database was to figure out what it all means. I used <a href="http://sourceforge.net/projects/sqlitebrowser/" onclick="javascript:pageTracker._trackPageview('/outbound/article/sourceforge.net');">SQLite Database Browser</a> to interrogate the database. The database itself is called &#8216;Library.apdb&#8217; and can be found within your Aperture library, to browse into the library option-click on it and choose &#8216;Show Package Contents&#8217;. You can then open up the Library.apdb in the database browser.</p>
<p>I wrote the data extraction script in Perl, handily OS X ships with the appropriate SQLite libraries for Perl DBI so opening up the database is easy.</p>
<pre>my $dbh = DBI-&gt;connect ( "dbi:SQLite:Library.apdb") || die "Cannot connect: $DBI::errstr";</pre>
<p>All keywords in Aperture are identified by a UUID called a ZUUID, so the first step is to extract the ZUUID associated with the Keyword, eg</p>
<pre>select ZUUID from ZRKKEYWORD where ZNAME = 'Web'</pre>
<p>Photos in Aperture consist of a &#8216;Master&#8217; image, each of which can have multiple &#8216;Versions&#8217;. We are interesting in extracting the versions that have the assocated keyword, we can find the UUID&#8217;s for these versions like this</p>
<pre>select ZVERSIONUUID from ZRKXKEYWORDVERSION where ZKEYWORDUUID = '$keyZUUID'</pre>
<p>Each of these versions will be extracted and published on the web site. We need to find out two pieces of information for each image, its location in the library and its individual metadata.</p>
<p>As part of this design we assume that all tagged images are part of an album, we&#8217;re not allowing for images that exist only in the top level of a project. We can find the albums a version is a member of like so</p>
<pre>select ZALBUMUUID from ZRKWALBUMVERSION where ZVERSIONUUID = '$versionUUID'</pre>
<p>Note that a version can belong in multiple albums. At this point we just build a list of albums and the ZVERSIONUUID&#8217;s of the versions each album.</p>
<p>The metadata for each version is stored in two places. The most significant data is stored in ZRKVERSION which contains one row per version, the less significant information such as EXIF data is stored in a huge table called  ZRKSEARCHABLEPROPERTY, this contains one row per property, as such it can contain 30 rows or so per version.</p>
<p>Firstly the information from ZRKVERSION is extracted</p>
<pre>select ZVERSIONID, ZFILENAME, ZPROCESSEDWIDTH, ZPROCESSEDHEIGHT
from ZRKVERSION
where ZUUID = '$ZVERSIONUUID'</pre>
<p>With this query we get the filename of the image and its processed width and height (so we can determine orientation) and als the ZVERSIONID, this is a different ID to the ZVERSIONUUID and we need the ZVERSIONID to extract the metadata for the image.</p>
<p>Now we can extract the bulk of the metadata for the image. This is held in ZRKSEARCHABLEPROPERTY and can be extracted like this</p>
<pre>select ZPROPERTYIDENTIFIERUUID, ZVALUETYPE, ZPROPERTYSPECIFICNUMBER, ZPROPERTYSPECIFICSTRING
from ZRKSEARCHABLEPROPERTY
where ZVERSIONID = $ZVERSIONID"</pre>
<p>Each property is either a string or a number, only one of ZPROPERTYSPECIFICSTRING and ZPROPERTYSPECIFICNUMBER contains a value, if ZVALUETYPE is &#8216;3&#8242; then it&#8217;s a string otherwise it can be assume to be a number of some sort, floating point or integer.</p>
<p>The type of property is identified by it&#8217;s ZPROPERTYIDENTIFIERUUID. The data to convert this into a human redable property description is found in ZRKPROPERTYIDENTIFIER. To enable this to work efficiently I extracted all the data from this table into a lookup hash. eg</p>
<pre>select ZPROPERTYKEY, ZUUID from ZRKPROPERTYIDENTIFIER</pre>
<p>Where the ZUUID in ZRKPROPERTYIDENTIFIER matches the ZPROPERTYIDENTIFIERUUID in ZRKSEARCHABLEPROPERTY.</p>
<p>That completes the data extraction for the individual photos. The last thing to do is to extract the folder/album structure. For each album its name and its containting folder can be found like this</p>
<pre>select ZFOLDERUUID, ZNAME from ZRKPERSISTENTALBUM where ZUUID = '$ZALBUMUUID'</pre>
<p>Then for each folder its name and containing folder can be found from ZRKFOLDER like this</p>
<pre>select Z_PK, ZNAME, ZPARENTFOLDERUUID from ZRKFOLDER where ZUUID = '$ZFOLDERUUID'</pre>
<p>This data can be merged together to give you the full tree structure.</p>
<p>Now all the data had been gathered it&#8217;s just a matter of spitting out some XML. One file called <a href="http://photos.tyr.org.uk/library.xml" >library.xml</a> contains the library structure, i.e. references  to all the folders/albums and photos. Then for each photos a &#8217;sidecar&#8217; xml file is created, this contains the exif and other metadata for the photo [<a href="http://photos.tyr.org.uk/sidecars/pc060167.jpg.jpg.xml" >example</a>]. This &#8217;sidecar&#8217; is then loaded when the user displays the photo, this increases performance and reduces the amount of data required for an initial load of the library to just a skeleton.</p>
<p>Now we can extract the photo itself from Aperture. Since Aperture can resize images on export we&#8217;ll use that functionality to create an image that&#8217;s suitable for display to the end user. Aperture can be scripted using AppleScript so we take advantage of that functionality, this can be accessed from a shell call via &#8216;osascript&#8217; for example</p>
<pre>/usr/bin/osascript -e '
   tell application "Aperture"
       set exportFolder to "MacDrive:Users:username:Documents:WebExport"
       export {image version id "$imageUUID"} using "JPEG - Web - Display" to alias exportFolder
   end tell
'</pre>
<p>It should be noted in the above that the value set for &#8216;exportFolder&#8217; is the old Classic style of directory naming with colons rather than slashes.<br />
You must create an export profile within Aperture with the name you use here, in this case &#8216;JPEG &#8211; Web &#8211; Display&#8217;.</p>
<p>Now we can rsync the images and the XML up to the server leaving just one final step and that is to create some thumbnails.</p>
<p>I wanted nice square thumbnails that didn&#8217;t change the aspect ratio of the image. Imagine the largest square you could create entirely within a full size photo then shrink that to a 50&#215;50 thumbnail. This <a href="http://www.imagemagick.org/script/index.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.imagemagick.org');">ImageMagick</a> magic sorted it out. I don&#8217;t have ImageMagick on my Mac so this was run on the server that serves the images.</p>
<pre>convert $sourceFile -thumbnail x200 -resize '200x&lt; ' -resize 25% -gravity center -crop 50x50+0+0 +repage -quality 90 $destFile</pre>
<p>And that completes the extraction and upload process. Finally we&#8217;ll take a quick look at the actual display side of things.</p>
<p>The idea behind the web design was to create something nice and simple that presented the photos in a non-fussy but easy to navigate way. I used the <a href="http://developer.yahoo.com/yui/" onclick="javascript:pageTracker._trackPageview('/outbound/article/developer.yahoo.com');">Yahoo User Interface Library (YUI)</a> to build the interface. The main advantage in using this library is that it hides most of the browser incompatibilities out there, for example YAHOO.util.Connect.asyncRequest provides an AJAX function.</p>
<p>Particularly usefully you can assign a single &#8216;onclick&#8217; hander to the folder browser div, then using  YAHOO.util.Event.getTarget you can find the object that was actually clicked. This makes it much more efficient than having onclick handlers all over the place.</p>
<p>The &#8216;quilt&#8217; view does some simple fadein/fadeout animation. This was achieved using the <a href="http://blog.davglass.com/files/yui/effects/" onclick="javascript:pageTracker._trackPageview('/outbound/article/blog.davglass.com');">YUI: Effects Widgets</a> from davglass.com. This creates a nice affect as the imgaes are swapped in the quilt.</p>
<p>If you&#8217;re interested you can browse the javascript on the site; [<a href="http://photos.tyr.org.uk/apgal.js" onclick="javascript:pageTracker._trackPageview('/downloadsphotos.tyr./apgal.js');">main page</a>], or [<a href="http://photos.tyr.org.uk/quilt.js" onclick="javascript:pageTracker._trackPageview('/downloadsphotos.tyr./quilt.js');">quilt</a>].</p>
<p>I hope the above info was interesting or useful, post a comment if you&#8217;ve got any queries.</p>
]]></content:encoded>
			<wfw:commentRss>http://system-log.tyr.org.uk/2009/01/21/a-customized-aperture-web-gallery/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>&#8216;Your Next Bus&#8217; on your iPhone</title>
		<link>http://system-log.tyr.org.uk/2008/08/05/your-next-bus-on-your-iphone/</link>
		<comments>http://system-log.tyr.org.uk/2008/08/05/your-next-bus-on-your-iphone/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 19:17:42 +0000</pubDate>
		<dc:creator>tyr</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Transport]]></category>

		<guid isPermaLink="false">http://system-log.tyr.org.uk/?p=27</guid>
		<description><![CDATA[&#8216;Your Next Bus&#8217; is the system used in West Yorkshire (and other regions) to provide live bus timetables. Some time ago I wrote a Dashboard Widget to display live timetables on a OS X Dashboard. I had a request to develop this for the iPhone and so I knocked something together with Dashcode and came [...]]]></description>
			<content:encoded><![CDATA[<p>&#8216;Your Next Bus&#8217; is the system used in West Yorkshire (and other regions) to provide live bus timetables. Some time ago I wrote a <a href="http://widget.newswall.org.uk/yournextbus/" >Dashboard Widget</a> to display live timetables on a OS X Dashboard. I had a request to develop this for the iPhone and so I knocked something together with Dashcode and came up with <a href="http://tyr.org.uk/bus" >tyr.org.uk/bus</a>. Browse to in in your iPhone and see it in action, requires Version 2.0 of the OS.</p>
<p>Please feedback with any bug reports or feature requests.</p>
<p>Read on for some of the behind the scenes info.<br />
<span id="more-27"></span><br />
There are two options facing a prospective iPhone application developer, to develop a web app or a full blown iPhone application. Prior to the release of the iPhone 2.0 OS web apps were the only option open to developers wanting to target users without jailbroken phones.</p>
<p>Writing a full iPhone application requires Cocoa and Objective-C fu, which whilst I&#8217;m learning I&#8217;m nowhere near the level required this task. Conversely web apps are much simpler and are just served as standard web pages to the local iPhone Safari browser. All the client side coding can be created in JavaScript.</p>
<p>Apple&#8217;s provided development environment for web apps is called Dashcode. I&#8217;d used it previously as a beta on Tiger to create the Dashboard widget and found it to be fairly buggy. This time however I&#8217;m pleased to say it performed admirably. To aid development a selection of framework apps are provided, in this instance the &#8216;browser&#8217; framework was picked. This provides you with a simple interface that lets the user browse through multiple view in a tree structure. The only Javascript you need to provide is a controller for the view, a sufficient outline is given to get you going without too much work.</p>
<p>I don&#8217;t actually own an iPhone but an iPhone simulator is provided with the development tools. As soon as you click &#8216;Run&#8217; in Dashcode the simulator loads up and launches your web app. You can simulate pretty much all the normal iPhone functionality including rotation and multi touch. It really helps make development a breeze.</p>
<p>iPhone OS 2 ships with a version of Safari 3.1.1, which supports client side SQL in JavaScript. Using this to store user settings is a breath of fresh air compared to creating bespoke functions to (un)pack data into cookies. Here&#8217;s the SQL used to create a database</p>
<pre>
 try {
     var shortName = 'yournextbus';
     var version = '1.0';
     var displayName = 'Your Next Bus Database';
     var maxSize = 2048;
     var db = openDatabase (shortName, version, displayName, maxSize);
     return db;
 } catch (e) {
     if ( e == INVALID_STATE_ERR ) {
         // Version number mismatch
         alert ("Invalid database version");
     } else {
         alert ("An error occured creating a database "+e+".");
     }
 }
</pre>
<p>And here&#8217;s the code to create a table and add a row:</p>
<pre>
 this._db.transaction (
    function (transaction) {
        transaction.executeSql('CREATE TABLE stops(id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, name TEXT NOT NULL DEFAULT "A Bus Stop", number INTEGER NOT NULL)', [], nullDataHandler, killTransactionSilently);
        transaction.executeSql('INSERT INTO stops ( name , number ) VALUES (?,?) ', [ 'Demo Stop', 45013610 ], nullDataHandler, errorHandler );

     }
 )
</pre>
<p>Whilst the data being stored for this app is fairly trivial it&#8217;s simple to see how this could become very powerful.</p>
<p>A couple of pics of the app in action:</p>
<p><a href="http://system-log.tyr.org.uk/wp-content/uploads/2008/08/bus-app-main-menu.png" ><img src="http://system-log.tyr.org.uk/wp-content/uploads/2008/08/bus-app-main-menu-156x300.png" alt="Main Menu" title="Bus App Main Menu" width="156" height="300" class="alignnone size-medium wp-image-28" /></a><br />
<a href="http://system-log.tyr.org.uk/wp-content/uploads/2008/08/bus-app-timetable.png" ><img src="http://system-log.tyr.org.uk/wp-content/uploads/2008/08/bus-app-timetable-156x300.png" alt="Timetable" title="Bus App Timetable" width="156" height="300" class="alignnone size-medium wp-image-29" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://system-log.tyr.org.uk/2008/08/05/your-next-bus-on-your-iphone/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>VCS Simulator</title>
		<link>http://system-log.tyr.org.uk/2008/07/09/vcs-simulator/</link>
		<comments>http://system-log.tyr.org.uk/2008/07/09/vcs-simulator/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 13:38:07 +0000</pubDate>
		<dc:creator>tyr</dc:creator>
				<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://system-log.tyr.org.uk/?p=25</guid>
		<description><![CDATA[I&#8217;m writing some training documentation for Veritas Cluster Server (VCS). Reading through my notes I was reminded of the &#8216;VCS Simulator&#8217;. You can import an existing cluster config into the Simulator and use the (Windows) GUI as if it was a live cluster, changing the config, faling things over etc. It&#8217;s just the ticket for [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m writing some training documentation for Veritas Cluster Server (VCS). Reading through my notes I was reminded of the &#8216;VCS Simulator&#8217;. You can import an existing cluster config into the Simulator and use the (Windows) GUI as if it was a live cluster, changing the config, faling things over etc. It&#8217;s just the ticket for a training aid, it&#8217;s just a shame there isn&#8217;t a CLI simulator.</p>
<p>You can download it <a href="http://www.symantec.com/offer?a_id=5647" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.symantec.com');">here</a> (needs a Symantec login) and there&#8217;s a Flash video explaining how to import an existing cluster <a href="http://eval.symantec.com/flashdemos/products/vcs_simulator/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/eval.symantec.com');">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://system-log.tyr.org.uk/2008/07/09/vcs-simulator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building a Solaris Cluster Express cluster in a VirtualBox on OpenSolaris</title>
		<link>http://system-log.tyr.org.uk/2008/06/27/building-a-solaris-cluster-express-cluster-in-a-virtualbox-on-opensolaris/</link>
		<comments>http://system-log.tyr.org.uk/2008/06/27/building-a-solaris-cluster-express-cluster-in-a-virtualbox-on-opensolaris/#comments</comments>
		<pubDate>Fri, 27 Jun 2008 17:03:54 +0000</pubDate>
		<dc:creator>tyr</dc:creator>
				<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://system-log.tyr.org.uk/?p=21</guid>
		<description><![CDATA[I&#8217;ve been wanting to have a play around with both the Solaris Cluster Express work that&#8217;s coming out of OpenSolaris and also VirtualBox, a virtualization platform that Sun recently acquired and have moved under their xVM banner. So wanting to kill two birds with one stone I thought I&#8217;d try setting up a VirtualBox Solaris [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been wanting to have a play around with both the Solaris Cluster Express work that&#8217;s coming out of OpenSolaris and also VirtualBox, a virtualization platform that Sun recently acquired and have moved under their xVM banner. So wanting to kill two birds with one stone I thought I&#8217;d try setting up a VirtualBox Solaris Express cluster. Here&#8217;s a run through on how to get the same thing going if you&#8217;d like to try.</p>
<p><span id="more-21"></span></p>
<p>First an overview of what I set out to achieve.</p>
<ul>
<li>Clustered MySQL server in a zone</li>
<li>Clustered Apache zone providing phpmyadmin front end for MySQL</li>
<li>On a two node Solaris Express cluster</li>
<li>With nodes running in VirtualBox virtual machines on a single physical machine</li>
<li>Shared storage provided over iSCSI from the host machine</li>
</ul>
<p>VirtualBox does not support sharing the same (VDI) disk image between multiple hosts, unless the image is read-only. As such VirtualBox cannot natively provide storage appropriate for a clustered environment, so we&#8217;re going to prevent storage over iSCSI to the virtual nodes.</p>
<p>At the time of writing Solaris Cluster Express 6/08 has just been released, this has been updated to run on Solaris Express Community Edition (SXCE) Build 86, so we&#8217;ll be using that for our guest OS in the virtual machines.</p>
<p>Initially I was hoping to use OS X as the host platform for VirtualBox however the networking support is far from complete in the OS X release. Specifically is does not support &#8216;internal networking&#8217; and that&#8217;s needed for the cluster interconnects. So instead I chose OpenSolaris 2008.05 for the host, this has the advantage that the host can be used to provide the iSCSI services along with a Quorum Server and has the required networking flexibility.</p>
<p>If you don&#8217;t have an OpenSolaris host, then any recent Solaris 10 or Solaris Express server on your network should work fine. Ensure that ZFS supports the &#8217;shareiscsi&#8217; options and that you can share 2 8GB volumes from it. Also you will need to install a Quorum Server to it. If you don&#8217;t have a suitable host on your network you could create a 3rd VirtualBox machine to provide the required services.</p>
<p>To build this environment the following downloads were used</p>
<ul>
<li>Solaris Express community edition, build 86, from <a title="SXCE Build 86" href="https://cds.sun.com/is-bin/INTERSHOP.enfinity/WFS/CDS-CDS_SMI-Site/en_US/-/USD/ViewProductDetail-Start?ProductRef=Sol-Express_b86-FULL-DVD-x86-SP-G-B@CDS-CDS_SMI" onclick="javascript:pageTracker._trackPageview('/outbound/article/cds.sun.com');">here</a></li>
<li>VirtualBox 1.6.2 from <a title="VirtualBox downloads" href="http://www.virtualbox.org/wiki/Downloads" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.virtualbox.org');">here</a></li>
<li>Solaris Cluster Express 6/08 from <a title="Solaris Express Install Packages" href="http://opensolaris.org/os/community/ha-clusters/ohac/Documentation/SCXdocs/SCX/" onclick="javascript:pageTracker._trackPageview('/outbound/article/opensolaris.org');">here</a></li>
<li>OpenSolaris 2008.05 from <a title="OpenSolaris" href="http://www.opensolaris.com/get/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.opensolaris.com');">here</a></li>
<li>phpMyAdmin 2.11.6 from <a title="phpMyAdmin download" href="http://www.phpmyadmin.net/home_page/downloads.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.phpmyadmin.net');">here</a></li>
</ul>
<p>You&#8217;ll need a machine with at least 2 GB of RAM, and around 50GB of hard disk space to follow this guide. If you have 2GB of RAM you&#8217;ll spend a fair amount of time swapping and may experience occasional cluster node panic, so more is recommended if you can get it. </p>
<p>Throughout this guide the prompt for the commands indicated the server it should be typed on.</p>
<ul>
<li><tt>opensolhost#</tt> &#8211; The OpenSolaris host</li>
<li><tt>cxnode1#</tt> &#8211; The first Cluster Express node</li>
<li><tt>cxnode2#</tt> &#8211; The second Cluster Express node</li>
<li><tt>both-nodes#</tt> &#8211; Repeat on both the first and second cluster nodes</li>
<li><tt>apache-zone#</tt> &#8211; Within the Apache zone</li>
<li><tt>mysql-zone#</tt> &#8211; Within the MySQL zone</li>
</ul>
<p>The following IP addresses were used, modify these to match your local network environment</p>
<ul>
<li>192.168.0.111 &#8211; The IPMP failover IP for cxnode1</li>
<li>192.168.0.112 &#8211; The IPMP failover IP for cxnode2</li>
<li>192.168.0.118 &#8211; The IP for the Apache zone</li>
<li>192.168.0.119 &#8211; The IP for the MySQL zone</li>
<li>192.168.0.121 &#8211; The first IPMP test address on cxnode1</li>
<li>192.168.0.122 &#8211; The first IPMP test address on cxnode2</li>
<li>192.168.0.131 &#8211; The second IPMP test address on cxnode1</li>
<li>192.168.0.132 &#8211; The second IPMP test address on cxnode2</li>
</ul>
<p>Sun provide extensive documentation for Sun Cluster 3.2, which for these purposes should match Cluster Express closely enough. You can find a good starting point at this <a title="Sun Cluster 3.2 Documentation Centre" href="http://docs.sun.com/app/docs/doc/820-2562/fxjbo?a=view" onclick="javascript:pageTracker._trackPageview('/outbound/article/docs.sun.com');">documentation centre page</a>.</p>
<h2>Installing and configuring VirtualBox</h2>
<p>To begin download VirtualBox from the links above, the steps below reference the 64 bit version but they should be the same for 32 bit users. Download the package and unzip/tar it, inside you&#8217;ll find two packages, they both need installing, ie:</p>
<pre>opensol-host# pkgadd -d VirtualBoxKern-1.6.2-SunOS-r31466.pkg
opensol-host# pkgadd -d VirtualBox-1.6.2-SunOS-amd64-r31466.pkg</pre>
<p>Before the virtual machines can be created some network configuration on the host is required. To enable the front interfaces of the cluster nodes to connect to the local network some virtual interfaces on the host are required. These will have the desired affect of bridging the local VLAN with the virtual machines.</p>
<p>The instructions in the VirtualBox documentation say to use /opt/VirtualBox/setup_vnic.sh to create these interfaces, however I had problems getting that to work. Not only is does it need some tweaks to get it to work with OpenSolaris 2008.05, I found I couldn&#8217;t get the interfaces going even after they were created. Fortunately I came across <a title="An Audience for Two Blog" href="http://blogs.sun.com/davetong/entry/configuring_host_networking_for_virtualbox" onclick="javascript:pageTracker._trackPageview('/outbound/article/blogs.sun.com');">this</a> blog post, which pointed me in the direction of the steps below.</p>
<p>2 public interfaces are required for each cluster node, these can then be configured with IPMP, just as you would do in a real cluster, whilst this doesn&#8217;t really provide more resiliency it&#8217;s a worthwhile exercise. To create these public interfaces a total of four virtual interfaces are required on the host. Each one needs a defined MAC address that you can choose yourself, or you can use the suggested ones here. To create the interfaces do this, replacing e1000g0 with the address of your physical interface on your host.</p>
<pre>opensol-host# /usr/lib/vna e1000g0 c0:ff:ee:0:1:0
opensol-host# /usr/lib/vna e1000g0 c0:ff:ee:0:1:1
opensol-host# /usr/lib/vna e1000g0 c0:ff:ee:0:2:0
opensol-host# /usr/lib/vna e1000g0 c0:ff:ee:0:2:1</pre>
<p>I&#8217;ve chosen these MAC addresses because c0:ff:ee is easy to remember, and the last two octets represent the cluster node number and then the interface number in that node.</p>
<p>Now plumb these interfaces, but don&#8217;t give them IP addresses.</p>
<pre>opensol-host# ifconfig vnic0 plumb
opensol-host# ifconfig vnic1 plumb
opensol-host# ifconfig vnic2 plumb
opensol-host# ifconfig vnic3 plumb</pre>
<p>These four &#8216;vnic&#8217; interfaces will form the public interfaces of our cluster nodes. However these will not persist over a reboot so you may want to create a start up script to create these. There&#8217;s a sample script in the linked blog post above.</p>
<p>It&#8217;s now time to create the virtual machines, as your normal user run /opt/VirtualBox/VirtualBox and a window should pop up like this</p>
<p style="text-align: center;"><a href="http://system-log.tyr.org.uk/wp-content/uploads/2008/06/sun-xvm-virtualbox-front-page.png" ><img class="alignnone size-medium wp-image-22" title="sun-xvm-virtualbox-front-page" src="http://system-log.tyr.org.uk/wp-content/uploads/2008/06/sun-xvm-virtualbox-front-page-300x223.png" alt="Sun xVM VirtualBox" width="300" height="223" /></a></p>
<p>To start creating the virtual machine that will serve as the first node of the cluster, click &#8216;New&#8217; to fire up the new server wizard. Enter &#8216;cxnode1&#8242; for the name of the first node (or choose something more imaginative), pick &#8216;Solaris&#8217; as the OS. Page through the rest of the wizard choosing 1GB for the memory allocation (this can be reduced later, at least 700MB is recommended) and create the default 16GB disk image.</p>
<p>The network interfaces need to be configured to support the cluster. Click into the &#8216;Network&#8217; settings area and change the &#8216;Adapter 0&#8242; type to &#8216;Intel PRO/1000 MT Desktop&#8217; and change the &#8216;Attached to&#8217; to &#8216;Host Interface&#8217;. Then enter the first MAC address you configured for the VNICs, if you followed the example above this will be c0ffee000100, then enter an interface name of &#8216;vnic0&#8242;. This Intel PRO/1000 MT Desktop adapter will appear as e1000g0 within the virtual machine. Generally I&#8217;ve grown to like these adapters, not least because they use a GLDv3 driver.</p>
<p>Now for &#8216;Adapter 1&#8242; enable the adapter and change the type as before, and set &#8216;Attached to&#8217; to &#8216;Host Interface&#8217;, the MAC to c0ffee000101 (or as appropriate) and the interface name to &#8216;vnic1&#8242;. Then enable &#8216;Adapter 2&#8242; and set &#8216;Attached to&#8217; to Internal Network and set &#8216;Network Name&#8217; to &#8216;Interconnect 1&#8242;. Repeat for &#8216;Adapter 2&#8242; but set the &#8216;Network Name&#8217; to &#8216;Interconnect 2&#8242;.</p>
<p>Finally point the CD/DVD-ROM to the ISO image you downloaded for Solaris Express Build 86. You need to add the ISO with the &#8216;Virtual Disk Manager&#8217; to make it available to the machine. You can use the &#8216;/net&#8217; NFS automounter to point to a NFS share where this image resides if required.</p>
<p>Finally change the boot order, in General / Advanced, so that &#8216;Hard Disk&#8217; comes before &#8216;CD/DVD&#8217;. This means that it will initially boot the install media, but once installed will boot from the installed drive.</p>
<p>Repeat the above steps to create a second cluster node. Ensure that &#8216;Adapter 2&#8242; and &#8216;Adapter 3&#8242; are connected to the same networks as for the first cluster node. Adapters 1 and 2 should be connected to the 3rd and 4th VNICs created previously.</p>
<h2>Installing Solairs</h2>
<p>Solaris now needs to be installed to both the cluster nodes. Repeat the following steps for each node. To boot a virtual machine click &#8216;Start&#8217; and the machine should boot and display the Grub menu. DON&#8217;T pick the default of &#8216;Solaris Express Developer Edition&#8217; but rather choose &#8216;Solaris Express&#8217;. If you choose the Developer Edition option you&#8217;ll get the SXDE installer which does not offer the flexibility required around partition layout.</p>
<p>Pick one of the &#8216;Solaris Interactive&#8217; install options as per your personal preference. If you&#8217;ve ever installed one of the main line Solaris releases that you&#8217;ll be at home here. Suggested settings for system identification phase:</p>
<ul>
<li>Networked</li>
<li>Configure e1000g0 (leave the others for the time being)
<ul>
<li>No DHCP</li>
<li>Hostname: cxnode1 (or choose something yourself)</li>
<li>IP: 192.168.0.111 (or something else as appropriate)</li>
<li>Netmask 255.255.255.0 (or as appropriate)</li>
<li>No IPV6</li>
<li>Default Route &#8211; Specify</li>
<li>192.168.0.1 (the IP of your default router)</li>
<li>Don&#8217;t enable Kerberos</li>
<li>&#8216;None&#8217; for naming service</li>
<li>Default derived domain for NFSv4 domain</li>
</ul>
</li>
<li>Specify time zone as required</li>
<li>Pick a root password</li>
</ul>
<p>Then in the installation phase pick the following options</p>
<ul>
<li>Reboot automatically: no</li>
<li>Eject additional CDs: yes (not that we&#8217;ll be using any)</li>
<li>Media: CD/DVD</li>
<li>Install Type: Custom</li>
<li>Add additional locales as required, we&#8217;re using C as the default.</li>
<li>Web Start Scan location: None</li>
<li>Software group: Entire Group Plus OEM / Default Packages</li>
<li>Leave the fdisk partition as the default, one single Solaris partition covering the whole disk.</li>
<li>To support the cluster a specific filesystem layout is required. Click &#8216;Modify&#8217; then set as this: (If space is needed for a live upgrade in the future then an additional virtual disk can be attached)
<ul>
<li>Slice 0: &#8216;/&#8217; &#8211; 13735 MB</li>
<li>Slice 1: &#8217;swap&#8217; &#8211; 2048 MB</li>
<li>Slice 6 &#8216;/globaldevices&#8217; &#8211; 512 MB</li>
<li>Slice 7 &#8216;(leave blank)&#8217; &#8211; 32MB</li>
</ul>
</li>
<li>Now just confirm and start the install</li>
</ul>
<p>The installer should now run through in due course, once complete reboot the machine and check it boots up fine for the first time.</p>
<p>By default Solaris will boot up into a GNOME desktop. If you want to disable the graphic login prompt from launching then do &#8217;svcadm disable cde-login&#8217;</p>
<p>Before the cluster framework is installed the VirtualBox &#8216;Guest Additions&#8217; need to be installed, these serve a similar role to VMWare Tools in that they provide better integration with the host environment. Specifically the &#8216;Time synchronization&#8217; facilities are required to assist with keeping the cluster nodes in sync.</p>
<p>If you still have the SXDE DVD image mounted then &#8216;eject&#8217; this in the guest and &#8216;Unmount&#8217; it from the &#8216;Devices&#8217; menu. Then choose &#8216;Install Guest Additions&#8230;&#8217; from the VirtualBox menu. The Guest Additions iso should mount, then su to root and pkgadd the VBoxSolarisAdditions.pkg from the CD. If you&#8217;re running X you should logout and back in to activate the X11 features.</p>
<p>Repeat the above steps for both cluster nodes.</p>
<p>It&#8217;s worth considering taking a snapshot at this point so if you run into problems later you can just snap it back to this post install state.</p>
<h2>Preparing for cluster install</h2>
<p>Once the nodes are installed there are a few steps required to configure them before the cluster framework can be installed. Firstly the public network interfaces on the nodes need to be configured. To do this use the below /etc/hostname files modifying where appropriate to your local network.</p>
<ul>
<li>cxnode1:/etc/hostname.e1000g0
<ul>
<li>
<pre>192.168.0.121 netmask 255.255.255.0 broadcast 192.168.0.255 deprecated -failover group public up
addif 192.168.0.111 up</pre>
</li>
</ul>
</li>
<li>cxnode1:/etc/hostname.e1000g1
<ul>
<li>
<pre>192.168.0.131 netmask 255.255.255.0 broadcast 192.168.0.255 deprecated -failover group public up</pre>
</li>
</ul>
</li>
<li>cxnode2:/etc/hostname.e1000g0
<ul>
<li>
<pre>192.168.0.122 netmask 255.255.255.0 broadcast 192.168.0.255 deprecated -failover group public up
addif 192.168.0.112 up</pre>
</li>
</ul>
</li>
<li>cxnode2:/etc/hostname.e1000g1
<ul>
<li>
<pre>192.168.0.132 netmask 255.255.255.0 broadcast 192.168.0.255 deprecated -failover group public up</pre>
</li>
</ul>
</li>
</ul>
<p>Also check that /etc/defaultrouter is correct.</p>
<p>The RPC communication must be activated for the cluster framework to function. To do this do</p>
<pre>opensol-host# svccfg
svc:&gt; select network/rpc/bind
svc:/network/rpc/bind&gt; setprop config/local_only=false
svc:/network/rpc/bind&gt; quit
opensol-host# svcadm refresh network/rpc/bind:default
opensol-host# svcprop network/rpc/bind:default | grep local_only</pre>
<p>The last command should return &#8216;false&#8217;.</p>
<p>Modify your path to include</p>
<pre>/usr/bin
/usr/cluster/bin
/usr/sbin
/usr/ccs/bin</pre>
<p>Also check your &#8216;umask&#8217; is set to 0022 and change it if not.</p>
<p>Finally we need to ensure the cluster nodes exist in /etc/inet/hosts on both hosts. For example</p>
<pre>192.168.0.111 cxnode1
192.168.0.112 cxnode2</pre>
<p>After making the above changes bounce the nodes to check it all persists across a reboot.</p>
<p>Once the above has been repeated on both cluster nodes it is time to install the cluster framework.</p>
<h2>Installing Cluster Express</h2>
<p>Download and extract Solaris Cluster Express 6/08, inside the package <tt>cd</tt> into <tt>'Solaris_x86'</tt> then run <tt>'./installer'</tt>. If you are connected over a ssh or on the console then run <tt>'./installer -nodisplay'</tt> instead. The steps listed here are for the GUI installer, but the text one is much the same.</p>
<p>Wait for the GUI to launch, click through and accept the license. Then from the list of available services choose ‘Solaris (TM) Cluster Express 6/08′ and ‘Solaris (TM) Cluster Express Agents 6/08′ (enter ‘4,6′ if you’re in the text installer). Leave the other options disabled, and clear ‘Install multilingual packages’ unless you want them. Click ‘Next’ to start the installer. You’ll be informed that some packages are being upgraded from their existing versions (namely SUNWant, SUNWjaf and SUNWjmail). The cluster will now perform some pre installation checks and they should all pass ‘OK’, then proceed with the install. Choose ‘Configure Later’ when prompted, as that will be done once all the installation steps are finished. Repeat the install process on the second node.</p>
<p>Now the cluster is installed it can be configured and established. This is started by running <tt>/usr/cluster/bin/scinstall</tt>. I prefer to do this on the second node of the cluster (<tt>cxnode2</tt>), as the installer configures the partner server first and it will be assigned node id 1, the server running the install will be assigned node id 2. It doesn’t really matter I just prefer it to follow the ordering of the hostnames.</p>
<p>Once the installer is running choose option 1 (Create a new cluster or add a cluster node), then option 1 (Create a new cluster), answer ‘yes’ to continue, choose ‘2′ for custom configuration. Pick a cluster name eg ‘DEV1′. Then when prompted for the other nodes in the cluster enter ‘cxnode2′ then ^D to complete. Confirm the list of nodes is correct, communication with the other node will now be tested and should complete fine. Answer ‘no’ for DES authentication.</p>
<p>Now you’ll be asked about the network configuration for the interconnect. The default network range is 172.16.0.0/255.255.248.0 but you can change this if required. Answer ‘yes’ to use at least two private networks, then ‘yes’ to the question about switches. Although there are no switches to configure we’re considering each private network configured in VirtualBox to be an unmanaged switch. Accept the default names for ’switch1′ and ’switch2′. You’ll now be asked to configure the transport adapters (effectively the network interfaces). Pick ‘1′ (e1000g2) for the first cluster transport adapter, answer ‘yes’ to indicate it is a dedicated cluster transport adapter. Answer ’switch1′ when asked about which switch it is connected to and accept the defaut name. Then pick ‘2′ (e1000g3) for the second adapter and again pick the default options. Answer ‘yes’ for auto discovery.</p>
<p>You’ll now be asked about Quorum configuration, this will be addressed later so choose ‘yes’ to disable automatic selection. The next quetion is about the global devices file system. The default is /globaldevices, accept it as this matches the layout created when initially installing Solaris. Accept this for cxnode2 as well.</p>
<p>You’ll be asked for final confirmation that it is ok to proceed so just answer ‘yes’ when you’re ready. You’ll now be asked if you want the creation to be interrupted if sccheck fails, go for ‘yes’ rather than the default of ‘no’. The cluster establishment will now start. You should see something similar to this when it discovers the cluster transports:</p>
<pre>The following connections were discovered:
cxnode2:e1000g2  switch1  cxnode1:e1000g2
cxnode2:e1000g3  switch2  cxnode1:e1000g3</pre>
<p><tt>cdnode1</tt> will reboot and establish the cluster with itself as the only node. Don’t worry about any errors about <tt>/etc/cluster/ccr/did_instances</tt>, the DID database hasn’t been created yet. The installer will then configure <tt>cxnode2</tt> and reboot that. When it boots back up it will join the new cluster.</p>
<p>We now have an established cluster! However it’s in ‘installmode’ until a quorum device is configured.</p>
<h2>Configuring a Quorum Server</h2>
<p>To finish the base cluster configuration a quorum device must be assigned. Initially I was planning to do this by presenting an iSCSI LUN from the OpenSolaris host into the guests, then using that for the quorum device. However I found that it, although it could be added fine, it would show as ‘offline’ and not function properly.</p>
<p>As such a quorum server running on the OpenSolaris host will be used. Full documentation for this can be found <a title="Quorum Server Configuration" href="http://docs.sun.com/app/docs/doc/819-5360" onclick="javascript:pageTracker._trackPageview('/outbound/article/docs.sun.com');">here</a>, but this overview should be enough to get you going. Fortunately it can be installed on it’s own, without requiring a full cluster install. To install it make the Cluster Express package available on the host and run the installer again, you’ll need to use the ‘-nodisplay’ option as some packages won’t be available for the graphical installer.</p>
<p>When running the installer choose ‘No’ when asked if you want to install the full set of components. Then choose option 2 for ‘Quorum Server’ and install that. Choose ‘Configure Later’ when asked.</p>
<p>The default install creates a configuration for one quorum server, running on port 9000. You can see the configuration in /etc/scqsd/scqsd.conf. Start the quorum server by running</p>
<pre>opensol-host# /usr/cluster/bin/clquorumserver start 9000</pre>
<p>The quorum server can now be configured into the cluster to get it fully operational.</p>
<p>One one of the cluster nodes run <tt>clsetup</tt>. Answer ‘yes’ to confirm you have finished the initial cluster setup and ‘yes’ to add a quorum device. Now pick option 3 (Quorum Server). Answer ‘yes’ to continue then give a name for the device, such as ‘opelsolhost’. Enter the IP of your host when prompted and 9000 as the port number. Allow it to proceed then choose ‘yes’ to reset installmode. The cluster is now properly established.</p>
<p>You can check the quorum registration on the OpenSolaris host by doing <tt>/usr/cluster/bin/clquorumserver show</tt>, you should see something like this:</p>
<pre>opensol-host#/usr/cluster/bin/clquorumserver show
---  Cluster DEV1 (id 0x484E9DB9) Registrations ---
Node ID:                      1
Registration key:           0x484e9db900000001
Node ID:                      2
Registration key:           0x484e9db900000002</pre>
<h2>Provisioning storage</h2>
<p>To enable the creation of the Apache and MySQL zones it’s necessary to present some storage to the cluster that can be shared between them.</p>
<p>As OpenSolaris is running on the host, take advantage of the in built iSCSI support in ZFS. First create some ZFS Volumes, one for each clustered service. eg.</p>
<pre>opensol-host# zfs create -V 8g rpool/apache
opensol-host# zfs create -V 8g rpool/mysql</pre>
<p>Now enable iSCSI export on them.</p>
<pre>opensol-host# zfs set shareiscsi=on rpool/apache
opensol-host# zfs set shareiscsi=on rpool/mysql</pre>
<p>And confirm this with <tt>iscsitadm list target -v</tt></p>
<pre>opensol-host# iscsitadm list target -v
Target: rpool/apache
iSCSI Name: iqn.1986-03.com.sun:02:29f26a9a-facb-4d29-adf8-adef67b21a00
Alias: rpool/apache
--snip--
Size: 8.0G
Backing store: /dev/zvol/rdsk/rpool/apache
Status: online
Target: rpool/mysql
iSCSI Name: iqn.1986-03.com.sun:02:1a782d05-c7c5-cd74-8ea3-b6c094cb3cf8
Alias: rpool/mysql
--snip--
Size: 8.0G
Backing store: /dev/zvol/rdsk/rpool/mysql
Status: online</pre>
<p>Now configure the nodes to see the presented storage. Do this on both of the nodes, replacing 192.168.0.104 with the IP of your host.</p>
<pre>both-nodes# iscsiadm modify discovery –sendtargets enable
both-nodes# iscsiadm add discovery-address 192.168.0.104
both-nodes# svcadm enable network/iscsi_initiator</pre>
<p>And then to confirm:</p>
<pre>both-nodes# iscsiadm list target -S
Target: iqn.1986-03.com.sun:02:1a782d05-c7c5-cd74-8ea3-b6c094cb3cf8
Alias: rpool/mysql
--snip--
OS Device Name: /dev/rdsk/c2t01000017F202642400002A00484FCCC1d0s2
Target: iqn.1986-03.com.sun:02:29f26a9a-facb-4d29-adf8-adef67b21a00
Alias: rpool/apache
--snip--
OS Device Name: /dev/rdsk/c2t01000017F202642400002A00484FCCBFd0s2</pre>
<p>Make a note of the OS Device Name to Alias matching as you need to put the right LUN into the correct resource group.</p>
<p>You can also confirm the storage is available by running format, eg:</p>
<pre>both-nodes# format
Searching for disks...done
AVAILABLE DISK SELECTIONS:
0. c0d0
        /pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
1. c2t01000017F202642400002A00484FCCBFd0
        /scsi_vhci/disk@g01000017f202642400002a00484fccbf
2. c2t01000017F202642400002A00484FCCC1d0
        /scsi_vhci/disk@g01000017f202642400002a00484fccc1</pre>
<p>To make this storage available to the cluster you must populate the DID device database. This is performed via <tt>cldevice</tt> and only needs to be run on one of the nodes:</p>
<pre>cxnode1# cldevice populate
Configuring DID devices
cldevice: (C507896) Inquiry on device “/dev/rdsk/c0d0s2″ failed.
did instance 5 created.
did subpath cxnode1:/dev/rdsk/c2t01000017F202642400002A00484FCCC1d0 created for instance 5.
did instance 6 created.
did subpath cxnode1:/dev/rdsk/c2t01000017F202642400002A00484FCCBFd0 created for instance 6.
Configuring the /dev/global directory (global devices)
obtaining access to all attached disks</pre>
<p>Then list the device database to check the storage is available</p>
<pre>cxnode1# cldevice list -v
DID Device          Full Device Path
----------          ----------------
d1                  cxnode1:/dev/rdsk/c1t0d0
d2                  cxnode1:/dev/rdsk/c0d0
d3                  cxnode2:/dev/rdsk/c1t0d0
d4                  cxnode2:/dev/rdsk/c0d0
d5                  cxnode1:/dev/rdsk/c2t01000017F202642400002A00484FCCC1d0
d5                  cxnode2:/dev/rdsk/c2t01000017F202642400002A00484FCCC1d0
d6                  cxnode1:/dev/rdsk/c2t01000017F202642400002A00484FCCBFd0
d6                  cxnode2:/dev/rdsk/c2t01000017F202642400002A00484FCCBFd0</pre>
<p>Now the basic configuration of the cluster is fairly complete. It’s a good opportunity to shut it down and take a snapshot. When shutting down the entire cluster you must use <tt>cluster shutdown</tt> rather than just shutting down the individual nodes. If you don’t then you must bring up the nodes in the reverse order of shutting them down. For an immediate shutdown do <tt>cluster shutdown -y -g 0</tt>.</p>
<h2>Configuring the Storage</h2>
<p>Originally I was planning to create some SVM metasets and add the disks to those, however this doesn’t appear to be possible with iSCSI LUNs yet, not even if you use the VirtualBox built in iSCSI initiator support, which results in the storage appearing as local disks. So instead I settled on using ZFS-HA to manage the disks. The process for this, as with most zfs stuff, is fairly straightforward.</p>
<p>First create a ZFS storage pool for each clustered service. We’ll use the DID device number here, so make sure you follow list back via <tt>cldevice list -v</tt> and <tt>iscsiadm list target -S</tt> to ensure you put the correct target into the correct ZFS pool.</p>
<p>In order for the storage to be added to ZFS it needs to have a &#8216;fdisk&#8217; partition added to it. One one of the nodes run fdisk against the two devices, accepting the default partition layout.:</p>
<pre>cxnode1# fdisk /dev/rdsk/c2t01000017F202642400002A00484B5467d0p0
No fdisk table exists. The default partition for the disk is:
a 100% “SOLARIS System” partition
Type “y” to accept the default partition,  otherwise type “n” to edit the
partition table.</pre>
<p>The standard SMI label needs to be replaced with an EFI one. When I&#8217;ve been working with ZFS previously this has always happened automatically but it didn&#8217;t work for me this time, possibly because we are going to add the DID device to the zpool rather than a traditional disk device. To change it manually run <tt>format</tt> with the <tt>-e</tt> option.</p>
<pre>cxnode1# format -e
Searching for disks…done

AVAILABLE DISK SELECTIONS:
0. c0d0
        /pci@0,0/pci-ide@1,1/ide@0/cmdk@0,0
1. c2t01000017F202642400002A00484FCCBFd0
        /scsi_vhci/disk@g01000017f202642400002a00484fccbf
2. c2t01000017F202642400002A00484FCCC1d0
        /scsi_vhci/disk@g01000017f202642400002a00484fccc1
Specify disk (enter its number): 2
selecting c2t01000017F202642400002A00484FCCC1d0
[disk formatted]
Error occurred with device in use checking: No such device
format&gt; label
Error occurred with device in use checking: No such device
[0] SMI Label
[1] EFI Label
Specify Label type[0]: 1
Warning: This disk has an SMI label. Changing to EFI label will erase all
current partitions.
Continue? y
format&gt; p
partition&gt; p
Current partition table (default):
Total disk sectors available: 16760798 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector        Size        Last Sector
0        usr    wm                34       7.99GB         16760798
1 unassigned    wm                 0          0              0
2 unassigned    wm                 0          0              0
3 unassigned    wm                 0          0              0
4 unassigned    wm                 0          0              0
5 unassigned    wm                 0          0              0
6 unassigned    wm                 0          0              0
7 unassigned    wm                 0          0              0
8   reserved    wm          16760799       8.00MB         16777182</pre>
<p>If you&#8217;d like to suppress the &#8220;Error occurred with device in use checking: No such device&#8221; warning then set &#8216;NOINUSE_CHECK&#8217; as an environment variable. It seems to be <a href="http://bugs.opensolaris.org/view_bug.do?bug_id=6471301" onclick="javascript:pageTracker._trackPageview('/outbound/article/bugs.opensolaris.org');">this bug</a> that&#8217;s causing the warning.</p>
<p>Now the disks can be added to a ZFS pool. Make sure you add the correct DID device here:</p>
<pre>cxnode1# zpool create apache-pool /dev/did/dsk/d6s0
cxnode1# zpool create mysql-pool /dev/did/dsk/d5s0</pre>
<p>Then confirm these are available as expected:</p>
<pre>cxnode1# zpool list
NAME          SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
apache-pool  7.94G   111K  7.94G     0%  ONLINE  -
mysql-pool   7.94G   111K  7.94G     0%  ONLINE  -</pre>
<p>Now create some filesystems in the pools. For each service three file systems are required</p>
<ul>
<li>zone &#8211; This will become the zone root</li>
<li>data &#8211; This will become /data within the zone and be used to store application data</li>
<li>params &#8211; This will be used to store a cluster parameter file</li>
</ul>
<pre>cxnode1# zfs create apache-pool/zone
cxnode1# zfs create apache-pool/data
cxnode1# zfs create apache-pool/params
cxnode1# zfs create mysql-pool/zone
cxnode1# zfs create mysql-pool/data
cxnode1# zfs create mysql-pool/params</pre>
<p>To make the storage usable with the cluster it needs to be configured into a resource group. Create two resource groups, one for each service</p>
<pre>cxnode1# clresourcegroup create apache-rg
cxnode1# clresourcegroup create mysql-rg</pre>
<p>SUNW.HAStoragePlus is the resource type that can manage ZFS storage, along with SVM and VxVM. It needs to be registered with the cluster with <tt>clresourcetype register</tt>, this only needs to be performed on one node.</p>
<pre>cxnode1# clresourcetype register SUNW.HAStoragePlus</pre>
<p>Create clustered resources to manage the ZFS pools:</p>
<pre>cxnode1# clresource create -g apache-rg -t SUNW.HAStoragePlus -p Zpools=apache-pool apache-stor
cxnode2# clresource create -g mysql-rg -t SUNW.HAStoragePlus -p Zpools=mysql-pool mysql-stor</pre>
<p>The resource groups will currently be in &#8216;Unmanaged&#8217; state, you can confirm this with <tt>clresourcegroup status</tt>. To bring them under cluster management bring them online on the first node:</p>
<pre>cxnode1# clresourcegroup online -M -n cxnode1 apache-rg</pre>
<p>Then check the file systems are available are available on the first node but not on the second.</p>
<pre>cxnode1# zfs list
NAME               USED  AVAIL  REFER  MOUNTPOINT
apache-pool        158K  7.81G    21K  //apache-pool
apache-pool/data    18K  7.81G    18K  //apache-pool/data
apache-pool/params 18K  7.81G    18K  //apache-pool/params
apache-pool/zone    18K  7.81G    18K  //apahce-pool/zone</pre>
<pre>cxnode2# zfs list
no datasets available</pre>
<p>Now move the pool to the other node and check that it becomes available on that node</p>
<pre>cxnode1# clresourcegroup switch -n cxnode2 apache-rg</pre>
<pre>cxnode1# zfs list
no datasets available</pre>
<pre>cxnode2#  zfs list
NAME               USED  AVAIL  REFER  MOUNTPOINT
apache-pool        158K  7.81G    21K  //apache-pool
apache-pool/data    18K  7.81G    18K  //apache-pool/data
apache-pool/params 18K  7.81G    18K  //apache-pool/params
apache-pool/zone    18K  7.81G    18K  //apahce-pool/zone</pre>
<p>When you&#8217;re happy switch it back to the first node:</p>
<pre>cxnode1# clresourcegroup switch -n cxnode1 apache-rg</pre>
<p>Then repeat the above online and failover tests for mysql-rg and mysql-pool</p>
<p>As the ZFS pools have now been added as cluster managed resources you must now use the cluster to mange them. Don&#8217;t perform export/import operations manually.</p>
<h2>Preparing Apache and MySQL zones for clustering</h2>
<p>To provide a clustered Apache and MySQL service two zones are going to be created. Whilst these services could equally well be clustered without the use of zones I decided to go down this path so that the benefits of zones could be enjoyed in tandem with the clustering.</p>
<p>A full example run through for configuring MySQL in a clustered zone is provided by Sun in the <a href="http://docs.sun.com/app/docs/doc/819-3059/gchqia?a=view" onclick="javascript:pageTracker._trackPageview('/outbound/article/docs.sun.com');">official documentation</a> if you require further information.</p>
<p>It&#8217;s worth pointing out that if you are following this plan then it will create zones on ZFS devices, currently this is not supported for &#8216;Live Upgrade&#8217; at present, so you are restricting your upgrade paths in the future. If you do decide you need to &#8216;Live Upgrade&#8217; the cluster at some point in the future then you could remove the zones, do the upgrade, and then re-create the zones. If you don&#8217;t want to do this then consider using raw disk slices with the cluster rather than ZFS.</p>
<p>For each zone the pool/zone file system will be used for the zone root, then the pool/data file system will be delegated to the zone&#8217;s control which will be used for the application to store it&#8217;s data, i.e. the MySQL databases or the Apache document root.</p>
<p>To provide IP addressing for the zones SUNW.LogicalHostname resources will be used, rather than directly configuring the zone with an IP addres.</p>
<p>First entries need adding to /etc/hosts on both nodes, eg:</p>
<pre>192.168.0.118 apache-zone
192.168.0.119 mysql-zone</pre>
<p>Then create LogicalHostname resources for each address:</p>
<pre>cxnode1# clreslogicalhostname create -g apache-rg -h apache-zone apache-addr
cxnode1# clreslogicalhostname create -g mysql-rg -h mysql-zone mysql-addr</pre>
<p>Now it&#8217;s time to create the zones. This is a really simple zone configuration, you could add resource controls or other features as desired. <tt>autoboot</tt> must be set to <tt>false</tt> as the cluster will be managing the starting and stopping of the zone.</p>
<pre>cxnode1# zonecfg -z apache
apache: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:apache&gt; create
zonecfg:apache&gt; set zonepath=/apache-pool/zone
zonecfg:apache&gt; set autoboot=false
zonecfg:apache&gt; add dataset
zonecfg:apache:dataset&gt; set name=apache-pool/data
zonecfg:apache:dataset&gt; end
zonecfg:apache&gt; verify
zonecfg:apache&gt; commit
zonecfg:apache&gt; exit
cxnode1# zonecfg -z mysql
mysql: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:mysql&gt; create
zonecfg:mysql&gt; set zonepath=/mysql-pool/zone
zonecfg:mysql&gt; set autoboot=false
zonecfg:mysql&gt; add dataset
zonecfg:mysql:dataset&gt;set name=mysql-pool/data
zonecfg:mysql:dataset&gt; end
zonecfg:mysql&gt; verify
zonecfg:mysql&gt; commit
zonecfg:mysql&gt; exit</pre>
<p>To enable the zones to be installed we must change the permissions on the zone roots:</p>
<pre>cxnode1# chmod 700 /apache-pool/zone
cxnode1# chmod 700 /mysql-pool/zone</pre>
<p>Now install the zones:</p>
<pre># zoneadm -z apache install
Preparing to install zone &lt;apache&gt;.
Creating list of files to copy from the global zone.
Copying &lt;9668&gt; files to the zone.
Initializing zone product registry. Determining zone package initialization order.
Preparing to initialize &lt;1346&gt; packages on the zone.
Initialized &lt;1346&gt; packages on zone.
Zone &lt;apache&gt; is initialized.
Installation of these packages generated warnings:
&lt;sunwvboxguest&gt;
The file &lt;/apache-pool/zone/root/var/sadm/system/logs/install_log&gt; contains a log of the zone installation.
# zoneadm -z mysql install
etc..</pre>
<p>The documentation has this to say about configuring zones:</p>
<blockquote><p>Caution: If the zone is to run in a failover configuration, each node being able to host that zone must have the exact same zone configuration for that zone. After installing the zone on the first node, the zone&#8217;s zone path already exists on the zones&#8217;s disk storage. Therefore it must get removed on the next node prior to successfully create and install the zone.[..] Only the zone&#8217;s zone path created on the last node will be kept as the final zone path for the failover zone. For that reason any configuration and customization within the failover zone should get performed after the failover zone is known to all nodes that should be able to host it.</p></blockquote>
<p>To achieve this the newly created zone must be destroyed and recreated on the second node. To my mind this is a really ugly way of achieving this, the cluster should be able to manage this itself and make suitable configuration changes on a node when the zone is configured into the cluster.</p>
<p>In later releases of Sun Cluster 3.1 the recommended way to manage this configuration was that the /etc/zones files be hacked to replicate the configuration of the zones from one node to another. However this method is not supported any more so the official instructions will be followed.</p>
<p>To do this migrate the storage for the zones to the other node</p>
<pre>cxnode1# clresourcegroup switch -n cxnode2 apache-rg
cxnode1# clresourcegroup switch -n cxnode2 mysql-rg</pre>
<p>Then delete the previously installed zone roots on the second node</p>
<pre>cxnode2# rm -rf /apache-pool/zone/*
cxnode2# rm -rf /mysql-pool/zone/*</pre>
<p>Now repeat the zonecfg and zoneadm steps above to recreate both of the zones.</p>
<p>When the zone installs have completed again move the storage back to the first node.</p>
<pre>cxnode1# clresourcegroup switch -n cxnode1 apache-rg
cxnode1# clresourcegroup switch -n cxnode1 mysql-rg</pre>
<p>The zones can now be booted and configured. Repeat these steps for Apache and the the MySQL zone. Boot the zone:</p>
<pre>cxnode1# zoneadm -z apache boot</pre>
<p>I got this error when booting the zones <tt>Unable to set route for interface lo0 to *??9?x</tt> , I m not sure what this means but it doesn&#8217;t seem to impact anything.</p>
<p>Login to the zone&#8217;s console to configure it:</p>
<p><tt>cxnode1# zlogin -C apache</tt></p>
<p>You&#8217;ll be asked a few questions to configure the zone. Choose language, terminal type and time zone information as appropriate. Enter the same hostname as you used above, eg &#8216;apache-zone&#8217; or &#8216;mysql-zone&#8217;. I received some alerts about avahi-bridge-dsd failing to start when booting, as far as I can tell it&#8217;s some sort of Bonjour networking thing, we don&#8217;t need it here so it&#8217;s ok to disable. You can also disable some other services that are not required to free up some resources</p>
<p><tt>apache-zone# svcadm disable cde-login<br />
apache-zone# svcadm disable sendmail<br />
apache-zone# svcadm disable webconsole<br />
apache-zone# svcadm disable avahi-bridge-dsd<br />
apache-zone# svcadm disable ppd-cache-update</tt></p>
<p>Now mount the zfs file systems that have delegated to the zone to an appropriate place. To do this on the Apache zone:</p>
<p><tt>apache-zone# zfs set mountpoint=/data apache-pool/data</tt></p>
<p>And on the MySQL zone:</p>
<p><tt>mysql-zone# zfs set mountpoint=/data mysql-pool/data</tt></p>
<p>Wait for the zone to finish booting and check you don&#8217;t have any failed services with <tt>svcs -xv</tt>. Then shut the zone down and repeat for the other zone.</p>
<h2>Clustering the zones</h2>
<p>Before proceeding further ensure the storage is available on the first node, fail it over if necessary. Also make sure the zones are shut down.</p>
<p>To enable clustering for the zones they must be registered with the cluster. To do this a script called <tt>sczbt_register</tt> is provided. To use this a configuration file must be completed and then registered. A sample configuration file is provided at <tt>/opt/SUNWsczone/sczbt/util/sczbt_config</tt>, this is also the file that will be read by default by <tt>sczbt_register</tt>. It is recommended to copy this file to some other place for future reference, then run <tt>sczbt_register</tt> against that. Comments are included in the file to explain the options, or see the <a href="http://docs.sun.com/app/docs/doc/819-3069/cacjgdbc?a=view" onclick="javascript:pageTracker._trackPageview('/outbound/article/docs.sun.com');">official docs</a> for more info.</p>
<p>Copy <tt>/opt/SUNWsczone/sczbt/util/sczbt_config</tt> to <tt>/etc/sczbt_config.apache</tt> and <tt>/etc/sczbt_config.mysql</tt> and edit as follows</p>
<pre> /etc/sczbt_config.apache:

RS=apache-zone
RG=apache-rg
PARAMETERDIR=/apache-pool/params
SC_NETWORK=true
SC_LH=apache-addr
FAILOVER=true
HAS_RS=apache-stor
Zonename="apache"
Zonebrand="native"
Zonebootopt=""
Milestone="multi-user-server"
LXrunlevel="3"
SLrunlevel="3"
Mounts=""</pre>
<pre> /etc/sczbt_config.mysql

RS=mysql-zone
RG=mysql-rg
PARAMETERDIR=/mysql-pool/params
SC_NETWORK=true
SC_LH=mysql-addr
FAILOVER=true
HAS_RS=mysql-stor
Zonename="mysql"
Zonebrand="native"
Zonebootopt=""
Milestone="multi-user-server"
LXrunlevel="3"
SLrunlevel="3"
Mounts=""</pre>
<p>The zones can now be registered. First you need to register the SUNW.gds resource type. On one node do:</p>
<pre>cxnode1# clresourcetype register SUNW.gds</pre>
<p>Then register the two zones</p>
<pre>cxnode1# /opt/SUNWsczone/sczbt/util/sczbt_register -f /etc/sczbt_config.apache
sourcing /etc/sczbt_config.apache
Registration of resource apache-zone succeeded.
Validation of resource apache-zone succeeded.</pre>
<pre>cxnode1# /opt/SUNWsczone/sczbt/util/sczbt_register -f /etc/sczbt_config.mysql
sourcing /etc/sczbt_config.mysql
Registration of resource mysql-zone succeeded.
Validation of resource mysql-zone succeeded.</pre>
<p>Then enable the Apache zone and log in to it. You should see the LogicalHostname resource has been assigned to the zone</p>
<pre>cxnode1# clresource enable apache-zone
cxnode1# zoneadm list -cv
ID NAME             STATUS     PATH                           BRAND    IP
0 global           running    /                              native   shared
1 apache           running    /apache-pool/zone              native   shared
- mysql            installed  /mysql-pool/zone               native   shared
cxnode1# zlogin apache
[Connected to zone 'apache' pts/2]
Last login: Tue Jun 17 20:23:08 on pts/2
Sun Microsystems Inc.   SunOS 5.11      snv_86  January 2008
apache-zone# ifconfig -a
lo0:1: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
e1000g1:1: flags=201040843 mtu 1500 index 3
inet 192.168.0.118 netmask ffffff00 broadcast 192.168.0.255</pre>
<p>Then test a failover and failback of the zone.</p>
<pre>cxnode1# clresourcegroup switch -n cxnode2 apache-rg
cxnode1# clresourcegroup switch -n cxnode1 apache-rg</pre>
<p>Repeat the same checks for the MySQL zone.</p>
<h2>Installing and configuring MySQL</h2>
<p>MySQL 5.0.45 is installed by default with the Solaris Express install we have performed. This consists of the SUNWmysql5r, SUNWmysql5u and SUNWmysql5test packages.</p>
<p>The installation can be used pretty much unmodified, the only modification needed is to repoint the MySQL data directory to the delegated zfs file system. This is done by modifying the SMF properties for the service, you cannot make this change by modifying my.cfg. Make the change with svccfg:</p>
<pre>mysql-zone# svccfg
svc:&gt; select svc:/application/database/mysql:version_50
svc:/application/database/mysql:version_50&gt; setprop mysql/data = /data/mysql
svc:/application/database/mysql:version_50&gt; refresh
svc:/application/database/mysql:version_50&gt; end</pre>
<p>Then create the directory for the databases and one for some logs</p>
<pre>mysql-zone# mkdir /data/mysql
mysql-zone# mkdir /data/logs
mysql-zone# chown mysql:mysql /data/mysql
mysql-zone# chown mysql:mysql /data/logs</pre>
<p>Now start up the database and check that it starts ok</p>
<pre>mysql-zone# svcadm enable mysql:version_50
mysql-zone# svcs mysql:version_50
STATE          STIME    FMRI
online         10:38:54 svc:/application/database/mysql:version_50</pre>
<p>Now set a password for the root users for the database, it&#8217;s set to &#8216;root&#8217; in this case.</p>
<pre>mysql-zone# /usr/mysql/5.0/bin/mysqladmin -u root password root
mysql-zone# /usr/mysql/5.0/bin/mysqladmin -u root -h localhost -p password root
Enter password:<em>root</em></pre>
<p>The /etc/hosts file in the zone needs to be modified so that &#8216;mysql-zone&#8217; is the name for the clustered IP address for the zone rather than the localhost, also the address for the apache-zone needs to be added.</p>
<pre>127.0.0.1       localhost       loghost
192.168.0.119   mysql-zone
192.168.0.118   apache-zone</pre>
<p>Allow access to the root user to connect from the Apache zone.</p>
<pre>mysql-zone# /usr/mysql/5.0/bin/mysql -p
Enter password: root
mysql&gt; GRANT ALL ON *.* TO 'root'@'apache-zone' identified by 'root';</pre>
<p>MySQL is now configured and ready to be clustered. We&#8217;ll be using a process loosely  based on the one documented <a href="http://docs.sun.com/app/docs/doc/819-3059/gczdj?a=view" onclick="javascript:pageTracker._trackPageview('/outbound/article/docs.sun.com');">here</a>. Alternatively it would be possible to use SMF to manage the service, you can see an example of that method in the Apache configuration later.</p>
<p>First a user for the fault monitor must be created along with a test database for it to use. A script is provided with the agent to do this for you. It will grant the fault monitor user &#8216;PROCESS, SELECT, RELOAD, SHUTDOWN, SUPER&#8217; on all databases, then ALL privileges on the test database.</p>
<p>To create the required users you need to provide a config file. Copy the supplied template into <tt>/etc</tt> and edit it there</p>
<pre>mysql-zone# cp /opt/SUNWscmys/util/mysql_config /etc
mysql-zone# vi /etc/mysql_config</pre>
<p>Use these values, note that MYSQL_DATADIR is the location of the my.cnf, not the directory to the databases. The meaning of DATADIR changed in 5.0.3 to mean the location of the data and not the config directory, but for this configuration it should point to the config directory.</p>
<pre>MYSQL_BASE=/usr/mysql/5.0
MYSQL_USER=root
MYSQL_PASSWD=root
MYSQL_HOST=mysql-zone
FMUSER=fmuser
FMPASS=fmpass
MYSQL_SOCK=/tmp/mysql.sock
MYSQL_NIC_HOSTNAME="mysql-zone"
MYSQL_DATADIR=/etc/mysql/5.0</pre>
<p>Then run the registration script</p>
<pre>mysql-zone# /opt/SUNWscmys/util/mysql_register -f /etc/mysql_config
sourcing /etc/mysql_config and create a working copy under /opt/SUNWscmys/util/mysql_config.work
MySQL version 5 detected on 5.11/SC3.2
Check if the MySQL server is running and accepting connections
Add faulmonitor user (fmuser) with password (fmpass) with Process-,Select-, Reload- and Shutdown-privileges to user table for mysql database for host mysql-zone
Add SUPER privilege for fmuser@mysql-zone
Create test-database sc3_test_database
Grant all privileges to sc3_test_database for faultmonitor-user fmuser for host mysql-zone
Flush all privileges
Mysql configuration for HA is done</pre>
<p>Now shut down the database so it can be bought online by the cluster.</p>
<pre>mysql-zone# svcadm disable mysql:version_50</pre>
<p>Drop back to the global zone and copy the MySQL agent configuration template to /etc</p>
<pre>cxndoe1# cp /opt/SUNWscmys/util/ha_mysql_config /etc/ha_mysql_config</pre>
<p>Use these settings, this time the &#8216;DATADIR&#8217; should be set to point to the actual data location and not the location of the config. Descriptions of the configuration is given in the file:</p>
<pre>RS=mysql-server
RG=mysql-rg
PORT=3306
LH=mysql-addr
HAS_RS=mysql-stor
ZONE=mysql
ZONE_BT=mysql-zone
PROJECT=
BASEDIR=/usr/mysql/5.0
DATADIR=/data/mysql
MYSQLUSER=mysql
MYSQLHOST=mysql-zone
FMUSER=fmuser
FMPASS=fmpass
LOGDIR=/data/logs/
CHECK=NO</pre>
<p>Now register this with the cluster:</p>
<pre>cxnode1# /opt/SUNWscmys/util/ha_mysql_register -f /etc/ha_mysql_config
sourcing /etc/ha_mysql_config and create a working copy under /opt/SUNWscmys/util/ha_mysql_config.work
clean up the manifest / smf resource
sourcing /opt/SUNWscmys/util/ha_mysql_config
disabling the smf service svc:/application/sczone-agents:
removing the smf service svc:/application/sczone-agents:
removing the smf manifest /var/svc/manifest/application/sczone-agents/.xml
sourcing /tmp/ha_mysql_config.work
/var/svc/manifest/application/sczone-agents/mysql-server.xml successfully created
/var/svc/manifest/application/sczone-agents/mysql-server.xml successfully validated
/var/svc/manifest/application/sczone-agents/mysql-server.xml successfully imported
Manifest svc:/application/sczone-agents:mysql-server was created in zone mysql
Registering the zone smf resource
sourcing /opt/SUNWsczone/sczsmf/util/sczsmf_config
Registration of resource mysql-server succeeded.
Validation of resource mysql-server succeeded.
remove the working copy /opt/SUNWscmys/util/ha_mysql_config.work</pre>
<p>Before bringing this online a tweak is needed to the supplied agent scripts. As mentioned briefly above the use of &#8216;DATADIR&#8217; is a bit broken. If you try to bring MySQL online now it will fail as it won&#8217;t be able to find its configuration file. The agent scripts have this hard coded to <tt>${MYSQL_DATADIR}/my.cnf</tt> which is no use for our purposes.</p>
<p>In the zone edit /opt/SUNWscmys/bin/functions and make this replacement, ensure you edit the copy in the MySQL zone and not the one in the global zone.</p>
<pre>MYSQL_DEFAULT_FILE=${MYSQL_DATADIR}/my.cnf</pre>
<p>with</p>
<pre>MYSQL_DEFAULT_FILE=/etc/mysql/5.0/my.cnf</pre>
<p>The mysql-server can now be enabled.</p>
<pre>cxnode1# clresource enable mysql-server</pre>
<h2>Configuring Apache</h2>
<p>Apache is going to be used to provide a web front end to the MySQL install, via the ubiquitous phpMyAdmin. The supplied Apache install (at /usr/apache2/2.2) is going to be used. As Apahce will be running in a zone it can be used unmodified, keeping the configuration in /etc and not worrying about any potential conflicts with other Apache installs.</p>
<p>At present the supplied Apache resource type does not directly support running the resource in a zone, or at least I couldn&#8217;t figure it out. So instead some of the provided zone monitoring tools are going to be used to ensure Apache is up and running. This uses a combination of SMF and a shell script.</p>
<p>To begin Apache must be configured. Bring the zone online on one of the nodes and log in to it. The configuration file for Apache is at <tt>/etc/apache2/2.2/httpd.conf</tt>. Only a small tweak is required to move the document root onto the zfs file system we have prepared for it. You could, if desired, also move other parts of the configuration, such as the log location. For this example just change <tt>DocumentRoot</tt> to be <tt>/data/htdocs</tt> and update the <tt>Directory</tt> stanza a page or so below it. Then do a <tt>mkdir</tt> on <tt>/data/htdocs</tt>. That completes our very simple Apache configuration.</p>
<p>So start it up &#8217;svcadm enable apache22&#8242;. Download phpMyAdmin from <a href="http://www.phpmyadmin.net/home_page/downloads.php" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.phpmyadmin.net');">here</a>. Solaris now ships with p7zip to manage 7z files, so you could download that version to save a bit of bandwidth if you like. You can extract them with <tt>pzip -d [filename]</tt>. Once extracted move the extracted directory to <tt>/data/htdocs/phpmyadmin</tt>.</p>
<p>Add <tt>mysql-zone</tt> to /etc/hosts eg</p>
<pre>192.168.0.119    mysql-zone</pre>
<p>Modify config.inc.php setting these two values:</p>
<pre>$cfg['Servers'][$i]['host'] = 'mysql-zone';
$cfg['blowfish_secret'] = 'enter a random value here';</pre>
<p>To enable monitoring of the Apache instance we need a simple probe script. Make a directory <tt>/opt/probes</tt> in the zone and create a file called <tt>probe-apache.ksh</tt> with this content:</p>
<pre>#!/usr/bin/ksh
if echo "GET; exit" | mconnect -p 80 &gt; /dev/null 2&gt;&amp;1
then
exit 0
else
exit 100
fi</pre>
<p>Then <tt>chmod 755 /opt/probes/probe-apache.ksh</tt>. All this does is a simple connect on port 80, it could be replaced with something more complex if needed. Finally disable Apache so that the cluster can start it:</p>
<pre>apache-zone# svcadm disable apache22</pre>
<p>Drop back to the global zone and copy <tt>/opt/SUNWsczone/sczsmf/util/sczsmf_config</tt> to <tt>/etc/sczsmf_config.apache</tt> and set the following settings</p>
<pre>RS=apache-server
RG=apache-rg
SCZBT_RS=apache-zone
ZONE=apache
SERVICE=apache22
RECURSIVE=true
STATE=true
SERVICE_PROBE="/opt/probes/probe-apache.ksh"</pre>
<p> Now this can be registered with the cluster:</p>
<pre>cxnode1# /opt/SUNWsczone/sczsmf/util/sczsmf_register -f /etc/sczsmf_config.apache
sourcing /etc/sczsmf_config.apache
Registration of resource apache-server succeeded.
Validation of resource apache-server succeeded.</pre>
<p>Now enable Apache and check that it&#8217;s functioning correctly:</p>
<pre>clresource enable apache-server</pre>
<p>You can now browse to <tt>/phpmyadmin</tt> and check that everything it working!</p>
<h2>Conclusions</h2>
<p>When I started this work I wasn&#8217;t sure whether it was going to be possible or not, but despite a couple of bumps along the way I&#8217;m happy with the end result. Whilst it might not be a perfect match for a real cluster it certainly provides enough opportunity for testing and for use in training.</p>
]]></content:encoded>
			<wfw:commentRss>http://system-log.tyr.org.uk/2008/06/27/building-a-solaris-cluster-express-cluster-in-a-virtualbox-on-opensolaris/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>VMware Fusion 2.0 Beta</title>
		<link>http://system-log.tyr.org.uk/2008/05/06/vmware-fusion-20-beta-half-life-2/</link>
		<comments>http://system-log.tyr.org.uk/2008/05/06/vmware-fusion-20-beta-half-life-2/#comments</comments>
		<pubDate>Tue, 06 May 2008 22:34:17 +0000</pubDate>
		<dc:creator>tyr</dc:creator>
				<category><![CDATA[Mac]]></category>

		<guid isPermaLink="false">http://system-log.tyr.org.uk/?p=18</guid>
		<description><![CDATA[VMware Fusion 2.0 Beta is out. It&#8217;s a free upgrade for all current VMware Fusion users. Notable updates include Multiple Monitor support and Direct-X 9 Shader Model 2.
To give the Shader Model 2 a whirl I fired up Half Life 2. It had refused to run in any previous VMware Fusion release but this time it [...]]]></description>
			<content:encoded><![CDATA[<p><a title="VMware Fusion 2.0 Beta" href="http://communities.vmware.com/community/beta/fusion" onclick="javascript:pageTracker._trackPageview('/outbound/article/communities.vmware.com');">VMware Fusion 2.0 Beta is out.</a> It&#8217;s a free upgrade for all current VMware Fusion users. Notable updates include Multiple Monitor support and Direct-X 9 Shader Model 2.</p>
<p>To give the Shader Model 2 a whirl I fired up Half Life 2. It had refused to run in any previous VMware Fusion release but this time it runs! Ok, it&#8217;s runs but it&#8217;s nowhere near playable as it&#8217;s getting about &lt;5 FPS. However it&#8217;s a promising development.</p>
<p><a href="http://system-log.tyr.org.uk/wp-content/uploads/2008/05/vmware-fusion-2-beta-half-life-2-train.png" ><img class="alignnone size-medium wp-image-19" title="VMware Fusion 2 Beta - Half Life 2 Titles" src="http://system-log.tyr.org.uk/wp-content/uploads/2008/05/vmware-fusion-2-beta-half-life-2-train-300x254.png" alt="" width="300" height="254" /></a></p>
<p><a href="http://system-log.tyr.org.uk/wp-content/uploads/2008/05/vmware-fusion-2-beta-half-life-2-city-17.png" ><img class="alignnone size-medium wp-image-20" title="VMware Fusion 2 Beta - Half Life 2 City 17" src="http://system-log.tyr.org.uk/wp-content/uploads/2008/05/vmware-fusion-2-beta-half-life-2-city-17-300x254.png" alt="" width="300" height="254" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://system-log.tyr.org.uk/2008/05/06/vmware-fusion-20-beta-half-life-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSolaris 2008.05 on Mac Pro</title>
		<link>http://system-log.tyr.org.uk/2008/05/06/opensolaris-200805-on-mac-pro/</link>
		<comments>http://system-log.tyr.org.uk/2008/05/06/opensolaris-200805-on-mac-pro/#comments</comments>
		<pubDate>Tue, 06 May 2008 21:46:17 +0000</pubDate>
		<dc:creator>tyr</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[macpro]]></category>
		<category><![CDATA[opensolaris]]></category>
		<category><![CDATA[solairs]]></category>

		<guid isPermaLink="false">http://system-log.tyr.org.uk/?p=14</guid>
		<description><![CDATA[Recently I posted about installing Solaris Express on a Mac Pro. This morning OpenSolaris was released, the first release of what was Project Indiana. Prior to this release the outputs of the various OpenSolaris projects were available within Solaris Express, however now they have their own distribution which has several differences notably the use of [...]]]></description>
			<content:encoded><![CDATA[<p>Recently <a title="Solaris Express on Mac Pro" href="http://system-log.tyr.org.uk/2008/01/29/solaris-express-snv_78-on-mac-pro/" >I posted</a> about installing Solaris Express on a Mac Pro. This morning <a title="OpenSolaris" href="http://www.opensolaris.com/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.opensolaris.com');">OpenSolaris</a> was released, the first release of what was Project Indiana. Prior to this release the outputs of the various OpenSolaris projects were available within Solaris Express, however now they have their own distribution which has several differences notably the use of a new packaging system called IPS (Image Packaging System).</p>
<p>I will look further into the workings of OpenSolaris in some future posts but for now I thought I&#8217;d take a quick look at how the install ran on a bare metal Mac Pro (2006 version).</p>
<p><span id="more-14"></span></p>
<p>OpenSolaris is distributed as a Live CD with an integrated installer to make a permanent install once you&#8217;ve had a chance to poke around and check things like hardware compatibility. You can download the CD from <a title="OpenSolaris download page" href="http://www.opensolaris.com/get/index.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.opensolaris.com');">Sun</a> or from <a title="OpenSolaris mirror sites" href="http://blogs.sun.com/sch/entry/2008_05_more_ways_to" onclick="javascript:pageTracker._trackPageview('/outbound/article/blogs.sun.com');">one of these mirrors</a>.</p>
<p>Previously I&#8217;d had some problems with Solaris Express not being able to create a suitable &#8216;fdisk&#8217; partition on the disk I was trying to install to. To see if this was still an issue I erased my existing Solaris Express drive and partitioned it with a standard OS X EFI/GUID partition table and a single HFS+ volume.</p>
<p>Because I&#8217;m rather paranoid about my data I powered down and removed my OS X drives from the machine before trying the OpenSolaris install. Then I booted up from the Live CD which loaded a standard GRUB menu, the banner indicated that this release is on a base of snv_86. I was prompted to pick a keyboard layout and a desktop language, then after a short while a fairly normal looking Gnome desktop poped up.</p>
<p><a href="http://system-log.tyr.org.uk/wp-content/uploads/2008/05/opensolaris-live-cd-desktop.png" ><img class="alignnone size-medium wp-image-15" title="Open Solaris Live CD Desktop" src="http://system-log.tyr.org.uk/wp-content/uploads/2008/05/opensolaris-live-cd-desktop-300x225.png" alt="" width="300" height="225" /></a></p>
<p>An item on the desktop that caught my attention was the &#8216;Device Driver Utility&#8217;. This bought up a list all the detected devices in the system and whether an appropriate driver was found for them.<a href="http://system-log.tyr.org.uk/wp-content/uploads/2008/05/screenshot-device-driver-utility.png" ><img class="alignnone size-medium wp-image-16" title="OpenSolaris Device Driver Utility" src="http://system-log.tyr.org.uk/wp-content/uploads/2008/05/screenshot-device-driver-utility-300x243.png" alt="" width="300" height="243" /></a></p>
<p>Most devices were detected fine with the following exceptions.</p>
<ul>
<li>Broadcom Corporation BCM4238 802.11/a/b/g/n</li>
<li>ACPI SMBus 1.0 Host Controller</li>
<li>Intel Corporation 6311ESB/6321ESB I/OxAPIC Interrupt Controller</li>
<li>Standard PC COM port &#8211; Driver Misconfigured</li>
</ul>
<p>From within the device driver tool there&#8217;s an option to submit the results to the central hardware compatibility list.</p>
<p>I have a dual monitor setup, connected to an ATI 1900XT graphics card. Whilst a full resolution display was shown on the larger monitor both monitors displayed the same image, with the lower resolution display showing the top-left section of the other monitor. The ATI card is showing as using the &#8216;vgatext&#8217; driver which is, presumably, some generic video driver. Unfortunately ATI do not make Solaris drivers for their cards, one reason why I&#8217;m thinking about moving to the 8800GT card that is now available. </p>
<p>Since the LiveCD booted ok it seems fairly likely that a full install should work, providing the disks could be detected properly. The &#8216;Install OpenSolaris&#8217; app is a bright, unmissable icon on the desktop. Picking it bought up with installer which after the initial welcome page displayed the disk chooser.</p>
<p><a href="http://system-log.tyr.org.uk/wp-content/uploads/2008/05/screenshot-opensolaris-200805-installer.png" ><img class="alignnone size-medium wp-image-17" title="OpenSolaris 2008.05 Installer Disk Chooser" src="http://system-log.tyr.org.uk/wp-content/uploads/2008/05/screenshot-opensolaris-200805-installer-300x240.png" alt="" width="300" height="240" /></a></p>
<p>The disk was displayed correctly, I picked the option to use the whole disk. Then I went through simple time zone and locale options followed by a screen to set a non-root user and some passwords. That was it for the installer, it really couldn&#8217;t have been any more simple</p>
<p>The install ran for about 20 minutes and completed without error. After it completed I rebooted the machine and it rebooted into a GRUB menu with &#8216;OpenSolaris 2008.05 snv_86_rc3 X86&#8242; as the default, and only, option. This booted fine to a GNOME login prompt.</p>
<p>I&#8217;ll poke around in OpenSolaris more over the coming weeks and will hopefully post some further thoughts here.</p>
]]></content:encoded>
			<wfw:commentRss>http://system-log.tyr.org.uk/2008/05/06/opensolaris-200805-on-mac-pro/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>National Express WiFi is satellite based?</title>
		<link>http://system-log.tyr.org.uk/2008/04/15/national-express-wifi-is-satellite-based/</link>
		<comments>http://system-log.tyr.org.uk/2008/04/15/national-express-wifi-is-satellite-based/#comments</comments>
		<pubDate>Tue, 15 Apr 2008 19:54:17 +0000</pubDate>
		<dc:creator>tyr</dc:creator>
				<category><![CDATA[Transport]]></category>

		<guid isPermaLink="false">http://system-log.tyr.org.uk/?p=13</guid>
		<description><![CDATA[I&#8217;m on the train! Finally WiFi is free in standard class on the east coast mainline. So that&#8217;s at least one thing National Express have done right so far.
I&#8217;d always assumed that the train WiFi was supported by a 3G network, or something similar. However my outbound IP address is 217.28.34.132 which a whois indicates [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m on the train! Finally WiFi is free in standard class on the east coast mainline. So that&#8217;s at least one thing National Express have done right so far.</p>
<p>I&#8217;d always assumed that the train WiFi was supported by a 3G network, or something similar. However my outbound IP address is 217.28.34.132 which a whois indicates belongs to<br />
<code><br />
inetnum:        217.28.32.0 - 217.28.35.15<br />
netname:        NSAB-NET<br />
descr:          NSAB backbone and address-pools for VPN Services<br />
##########################<br />
In case of improper use, please contact:<br />
&lt;abuse@nsab.se&gt;<br />
##########################<br />
</code></p>
<p>nsab.se redirects to <a title="SES SIRIUS Front Page" href="http://www.ses-sirius.com/english/" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.ses-sirius.com');">SES SIRIUS AB</a> which is a satellite broadband provider. Well there you go.</p>
<p>Now if only the train was on time&#8230;</p>
<p>P.S. Google comes up in Swedish <img src='http://system-log.tyr.org.uk/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://system-log.tyr.org.uk/2008/04/15/national-express-wifi-is-satellite-based/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
