<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Within Reason</title>
    <link>http://typo.submonkey.net/</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>I do what I want</description>
    <item>
      <title>Moved</title>
      <description>&lt;p&gt;Since it was set up, this machine has lived on my gateway FreeBSD machine in what has since become the boy&amp;#8217;s bedroom.  It moved from there to my own bedroom, and I recently started turning it off at night to try to save power (and sleep better!).&lt;/p&gt;

&lt;p&gt;This led to a number of people emailing me about outages - which was quite flattering; didn&amp;#8217;t realise anyone would care about my crappy blog that much - because they were in a timezone disparate to be trying to get to it during the hours I had it turned off.&lt;/p&gt;

&lt;p&gt;Therefore, and with the realisation that I could get a hosted solution for $12/month (US), I have moved this blog to a Solaris&lt;sup&gt;&lt;a href="#fn-solzone0"&gt;[1]&lt;/a&gt;&lt;/sup&gt; zone hosted at &lt;a href="http://www.gangusinternet.com/"&gt;Gangus Internet&lt;/a&gt;.  Service (technically and customer-servicely) so far has been absolutely impeccable.&lt;/p&gt;

&lt;p&gt;If you are reading this, I guess the move went OK.&lt;/p&gt;

&lt;hr/&gt;

&lt;p&gt;&lt;a name="fn-solzone0"&gt;[1]&lt;/a&gt; &lt;small&gt;Which is not a reflection on FreeBSD in any way.  Questions such as were asked after &lt;a href="http://www.freebsd.org/cgi/cvsweb.cgi/doc/share/pgpkeys/ceri.key.diff?r1=1.6;r2=1.7"&gt;this commit&lt;/a&gt; are unnecessary :)&lt;/small&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 26 Jun 2008 18:43:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:50a17929-3acd-4d74-95f3-911929b7e4a2</guid>
      <author>Ceri Davies</author>
      <link>http://typo.submonkey.net/articles/2008/06/26/moved</link>
      <category>General</category>
      <category>Solaris</category>
    </item>
    <item>
      <title>New release of tcpdrop for Solaris</title>
      <description>&lt;p&gt;Some years ago &lt;a href="http://typo.submonkey.net/articles/2006/07/31/tcpdrop-for-solaris"&gt;I ported tcpdrop to Solaris&lt;/a&gt; from the FreeBSD version.  I did it very quickly as a proof of concept and never got round to quite getting the error handling right or worrying about Solaris 10 &lt;a href="http://blogs.sun.com/gbrunett/entry/top_5_solaris_10_security"&gt;privileges&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After spending the required 14 seconds looking at the privileges stuff, it became pretty clear that the required privilege for using tcpdrop was &lt;code&gt;PRIV_SYS_IP_CONFIG&lt;/code&gt;.  This cannot be asserted in a non-global zone, so if you are one of the many people who have emailed me asking if it can work in a non-global zone, the answer is &amp;#8220;no, it can&amp;#8217;t&amp;#8221;.  Not only that, but there&amp;#8217;s nothing I can do about it.&lt;/p&gt;

&lt;p&gt;Also in this release, I fixed up the error messages so that they are at least correct :)&lt;/p&gt;

&lt;p&gt;The next release will feature a manpage in man format, rather than the current mdoc one which can&amp;#8217;t actually be formatted on Solaris.  Anyone who knows an automated method to convert from mdoc to man, please shout.&lt;/p&gt;

&lt;p&gt;Anyway, the new release is &lt;a href="http://typo.submonkey.net/pages/tcpdrop-solaris"&gt;available for download&lt;/a&gt;, knock yourselves out.&lt;/p&gt;</description>
      <pubDate>Fri, 16 May 2008 21:09:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:62bae70f-be57-4e2e-a364-d76884e3cee3</guid>
      <author>Ceri Davies</author>
      <link>http://typo.submonkey.net/articles/2008/05/16/new-release-of-tcpdrop-for-solaris</link>
      <category>Software</category>
      <category>Solaris</category>
    </item>
    <item>
      <title>Check your T5220!</title>
      <description>&lt;p&gt;We took delivery of a pair of &lt;a href="http://sun.com/servers/coolthreads/t5220"&gt;T5220s&lt;/a&gt; last week for implementing a new cluster.&lt;/p&gt;

