<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Al Hoang &#187; solaris</title>
	<atom:link href="http://blogs.law.harvard.edu/hoanga/category/unix/solaris/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.law.harvard.edu/hoanga</link>
	<description>Just another weblog</description>
	<lastBuildDate>Wed, 09 Sep 2009 06:52:48 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
		<item>
		<title>Automating Zone creation in OpenSolaris 2009.06</title>
		<link>http://blogs.law.harvard.edu/hoanga/2009/06/02/automating-zone-creation-in-opensolaris-200906/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2009/06/02/automating-zone-creation-in-opensolaris-200906/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 13:02:14 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[sysadmin]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=737</guid>
		<description><![CDATA[With the announcement of OpenSolaris 2009.06 I thought it would be appropriate to blog a little about a tool I had been writing to help myself play with Zones a bit easier.  
My overall goals were the following:

Have each zone configured with its own virtual NIC (Crossbow)
Allow easy creation of zones without having to [...]]]></description>
			<content:encoded><![CDATA[<p>With the <a href="http://www.sun.com/aboutsun/pr/2009-06/sunflash.20090601.1.xml">announcement of OpenSolaris 2009.06</a> I thought it would be appropriate to blog a little about a tool I had been writing to help myself play with Zones a bit easier.  </p>
<p>My overall goals were the following:</p>
<ul>
<li>Have each zone configured with its own virtual NIC (<a href="http://opensolaris.org/os/project/crossbow/">Crossbow</a>)</li>
<li>Allow easy creation of zones without having to type zonecfg crap over and over again</li>
<li>Make it a stepping stone to automatically creating zones</li>
<li>See how well ipkg branded Zones work</li>
<li>Allow a Zone to get its IP and DNS configuration from DHCP</li>
</ul>
<p>I had tried going through tutorials that I found on the web (See references below) for setting up Zones but sadly none of them worked to my frustration.  After a lot of experimentation I finally pieced together a way to create zones quickly and (almost) automatically for simple configurations.</p>
<h3>Howto</h3>
<ol>
<li>Create a template zone that will be used as the main clone Zone</li>
<li>Download <a href="http://gist.github.com/122220">setup-zone-exclusive.sh</a> and modify lines 34-35 to match the name of your template zone and the real interface you want the zones to bind to</li>
<li>Download the DHCP event hook script from <a href="http://www.linuxtopia.org/online_books/opensolaris_2008/SYSADV3/html/extkj.html">here</a> and name it dhcp-client-event.sh if you want DHCP configuration</li>
<li>Run setup-zone-exclusive with the zonename and the virtual nic interface that you want</li>
</ol>
<p>In more detail here are the steps below</p>
<h4>First create a template zone (I call it barebones here)</h4>
<blockquote><p>
# Create /zones as its own ZFS filesystem<br />
$ pfexec zfs create rpool/zones<br />
$ pfexec zfs set mountpoint=/zones rpool/zones<br />
$ pfexec zfs create rpool/zones/barebones<br />
$ pfexec chmod 0700 /zones/barebones<br />
$ pfexec dladm create-vnic -l $REAL_IF vnic0<br />
$ pfexec zonecfg -z barebones<br />
barebones: No such zone configured<br />
Use &#8216;create&#8217; to begin configuring a new zone.<br />
zonecfg:barebones&gt; create<br />
zonecfg:barebones&gt; set zonepath=/zones/barebones<br />
zonecfg:barebones&gt; set ip-type=exclusive<br />
zonecfg:barebones&gt; add net<br />
zonecfg:barebones:net&gt; set physical=vnic0<br />
zonecfg:barebones:net&gt; end<br />
zonecfg:barebones&gt; exit</p>
<p>$ pfexec zoneadm -z barebones install
</p></blockquote>
<h4>Get the script</h4>
<p>I would suggest you create a project directory to hold things such as <em>zonecreations</em>.</p>
<p>Download from Github gists <a href="http://gist.github.com/122220">here</a>.   Name it setup-zone-exclusive.sh. Don&#8217;t forget to chmod +x the file so you can execute it</p>
<h4>Download the DHCP event hook script</h4>
<p>You can get that <a href="http://www.linuxtopia.org/online_books/opensolaris_2008/SYSADV3/html/extkj.html">here</a>.  Make sure this script is in the same directory as wherever you saved setup-zone-exclusive.sh</p>
<h4>Create a zone</h4>
<p>You can now create zones like this:</p>
<blockquote><p>
cd zonecreations<br />
pfexec ./setup-zone-exclusive.sh mycoolnewzone  virtualnic1
</p></blockquote>
<p>Have fun!</p>
<p>Update:  Fixed an error in the example for using dladm.  It should be correct now.  Thanks!</p>
<h3> References </h3>
<h4>Downloads</h4>
<p><a href="http://gist.github.com/122220">http://gist.github.com/122220 (setup-zone-exclusive.sh)</a><br />
<a href="http://www.linuxtopia.org/online_books/opensolaris_2008/SYSADV3/html/extkj.html">A DHCP event script to make sure DNS is configured when DHCP acquires an IP</a></p>
<h4>Older docs on setting up Zones on Solaris</h4>
<p><a href="http://www.mail-archive.com/zones-discuss@opensolaris.org/msg04174.html">How to use sysidcfg file in OpenSolaris 2008.11</a><br />
<a href="http://docs.sun.com/app/docs/doc/819-2450/z.login.ov-14?a=view">Internal Zone Configuration docs</a> <br />
<a href="http://docs.sun.com/app/docs/doc/819-2450/z.login.task-31?a=view">Performing the Initial Zone configuration</a> <br />
<a href="http://docs.sun.com/app/docs/doc/819-5776/6n7r9js2j?a=view">Preconfiguring with sysidcfg file</a> <br />
<a href="http://opensolaris.org/os/community/zones/faq/#cfg_sysidcfg">OpenSolaris FAQ on sysidcfg</a> <br />
<a href="http://www.cuddletech.com/blog/pivot/entry.php?id=751">Ben Rockwood&#8217;s blogpost on Zone creation</a>  <br />
<a href="http://docs.sun.com/app/docs/doc/819-2450/gbrmi?a=view">About /etc/.UNCONFIGURED</a> </p>
<h4>Helpful for understanding Zones and Crossbow</h4>
<p><a href="http://blogs.sun.com/stw/entry/crossbow_is_delivered_traveling_vnics">Crossbow on vnics</a></p>
<h4>Finding out that there is a change in policy for setting root_password in sysidcfg files</h4>
<p><a href="http://opensolaris.org/os/community/on/flag-days/pages/2008111501/">PASSREQ is enforced</a> <br />
<a href="https://www.opensolaris.org/jive/thread.jspa?messageID=329028&amp;#329028">zlogin failure after zone setup</a> </p>
<h4>The following helped in understanding the role of IPS and ipkg inside a non-global Zone</h4>
<p><a href="http://blogs.sun.com/jerrysblog/entry/updating_zones_on_opensolaris_2008">Updating Zones in OpenSolaris 2008.x</a> <br />
<a href="http://blogs.sun.com/dp/date/20080512">A field guide to Zones in OpenSolaris 2008.05</a> <br />
<a href="https://www.opensolaris.org/jive/thread.jspa?threadID=102287&amp;tstart=15">OpenSolaris forum on sysidcfg and Zones</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2009/06/02/automating-zone-creation-in-opensolaris-200906/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>The role of loghost entry in /etc/inet/hosts for OpenSolaris</title>
		<link>http://blogs.law.harvard.edu/hoanga/2009/06/02/the-role-of-loghost-entry-in-etcinethosts-for-opensolaris/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2009/06/02/the-role-of-loghost-entry-in-etcinethosts-for-opensolaris/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 11:47:11 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=734</guid>
		<description><![CDATA[After looking at /etc/inet/hosts I noticed a loghost entry.
Being a Solaris newbie I was curious to see why this entry was there.  A quick Google brought up this nice discussion:
&#160;http://opensolaris.org/jive/thread.jspa?&#8230;
Summary, don&#8217;t delete it.
]]></description>
			<content:encoded><![CDATA[<p>After looking at /etc/inet/hosts I noticed a loghost entry.</p>
<p>Being a Solaris newbie I was curious to see why this entry was there.  A quick Google brought up this nice discussion:<br />
&nbsp;<a href="http://opensolaris.org/jive/thread.jspa?threadID=47166" title="http://opensolaris.org/jive/thread.jspa?threadID=47166" target="_blank">http://opensolaris.org/jive/thread.jspa?&#8230;</a></p>
<p>Summary, don&#8217;t delete it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2009/06/02/the-role-of-loghost-entry-in-etcinethosts-for-opensolaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Enabling ZeroConf / Bonjour DNS resolution in OpenSolaris</title>
		<link>http://blogs.law.harvard.edu/hoanga/2009/05/06/enabling-zeroconf-bonjour-dns-resolution-in-opensolaris/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2009/05/06/enabling-zeroconf-bonjour-dns-resolution-in-opensolaris/#comments</comments>
		<pubDate>Wed, 06 May 2009 07:20:09 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[fixes tech opensolaris sysadmin]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=724</guid>
		<description><![CDATA[On small LAN networks that do not have an internal DNS server.  There is a nice technology called ZeroConf that uses multicast to enable name lookup resolution.  It has been baked into OS X for quite some time now.  Linux and other UNIX flavors have been picking this up as well.  [...]]]></description>
			<content:encoded><![CDATA[<p>On small LAN networks that do not have an internal DNS server.  There is a nice technology called ZeroConf that uses multicast to enable name lookup resolution.  It has been baked into OS X for quite some time now.  Linux and other UNIX flavors have been picking this up as well.  OpenSolaris also includes this but enabling it is not on by default (At least with 2008.11).  Here is a quick howto.</p>
<p>Edit the file /etc/nsswitch.conf and make sure that the line that begins with</p>
<blockquote><p>
hosts:
</p></blockquote>
<p>contains the following</p>
<blockquote><p>
hosts:       files dns mdns
</p></blockquote>
<p>Then you should be able to ping any machine that uses Bonjour.  For example, if you have a Mac that is named mycoolmac then you should be able to ping mycoolmac.local</p>
<h4>References</h4>
<ul>
<li>
<a href="http://opensolaris.org/os/community/on/flag-days/pages/2007082001/">Heads-up Multicast DNS and discovery</a>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2009/05/06/enabling-zeroconf-bonjour-dns-resolution-in-opensolaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Getting X working again after swapping hardware on Open Solaris nv100</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/12/07/getting-x-working-again-after-swapping-hardware-on-open-solaris-nv100/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/12/07/getting-x-working-again-after-swapping-hardware-on-open-solaris-nv100/#comments</comments>
		<pubDate>Sun, 07 Dec 2008 15:18:50 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[fixes]]></category>
		<category><![CDATA[gripe]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=705</guid>
		<description><![CDATA[After having dain bramaged myself for years with Linux usage.  I had gotten spoiled into believing an OS should make it simple to do the following:
1. Shutdown computer
2. Swap around hardware components
3. Restart
4. Life is good
However any techie should tell you this is a pipe dream on Windows.  Mac users probably have no [...]]]></description>
			<content:encoded><![CDATA[<p>After having dain bramaged myself for years with Linux usage.  I had gotten spoiled into believing an OS should make it simple to do the following:</p>
<p>1. Shutdown computer<br />
2. Swap around hardware components<br />
3. Restart<br />
4. Life is good</p>
<p>However any techie should tell you this is a pipe dream on Windows.  Mac users probably have no clue since they never change hardware components and just buy new Macs to solve their problems.  Which leaves the lucky OSS *nix variants to try stunts like this.</p>
<p>Being the stubborn person I am,  I attempted this with OpenSolaris by swapping out my motherboard.  I wanted to do this in order to take advantage of the E7400 Core 2 Duo that I bought awhile back.  Things almost worked however on reboot I was given the dreaded console login screen with a useless keyboard.  The following as far as I know don´t work&#8230;</p>
<p>1. CTRL-ALT-BACKSPACE<br />
2. CTRL-ALT-Fn<br />
3. CTRL-ALT-DEL</p>
<p>Your best bet is to ssh somehow and try to look for clues.  Here is what I did&#8230;</p>
<p>1. Swap motherboard and stare at dark screen<br />
2. Find out how to <a href="http://mail.opensolaris.org/pipermail/opensolaris-discuss/2007-September/034748.html">boot into single user mode</a> and make sure the kernel isn&#8217;t PO-ed or something and find my IP address<br />
3. Move away the X11 configuration that I configured  (dual-display) and try rebooting<br />
4. Reboot and find out it isn&#8217;t working<br />
5. ssh in and realize it still isn&#8217;t working.   Move the old dual display X11 config back to /etc/X11/xorg.conf<br />
6. Try restarting gdm with svcadm restart gdm and watch it fail<br />
7. Scritch head some more<br />
8. Try starting X from the SSH session and whoah it works<br />
9. Restart gdm (svcadm restart gdm) and now I get a login screen<br />
10. Realize that I disconnected the left monitor (VGA) to help debug and want it back<br />
11. Logout and log back in.  I now have dual screens and a working Solaris install again!</p>
<p>References</p>
<ul>
<li><a href="http://mail.opensolaris.org/pipermail/opensolaris-discuss/2007-September/034748.html">How to boot into Single User Mode for OpenSolaris</a></li>
<li>
<li><a href="//opensolaris.org/jive/thread.jspa?messageID=234143¨">Finding device faults with Fault Manager</a></li>
<li><a href="//opensolaris.org/jive/thread.jspa?messageID=311678¨">Debugging problems with nvidia driver on bootup</a></li>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/12/07/getting-x-working-again-after-swapping-hardware-on-open-solaris-nv100/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>Understanding what an L2ARC is</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/11/29/understanding-what-an-l2arc-is/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/11/29/understanding-what-an-l2arc-is/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 15:13:41 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=703</guid>
		<description><![CDATA[I&#8217;ve been silently scanning some Solaris blogs and skimming some of the appropriate websites for documentation on some of the more interesting features of Solaris for awhile now.  One thing that requires time to adjust to is the number of acronyms that the Solaris community has to describe their technologies.  One of these [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been silently scanning some Solaris blogs and skimming some of the appropriate websites for documentation on some of the more interesting features of Solaris for awhile now.  One thing that requires time to adjust to is the number of acronyms that the Solaris community has to describe their technologies.  One of these is called <a href="//blogs.sun.com/brendan/entry/test¨">L2ARC</a>.</p>
<p>At first I thought it was some hardware device however after a bit more searching it turns out that it is part of the <a href="//en.wikipedia.org/wiki/ZFS¨">ZFS</a> technology suite.  L2ARC stands for second level ARC where ARC is a read cache system for ZFS that uses a system´s main memory for holding the cache.  While ARC uses the hardware´s main memory, L2ARC is designed to take advantage of faster I/O media such as SSD devices to provide faster read throughput than what a typical hard drive can offer.</p>
<p>Brendan Gregg has an <a href="//blogs.sun.com/brendan/entry/test¨">excellent overview</a> explaining what the L2ARC is and some of the benefits it can give in accelerating random reads.</p>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/11/29/understanding-what-an-l2arc-is/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
		<item>
		<title>I can&#8217;t get no satisfying manpages</title>
		<link>http://blogs.law.harvard.edu/hoanga/2008/11/29/i-cant-get-no-satisfying-manpages/</link>
		<comments>http://blogs.law.harvard.edu/hoanga/2008/11/29/i-cant-get-no-satisfying-manpages/#comments</comments>
		<pubDate>Sat, 29 Nov 2008 14:29:26 +0000</pubDate>
		<dc:creator>hoanga</dc:creator>
				<category><![CDATA[gripe]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[stupid]]></category>

		<guid isPermaLink="false">http://blogs.law.harvard.edu/hoanga/?p=701</guid>
		<description><![CDATA[It seems that with most default UNIX-like installations outside of FreeBSD just include craptastic manpages.
This really puts a dent in RTFM.  In Linux-land this has been a serious PITA for years (Yes, I know how to hunt around for the packages to install the manpages in Redhat-ish and Debian lang but it is still [...]]]></description>
			<content:encoded><![CDATA[<p>It seems that with most default UNIX-like installations outside of FreeBSD just include craptastic manpages.</p>
<p>This really puts a dent in RTFM.  In Linux-land this has been a serious PITA for years (Yes, I know how to hunt around for the packages to install the manpages in Redhat-ish and Debian lang but it is still an irritation).  It seems my forays with OpenSolaris mirror the fun of Linux.  Ah well..</p>
<pre>
$  man ps
Reformatting page.  Please Wait... done

Miscellaneous                                          missing(x)

     missing - Missing Manual Page

DESCRIPTION
     Unfortunately, this OpenSolaris Developer Preview  does  not
     include  the  manual  page you are looking for.  We're sorry
     and hope to improve upon this situation in future releases.

     Online versions  of  many  manual  pages  are  available  at
    &nbsp;<a href="http://docs.sun.com/app/docs/coll/40.17" title="http://docs.sun.com/app/docs/coll/40.17" target="_blank">http://docs.sun.com/app/docs/coll/40.17</a>.

SunOS 5.11            Last change: 07/10/25
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blogs.law.harvard.edu/hoanga/2008/11/29/i-cant-get-no-satisfying-manpages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license>
	</item>
	</channel>
</rss>