&lt;p&gt;All in all they&amp;#8217;re nice systems, but the components such as the disk fillers and the DVD drive seem a little on the too plastic side; since the front USB ports are integrated on the DVD drive panel, there&amp;#8217;s even a note in the hardware manual warning you to be careful not to unseat the DVD drive when removing USB devices!  The PCI risers seems a little wobbly too.&lt;/p&gt;

&lt;p&gt;We were a little surprised by how much heavier they seem to be when compared to the &lt;a href="http://sun.com/servers/coolthreads/t2000"&gt;T2000&lt;/a&gt;; racking a T2000 can be done on your own but I wouldn&amp;#8217;t want to do a T5220 alone.  The T5220 is about 4 inches longer though which may account for the extra weight.&lt;/p&gt;

&lt;p&gt;Since we&amp;#8217;re a little nerdy, the first thing we did with the system was take the service panel off to check out the innards.  It turned out to be a good job that we had, as the &lt;a href="http://www.flickr.com/photos/cerisubmonkeynet/2260139237/"&gt;air duct had completely come away from its correct position during transit&lt;/a&gt;, and this would have made the system very unhappy.  Particularly so, since the fan modules were a little loose too.&lt;/p&gt;</description>
      <pubDate>Fri, 15 Feb 2008 21:44:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:f99933aa-0e1b-4f9c-959c-8cff0cd08abe</guid>
      <author>Ceri Davies</author>
      <link>http://typo.submonkey.net/articles/2008/02/15/check-your-t5220</link>
      <category>Sun</category>
    </item>
    <item>
      <title>Profile support for zsh</title>
      <description>&lt;p&gt;I&amp;#8217;ve been using zsh for ages now, and the &lt;a href="http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=4912090"&gt;lack of a pfzsh implementation&lt;/a&gt; has been a minor annoyance for some of that time.&lt;/p&gt;

&lt;p&gt;I happened to be looking at the &lt;a href="http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/csh/"&gt;csh source code&lt;/a&gt; and noticed how trivial the pfcsh implementation was and so, using the &lt;a href="http://www.opensolaris.org/os/project/sfwnv/Documents/install_quickstart/"&gt;SFW code&lt;/a&gt; as a base, I threw pfzsh together yesterday afternoon.&lt;/p&gt;

&lt;p&gt;Now, it turns out that the &lt;a href="http://www.opensolaris.org/os/project/fgap/"&gt;OpenSolaris FGAP project&lt;/a&gt; will be solving this in a different way, so a putback to SFW is unlikely.  However, I&amp;#8217;m going to find this useful in the meantime, so if you will too, download either the &lt;a href="http://www.submonkey.net/~ceri/util/pfzsh/"&gt;patch&lt;/a&gt; or an &lt;a href="http://www.submonkey.net/~ceri/util/pfzsh/"&gt;x86 package&lt;/a&gt; if they are useful to you.&lt;/p&gt;</description>
      <pubDate>Wed, 12 Dec 2007 21:47:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:fb9dc641-6f58-4e56-9d54-739540472452</guid>
      <author>Ceri Davies</author>
      <link>http://typo.submonkey.net/articles/2007/12/12/profile-support-for-zsh</link>
      <category>Software</category>
      <category>Solaris</category>
    </item>
    <item>
      <title>OpenSolaris as SCSI target</title>
      <description>&lt;p&gt;The &lt;a href="http://opensolaris.org/os/project/comstar"&gt;OpenSolaris COMSTAR project&lt;/a&gt; released their first set of bits at the end of last week.&lt;/p&gt;

&lt;p&gt;The code drop, SUNWsmft, comprises support for using an OpenSolaris system as a SCSI target, which means that OpenSolaris now supports native CIFS, iSCSI, SCSI and NFS with a transactional COW filesystem, runnable on a system that costs less than &#163;20k (half that in certain industries) for 24TB, explaining why NetApp are very scared indeed.&lt;/p&gt;

&lt;p&gt;I had to try it out as soon as possible.  Luckily the code drop works on Solaris 10 as well as OpenSolaris, and I had Solaris 10 systems and HBAs available for testing.  In order to isolate this from our real SANs, I just ran a fibre channel cable between the HBAs, so was somewhat wary that I had no idea how to get a HBA to do arbitrated loop.  Turns out that isn&amp;#8217;t a problem, and here&amp;#8217;s all I had to do to get this working.&lt;/p&gt;

&lt;h1&gt;Install SUNWsmft&lt;/h1&gt;

&lt;p&gt;Grab the &lt;a href="http://opensolaris.org/os/project/comstar/InstallingComstar/"&gt;package&lt;/a&gt; and install it.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt; # fetch http://opensolaris.org/os/project/comstar/files/SUNWstmf.sparc.tar.gz
 # gzip -dc SUNWstmf.sparc.tar.gz | tar xf -
 # yes | pkgadd -d . SUNWstmf
&lt;/code&gt;&lt;/pre&gt;

&lt;h1&gt;Choose target ports&lt;/h1&gt;

&lt;p&gt;The postinstall script loads the kernel modules straight away, so now you just have to choose a HBA port to put in target mode using the qlt driver.  My test target system has two dual port HBAs and I couldn&amp;#8217;t remember which one had the cable connected, so I just did them all and rebooted:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# update_drv -d -i '"pciex1077,2432"' qlc
# update_drv -a -i '"pciex1077,2432"' qlt
# init 6
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;When the machine comes back up, qlt attaches and the HBAs automatically negotiate an arbitrated loop.  Great.&lt;/p&gt;

&lt;h1&gt;Create LU backing&lt;/h1&gt;

&lt;p&gt;I&amp;#8217;m going to use ZFS zvols because I don&amp;#8217;t want to wait for mkfile to finish (I have to use a zpool with a funny name since I&amp;#8217;m doing this in a rush and this is what I have):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# zfs create archive/stmf
# zfs create archive/stmf/lun
# for i in `jot 10 0`; do zfs create -V 1g archive/stmf/lun/000$i; done
&lt;/code&gt;&lt;/pre&gt;

&lt;h1&gt;Register LUs&lt;/h1&gt;

&lt;p&gt;Now you have to tell the COMSTAR bits about the LUs you created.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# for i in `jot 10 0`; do sbdadm lu-create -r /dev/zvol/dsk/archive/stmf/lun/000$i; done
# sbdadm lu-list

Found 10 LU(s)

              GUID                  DATA SIZE     SOURCE
--------------------------------  -------------  ----------------
6000ae4000144f86b97e4741f80e000a     1073676288  /dev/zvol/dsk/archive/stmf/lun/0009
6000ae4000144f86b97e4741f80d0009     1073676288  /dev/zvol/dsk/archive/stmf/lun/0008
6000ae4000144f86b97e4741f80c0008     1073676288  /dev/zvol/dsk/archive/stmf/lun/0007
6000ae4000144f86b97e4741f80a0007     1073676288  /dev/zvol/dsk/archive/stmf/lun/0006
6000ae4000144f86b97e4741f8070006     1073676288  /dev/zvol/dsk/archive/stmf/lun/0005
6000ae4000144f86b97e4741f8060005     1073676288  /dev/zvol/dsk/archive/stmf/lun/0004
6000ae4000144f86b97e4741f8060004     1073676288  /dev/zvol/dsk/archive/stmf/lun/0003
6000ae4000144f86b97e4741f8050003     1073676288  /dev/zvol/dsk/archive/stmf/lun/0002
6000ae4000144f86b97e4741f8040002     1073676288  /dev/zvol/dsk/archive/stmf/lun/0001
6000ae4000144f86b97e4741f8030001     1073676288  /dev/zvol/dsk/archive/stmf/lun/0000
&lt;/code&gt;&lt;/pre&gt;

&lt;h1&gt;Create views&lt;/h1&gt;

&lt;p&gt;Now I have to create a view to allow the initiators access to the LUs I&amp;#8217;ve created.  Since I don&amp;#8217;t know what I&amp;#8217;m doing at this point, I just open them all; in production we&amp;#8217;ll use host groups (&amp;#8220;stmfadm create-view&amp;#8221;) but I&amp;#8217;m just throwing it open here:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# stmfadm add-view 6000AE4000144F86B97E4741F8030001
# stmfadm list-view -l 6000AE4000144F86B97E4741F8030001
View Entry: 0
    Host group   : All
    Target group : All
    LUN          : 0
&lt;/code&gt;&lt;/pre&gt;

&lt;h1&gt;Reinitialize the link on the initiator&lt;/h1&gt;

&lt;p&gt;In order to get the initiator to see the new LU, I have to do the following (one or other of these three commands always works, but no single one ever works 100%):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# luxadm -e forcelip /devices/pci@1d,700000/QLGC,qlc@2/fp@0,0:devctl
# cfgadm -al
# devfsadm -C -v
#  format
Searching for disks...done

c3t210000E08B945E9Fd0: configured with capacity of 1023.88MB


AVAILABLE DISK SELECTIONS:
       0. c1t0d0 &amp;lt;SUN72G cyl 14087 alt 2 hd 24 sec 424&amp;gt;
          /pci@1f,700000/scsi@2/sd@0,0
       1. c1t1d0 &amp;lt;SUN72G cyl 14087 alt 2 hd 24 sec 424&amp;gt;
          /pci@1f,700000/scsi@2/sd@1,0
       2. c1t2d0 &amp;lt;SEAGATE-ST373207LSUN72G-045A-68.37GB&amp;gt;
          /pci@1f,700000/scsi@2/sd@2,0
       3. c1t3d0 &amp;lt;SEAGATE-ST373207LSUN72G-045A-68.37GB&amp;gt;
          /pci@1f,700000/scsi@2/sd@3,0
       4. c3t210000E08B945E9Fd0 &amp;lt;SUN-COMSTAR-1.0 cyl 32764 alt 2 hd 2 sec 32&amp;gt;
          /pci@1d,700000/QLGC,qlc@2/fp@0,0/ssd@w210000e08b945e9f,0
Specify disk (enter its number):
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;yay!&lt;/p&gt;</description>
      <pubDate>Mon, 19 Nov 2007 21:53:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:da391dca-da56-4a32-9b7c-b853988a1df7</guid>
      <author>Ceri Davies</author>
      <link>http://typo.submonkey.net/articles/2007/11/19/opensolaris-as-scsi-target</link>
      <category>Solaris</category>
    </item>
    <item>
      <title>On interfaces</title>
      <description>&lt;p&gt;On our way to work, there is a crossroads.&lt;/p&gt;

&lt;p&gt;The crossroads has traffic lights on each spur, and Stef has discovered that if you press the button at one crossing, it has the effect of causing all the crossings to be activated.  Therefore, on the way past the first crossing she hits the button so that by the time she arrives at the crossing that she does want to take, it has made the lights go green.&lt;/p&gt;

&lt;p&gt;I pulled her up on this as an abuse of the interface, warning her that there were no guarantees that this functionality would be present in a future version of the lights and that it was users like her who caused headaches for developers trying to refactor and improve older software.&lt;/p&gt;

&lt;p&gt;She just shook her head.&lt;/p&gt;</description>
      <pubDate>Mon, 19 Nov 2007 20:27:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:6d42abc9-34a2-4115-b547-6e8eb31f2b18</guid>
      <author>Ceri Davies</author>
      <link>http://typo.submonkey.net/articles/2007/11/19/on-interfaces</link>
      <category>General</category>
    </item>
    <item>
      <title>hagui on Mac OS X</title>
      <description>&lt;p&gt;VCS&amp;#8217; hagui is basically pointless, but I do like a live diagram of what&amp;#8217;s going on when I&amp;#8217;m creating new service groups.  I also like my Mac, so here&amp;#8217;s the quick how-to on getting it working on the Mac.&lt;/p&gt;

&lt;hr/&gt;

&lt;p&gt;Extract the VRTScscm package from the install media, and copy it somewhere permanent.  I&amp;#8217;m using my home directory.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;   $ gzip -dc VRTScscm.tar.gz | (cd /tmp; tar xf -)
   $ mv /tmp/VRTScscm/reloc/opt ${HOME}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Fix the VCS_HOME and JAVA_HOME variables in the hagui script.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;   VCS_HOME="${HOME}/opt/VRTSvcs"
   JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I create a symlink for convenience.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;   $ ln -s ../opt/VRTSvcs/bin/hagui ${HOME}/bin
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Job&amp;#8217;s done.  While you&amp;#8217;re here, &lt;a href="http://www.youtube.com/watch?v=0bK63uSTTNs"&gt;this&lt;/a&gt; is the best video on YouTube, JFYI.&lt;/p&gt;</description>
      <pubDate>Wed, 29 Aug 2007 22:16:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:c16ac3d2-3264-4106-b394-bc0b9a067727</guid>
      <author>Ceri Davies</author>
      <link>http://typo.submonkey.net/articles/2007/08/29/hagui-on-mac-os-x</link>
      <category>Clustering</category>
      <category>Veritas</category>
      <category>Apple</category>
    </item>
    <item>
      <title>404s fixed</title>
      <description>&lt;p&gt;Warren at &lt;a href="http://planetsysadmin.com/"&gt;Planet SysAdmin&lt;/a&gt; pointed out that my RSS feed was 404&amp;#8217;ing.&lt;/p&gt;

&lt;p&gt;In fact, everything under Rails was 404&amp;#8217;ing since I upgraded to lighttpd 1.4.16; this is now fixed.  Lighttpd bug &lt;a href="http://trac.lighttpd.net/trac/ticket/1270"&gt;1270&lt;/a&gt; refers.&lt;/p&gt;</description>
      <pubDate>Sun, 26 Aug 2007 21:11:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:d8676e5a-4225-48a2-a7e1-a483b2f37f9b</guid>
      <author>Ceri Davies</author>
      <link>http://typo.submonkey.net/articles/2007/08/26/404s-fixed</link>
      <category>Software</category>
    </item>
    <item>
      <title>What to do...</title>
      <description>&lt;p&gt;I&amp;#8217;m feeling really deflated in front a computer of late.&lt;/p&gt;

&lt;p&gt;I think this is a mixture of:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Reaching the &amp;#8220;write everything up&amp;#8221; stage of a fun project I&amp;#8217;ve been working on for the last 9 months (perhaps I will write about this sometime);&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Not having time to focus on anything at home (Max is lovely but all-encompassing);&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It seems that I have read the entire Internet;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Shouty old dicks being rude to each other in a particular open-source project every time I open my mail.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Even while reviewing the new &lt;a href="http://www.absolutefreebsd.com/"&gt;Absolute FreeBSD&lt;/a&gt; I had to print everything out and annotate with pencil.&lt;/p&gt;

&lt;p&gt;So if you&amp;#8217;re wondering where I am, or why I haven&amp;#8217;t responded to an email, &lt;em&gt;meh&lt;/em&gt;.&lt;/p&gt;</description>
      <pubDate>Fri, 24 Aug 2007 20:22:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:d21dc857-2f44-4b61-b971-d6417fc0b01c</guid>
      <author>Ceri Davies</author>
      <link>http://typo.submonkey.net/articles/2007/08/24/what-to-do</link>
      <category>General</category>
    </item>
    <item>
      <title>message overflow on /dev/log minor #5 -- is syslogd(1M) running?</title>
      <description>&lt;p&gt;Note to self, somewhere I might find it in future.&lt;/p&gt;

&lt;p&gt;During a JumpStart, this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;message overflow on /dev/log minor #5 -- is syslogd(1M) running?
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;means that you missed off the &lt;code&gt;-o anon=0&lt;/code&gt; on the NFS share.&lt;/p&gt;</description>
      <pubDate>Mon, 23 Jul 2007 13:04:00 +0000</pubDate>
      <guid isPermaLink="false">urn:uuid:d94cae7d-dfd1-4a7b-aef5-4f5ab96f939b</guid>
      <author>Ceri Davies</author>
      <link>http://typo.submonkey.net/articles/2007/07/23/message-overflow-on-dev-log-minor-5-is-syslogd-1m-running</link>
      <category>Solaris</category>
    </item>
  </channel>
</rss>
