<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>North Star Labs</title>
	
	<link>http://northstarlabs.net</link>
	<description>System Administration hacks and howto articles.</description>
	<lastBuildDate>Thu, 03 Jun 2010 21:52:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/northstarlabs/bWiE" /><feedburner:info uri="northstarlabs/bwie" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>Puppet Camp Europe 2010 Slides</title>
		<link>http://feedproxy.google.com/~r/northstarlabs/bWiE/~3/9k0CSU_4KjY/</link>
		<comments>http://northstarlabs.net/2010/05/30/puppet-camp-europe-2010/#comments</comments>
		<pubDate>Sun, 30 May 2010 05:00:11 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[puppet]]></category>
		<category><![CDATA[puppetcamp]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=229</guid>
		<description><![CDATA[
Puppet Camp Europe 2010 has wrapped up and the slides from my presentation, Auditing Change Management Policies with Puppet and Splunk are available online at: http://bit.ly/puppetsplunkslides.
The code used in the demonstration is also available online on github at: http://github.com/jeffmccune/puppet-demotools/.
Please contact me on Twitter or via email with any questions.  I&#8217;m traveling overseas at the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://northstarlabs.net/blog/wp-content/uploads/2010/05/puppetcamp-logo.png"><img src="http://northstarlabs.net/blog/wp-content/uploads/2010/05/puppetcamp-logo.png" alt="PuppetCamp Log" title="PuppetCamp Logo" width="150" height="150" class="alignright size-full wp-image-230" /></a><br />
Puppet Camp Europe 2010 has wrapped up and the slides from my presentation, <a href="http://puppetcamp.org/europe-2010-ghent/schedule-and-speakers/#speaker5">Auditing Change Management Policies with Puppet and Splunk</a> are available online at: <a href="http://bit.ly/puppetsplunkslides">http://bit.ly/puppetsplunkslides</a>.</p>
<p>The code used in the demonstration is also available online on github at: <a href="http://github.com/jeffmccune/puppet-demotools/">http://github.com/jeffmccune/puppet-demotools/</a>.</p>
<p>Please contact me on Twitter or via email with any questions.  I&#8217;m traveling overseas at the moment and those are the best methods to reach me.</p>
<p>The conference was great fun and I enjoyed meeting many people doing interesting things with Puppet.</p>
<img src="http://feeds.feedburner.com/~r/northstarlabs/bWiE/~4/9k0CSU_4KjY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2010/05/30/puppet-camp-europe-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://northstarlabs.net/2010/05/30/puppet-camp-europe-2010/</feedburner:origLink></item>
		<item>
		<title>I’ve joined Puppet Labs</title>
		<link>http://feedproxy.google.com/~r/northstarlabs/bWiE/~3/4BImZB9Qp44/</link>
		<comments>http://northstarlabs.net/2010/05/17/joined-puppet-labs/#comments</comments>
		<pubDate>Mon, 17 May 2010 18:00:46 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[career]]></category>
		<category><![CDATA[puppet]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=219</guid>
		<description><![CDATA[In April I resigned from my position as SaaS Manager at Netsmart Technologies and accepted an offer to join Puppet Labs in Portland Oregon.  The decision was not easy, Netsmart has been a great company to work for with interesting and wonderful people, however, the prospect of joining a start-up with an open source [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://northstarlabs.net/blog/wp-content/uploads/2010/05/Puppet_Labs.png"><img class="alignright size-thumbnail wp-image-220" title="Puppet Labs" src="http://northstarlabs.net/blog/wp-content/uploads/2010/05/Puppet_Labs-150x150.png" alt="Puppet Labs Logo" width="150" height="150" /></a>In April I resigned from my position as SaaS Manager at <a href="http://www.ntst.com/">Netsmart Technologies</a> and accepted an offer to join <a href="http://www.puppetlabs.com/">Puppet Labs</a> in Portland Oregon.  The decision was not easy, Netsmart has been a great company to work for with interesting and wonderful people, however, the prospect of joining a start-up with an open source product I believe is changing the business of information technology for the better is not something I could pass up.</p>
<p>I started my new job at the beginning of May and have begun traveling the country providing training and consulting services to companies using puppet to manage their systems.  I&#8217;m excited about the travel and looking forward to meeting people who use puppet in interesting and creative ways to solve complex problems.</p>
<p>In June I&#8217;ll be packing up my place in Columbus Ohio and moving across the country to my new place in Portland Oregon.  Never having lived outside of Ohio, I&#8217;m really looking forward to this adventure and new phase of my life.</p>
<p>I&#8217;m hopping to attend technical conferences in the future as well, and will be speaking about a project I implemented at Netsmart related to the auditing of change control procedures through the integration of puppet, spunk and the git version control software at <a href="http://puppetcamp.org/europe-2010-ghent/">Puppetcamp Europe</a> in Ghent this June.  Drop me a line if you&#8217;ll be in the area or attending the conference.  It&#8217;s going to be a really interesting conference and presentation.</p>
<p>As I travel, I&#8217;d love to meet people on the road, so please follow me on Twitter at <a href="http://twitter.com/0xEFF">0xEFF</a> and let me know if ill be in your area.  Please let me know if there&#8217;s any way I might be able to help you solve a problem you may be facing as well.</p>
<img src="http://feeds.feedburner.com/~r/northstarlabs/bWiE/~4/4BImZB9Qp44" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2010/05/17/joined-puppet-labs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://northstarlabs.net/2010/05/17/joined-puppet-labs/</feedburner:origLink></item>
		<item>
		<title>OpenSolaris milestone/xvm grub dom0_mem problem</title>
		<link>http://feedproxy.google.com/~r/northstarlabs/bWiE/~3/Y3thQxi-DKw/</link>
		<comments>http://northstarlabs.net/2010/02/28/opensolaris-milestonexvm-grub-dom0_mem-problem/#comments</comments>
		<pubDate>Sun, 28 Feb 2010 23:53:10 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[opensolaris]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[xvm]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=214</guid>
		<description><![CDATA[I&#8217;ve recently been struggling to track down a problem with my OpenSolaris xVM system.  I&#8217;m running xvm in OpenSolaris b133.  The issue is that my manual configuration of dom0_mem in /rpool/boot/grub/menu.lst seems to constantly be overwritten upon reboot.  This is a problem since I need dom0 to be clamped down to prevent [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://northstarlabs.net/blog/wp-content/uploads/2009/04/167px-opensolaris_logosvg1.png"><img src="http://northstarlabs.net/blog/wp-content/uploads/2009/04/167px-opensolaris_logosvg1.png" alt="" title="OpenSolaris logo" width="167" height="158" class="alignright size-full wp-image-168" /></a>I&#8217;ve recently been struggling to track down a problem with my OpenSolaris xVM system.  I&#8217;m running xvm in OpenSolaris b133.  The issue is that my manual configuration of dom0_mem in /rpool/boot/grub/menu.lst seems to constantly be overwritten upon reboot.  This is a problem since I need dom0 to be clamped down to prevent Xen&#8217;s balloon feature from fighting with the ZFS arc.  In addition to this problem, there are bugs in the b132 and b133 of OpenSolaris which require the config/dom0-min-mem SMF property to be set to match dom0_mem.</p>
<p>I&#8217;ve also been running into the dom0-min-mem issues documented at <a href="http://southbrain.com/south/2009/11/sun-xvm-342-dom0-min-mem.html">My South &#8211; Sun xVM 3.4.2 available, dom0_min_mem</a>.  Pascal also mentions setting the dom0-min-mem propery, but doesn&#8217;t appear to be running into the issue I have with b132 and b133 where the property is consistently changes by the xvm-milestone service method script.</p>
<p>The problem is caused by the SMF xvm milestone ( svc:/milestone/xvm) constantly re-writing these properties and the menu.lst file.  The solution is to disable the xvm milestone and re-enable all of the xvm services manually.  This will allow you to make manual changes to the menu.lst file without the xvm milestone interfering with you.</p>
<p>OpenSolaris introduced the xvm milestone in b126 around October of 2009.  Please see <a href="http://www.opensolaris.org/jive/thread.jspa?threadID=114957&#038;tstart=0#424030">[xen-discuss] FYI: enable/disable the xVM hypervisor</a>.</p>
<p>Here is the recipe to fix the problem.  First, make a backup copy of your menu.lst file, then disable the xvm milestone, enable the other xvm SMF services, and finally restore your menu.lst file.  We do this because disabling the xvm milestone disables all of xvm, where we really just want to prevent /lib/svc/method/xvm-milestone from executing.</p>
<p>This assumes you already have xVM enabled through the use of svcadn enable milestone/xvm.<br />
<code><br />
cd /rpool/boot/grub<br />
pfexec cp -p menu.lst menu.lst.milestone-xvm.enabled<br />
pfexec svcadm disable milestone/xvm<br />
pfexec svcadm enable -r svc:/system/xvm/domains:default<br />
pfexec cp -p menu.lst menu.lst.milestone-xvm.disabled<br />
pfexec cp -p menu.lst.milestone-xvm.enabled menu.lst<br />
</code></p>
<p>Before rebooting, ensure the dom0_mem setting is something reasonable.  I find 1.5GB to be a good balance.<br />
<code><br />
title os-133-xvm1<br />
findroot (pool_rpool,0,a)<br />
bootfs rpool/ROOT/os-133-xvm1<br />
kernel$ /boot/$ISADIR/xen.gz console=vga dom0_mem=1536M dom0_vcpus_pin=false watchdog=false<br />
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix -B $ZFS-BOOTFS<br />
module$ /platform/i86pc/$ISADIR/boot_archive<br />
</code></p>
<p>Finally, ensure SMF properties match the dom0_mem value:<br />
<code><br />
svccfg -s svc:/milestone/xvm listprop hypervisor/dom0_mem<br />
svccfg -s xend listprop config/dom0-min-mem<br />
</code></p>
<p>If they don&#8217;t match, they may be set using:<br />
<code><br />
pfexec svccfg -s svc:/system/xvm/xend setprop config/dom0-min-mem = 1536<br />
pfexec /usr/sbin/svccfg -s svc:/milestone/xvm setprop hypervisor/dom0_mem = 1536<br />
</code></p>
<p>I plan to diagnose just why the xvm-milestone service method script is misbehaving so much and file the appropriate bug reports.  If anyone has any suggestions or ideas, please let me know.</p>
<img src="http://feeds.feedburner.com/~r/northstarlabs/bWiE/~4/Y3thQxi-DKw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2010/02/28/opensolaris-milestonexvm-grub-dom0_mem-problem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://northstarlabs.net/2010/02/28/opensolaris-milestonexvm-grub-dom0_mem-problem/</feedburner:origLink></item>
		<item>
		<title>Tomato and AT&amp;T U-Verse Disconnects</title>
		<link>http://feedproxy.google.com/~r/northstarlabs/bWiE/~3/31YARJpeN4I/</link>
		<comments>http://northstarlabs.net/2010/02/17/tomato-and-att-u-verse-disconnects/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 21:39:31 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[dhcp]]></category>
		<category><![CDATA[iptables]]></category>
		<category><![CDATA[netfilter]]></category>
		<category><![CDATA[tomato]]></category>
		<category><![CDATA[uverse]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=208</guid>
		<description><![CDATA[I recently ran into an issue with my home network setup where my Linksys WRT54G router running Tomato 1.27 was disconnecting my long-running active TCP connections every 10 minutes or so.  After further investigation, this is known to be a common issue resulting from Tomato&#8217;s dhcp client performing a unicast DHCP renewal which the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://northstarlabs.net/blog/wp-content/uploads/2008/10/crystal-tux-rt_thumb.png"><img src="http://northstarlabs.net/blog/wp-content/uploads/2008/10/crystal-tux-rt_thumb.png" alt="" title="Tux" width="100" height="121" class="alignright size-full wp-image-70" /></a>I recently ran into an issue with my home network setup where my <a href="http://en.wikipedia.org/wiki/Linksys_WRT54G_series">Linksys WRT54G</a> router running <a href="http://www.polarcloud.com/firmware">Tomato</a> 1.27 was disconnecting my long-running active TCP connections every 10 minutes or so.  After further investigation, this is known to be a common issue resulting from Tomato&#8217;s dhcp client performing a unicast DHCP renewal which the firewall blocks or misroutes.</p>
<p>A number of people have published similar reports, but none of the suggested solutions appeared to work reliably for me, so I decided to diagnose, troubleshoot and resolve the issue myself.  Here&#8217;s how I solved the problem.  The notes I gathered while working on this are also located at <a href="http://docs.google.com/View?id=dgmh95gf_142f58q2cg5">2WIRE &#038; Tomato &#8211; Google Docs</a>.</p>
<p>If you&#8217;d like to stop reading and skip right to the pay off, simply add the following two lines to the firewall script which is located in the web based user interface under administration, scripts, in the firewall tab:<br />
<code><br />
iptables -t nat -I PREROUTING -p udp -i vlan1 --dport 68 --sport 67 -j ACCEPT<br />
iptables -I INPUT -p udp -i vlan1 --dport 68 --sport 67 -j ACCEPT<br />
</code></p>
<p>These firewall rules allow DHCP traffic to and from the Linksys router, regardless if the traffic is broadcast or unicast.  Please let me know if these rules are not optimal or could be improved.</p>
<p>Here are some references to other reports of this issue:</p>
<ul>
<li><a href="http://www.genmay.com/showthread.php?t=822727">ATT Uverse + Tomato firmware = connection timeouts &#038; reset every 10min (Fix inside)</a></li>
<li><a href="http://www.dslreports.com/forum/r23633546-Internet-2wire-in-dmz-plus-mode-downloadsstreaming-interrupt">2wire in dmz plus mode, downloads/streaming interrupt</a></li>
</ul>
<p>My troubleshooting process follows.</p>
<p>I can see in the logs that udhcpc attempts a renewal right up until the lease expires:<br />
<code><br />
Feb 17 15:14:26 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:16:56 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:18:11 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:18:48 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:19:06 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:19:15 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:19:19 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:19:21 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:19:22 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:19:22 tomato daemon.info udhcpc[285]: Lease lost, entering init state<br />
Feb 17 15:19:22 tomato user.info kernel: vlan1: dev_set_allmulti(master, 1)<br />
Feb 17 15:19:22 tomato user.info kernel: vlan1: dev_set_promiscuity(master, -1)<br />
Feb 17 15:19:22 tomato user.info kernel: device vlan1 left promiscuous mode<br />
Feb 17 15:19:22 tomato daemon.info udhcpc[285]: Sending discover...<br />
Feb 17 15:19:22 tomato daemon.info udhcpc[285]: Sending select for 99.29.172.159...<br />
Feb 17 15:19:22 tomato daemon.info udhcpc[285]: Lease of 99.29.172.159 obtained, lease time 600<br />
Feb 17 15:19:22 tomato user.info kernel: vlan1: dev_set_allmulti(master, -1)<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[12612]: exiting on receipt of SIGTERM<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: started, version 2.51 cachesize 150<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: compile time options: no-IPv6 GNU-getopt no-RTC no-DBus no-I18N DHCP no-scripts no-TFTP<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq-dhcp[13007]: DHCP, IP range 192.168.3.100 -- 192.168.3.149, lease time 1d<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: reading /etc/resolv.dnsmasq<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: using nameserver 192.168.4.254#53<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: using nameserver 8.8.4.4#53<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: using nameserver 8.8.8.8#53<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: read /etc/hosts - 0 addresses<br />
Feb 17 15:19:22 tomato daemon.info dnsmasq[13007]: read /etc/hosts.dnsmasq - 16 addresses<br />
Feb 17 15:19:25 tomato daemon.err miniupnpd[12649]: recv (state0): Connection reset by peer<br />
Feb 17 15:19:27 tomato daemon.notice miniupnpd[12649]: received signal 15, good-bye<br />
Feb 17 15:19:27 tomato daemon.notice miniupnpd[13043]: HTTP listening on port 5000<br />
Feb 17 15:19:27 tomato daemon.notice miniupnpd[13043]: Listening for NAT-PMP traffic on port 5351<br />
Feb 17 15:19:27 tomato user.info kernel: device br0 left promiscuous mode<br />
Feb 17 15:19:27 tomato user.info kernel: vlan1: dev_set_allmulti(master, -1)<br />
Feb 17 15:19:27 tomato user.info kernel: vlan1: del 01:00:5e:00:00:02 mcast address from master interface<br />
</code></p>
<p>Working with the solution mentioned in the forums, I added a firewall rule to allow DHCP traffic into the router itself.  This is in the INPUT chain.  This worked well up until I enabled DMZ mode for my Xbox 360.  Once I enabled DMZ mode, the DHCP renewal issue cropped back up and I kept getting dropped.  Luckily, I have experience with netfilter and iptables so I know that DMZ is probably implemented in tomato as a catch-all PREROUTING rule to perform NAT on all unknown connections to a specified address.  I also know the PREROUTING chain is processed before the INPUT chain, so any catch-all rule there would trump my fix to allow DHCP in the INPUT chain.</p>
<p>This can be verified with <a href="http://www.tcpdump.org/">tcpdump</a> and <a href="http://www.wireshark.org/">wireshark</a>.  Luckily, there are pre-compied versions of tcpdump for the mips architecture located at <a href="http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/">http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/</a>.</p>
<p>In order to get the tcpdump binary onto the router, I had to unpack the ipkg file:<br />
<code><br />
wget http://ipkg.nslu2-linux.org/feeds/unslung/wl500g/tcpdump_3.9.7-1_mipsel.ipk<br />
gzip -dc <tcpdump_3.9.7-1_mipsel.ipk| tar xvf -<br />
tar xvzf data.tar.gz<br />
scp opt/bin/tcpdump fw:/tmp<br />
</code></p>
<p>Finally, capturing the data is easy and since we're dealing with DHCP traffic, there's not much worry about filling up the small /tmp filesystem on the router:<br />
<code><br />
/tmp/tcpdump -w /tmp/renew.cap -v -i vlan1 -s 1500 port 67 or port 68<br />
</code></p>
<p>I copied the cap files back to my desktop and fired them up in wireshark.  Not too surprising, it's clear as day the request packets are making it out, but the acknowledgement packts coming back from the DHCP server aren't making it to udhcpc.</p>
<p><a href="http://northstarlabs.net/blog/wp-content/uploads/2010/02/TomatoCAP_Bad.png"><img src="http://northstarlabs.net/blog/wp-content/uploads/2010/02/TomatoCAP_Bad.png" alt="Screen capture of wireshark displaying repeated attempts to renew the DHCP lease" title="Tomato DHCP Wireshark bad" width="994" height="923" class="aligncenter size-full wp-image-209" /></a></p>
<p>Adding the explicit rule to the PREROUTING and INPUT tables, the conversation looks much less confusing:</p>
<p><a href="http://northstarlabs.net/blog/wp-content/uploads/2010/02/TomatoCAP_Good.png"><img src="http://northstarlabs.net/blog/wp-content/uploads/2010/02/TomatoCAP_Good.png" alt="" title="Tomato DHCP Wireshark good" width="994" height="923" class="aligncenter size-full wp-image-210" /></a></p>
<p>The logs tell a similar tale.  Note the lack of the full re-initialization of dnsmasq, upnpd, and the firewall script itself.<br />
<code><br />
Feb 17 15:29:31 tomato daemon.info udhcpc[285]: Sending renew...<br />
Feb 17 15:29:31 tomato daemon.info udhcpc[285]: Lease of 99.29.172.159 obtained, lease time 600<br />
</code></p>
<img src="http://feeds.feedburner.com/~r/northstarlabs/bWiE/~4/31YARJpeN4I" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2010/02/17/tomato-and-att-u-verse-disconnects/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://northstarlabs.net/2010/02/17/tomato-and-att-u-verse-disconnects/</feedburner:origLink></item>
		<item>
		<title>Resize the ZFS Root Pool</title>
		<link>http://feedproxy.google.com/~r/northstarlabs/bWiE/~3/6XslGUvG8zQ/</link>
		<comments>http://northstarlabs.net/2009/06/18/resize-the-zfs-root-pool/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 17:00:47 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=198</guid>
		<description><![CDATA[I originally installed OpenSolaris 2008.11 on my home media server, and 2009.06 has some features I&#8217;d like to take advantage of.  Running a pkg image-update, I ran my root pool out of space since it&#8217;s located on a relatively small compact flash card.
I decided to grow the root pool by using an available external [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://northstarlabs.net/blog/wp-content/uploads/2009/04/167px-opensolaris_logosvg1.png" alt="OpenSolaris logo" title="OpenSolaris logo" width="167" height="158" class="alignright size-full wp-image-168" />I originally installed <a href="http://opensolaris.org/os/">OpenSolaris</a> 2008.11 on my home media server, and 2009.06 has some features I&#8217;d like to take advantage of.  Running a pkg image-update, I ran my root pool out of space since it&#8217;s located on a relatively small compact flash card.</p>
<p>I decided to grow the root pool by using an available external disk I have.  The process involves attaching the new, larger disk to the root pool as a mirror, waiting for the resilver process to complete, installing the boot loader onto the new disk, then detaching the old, small device from the root pool.  This information is documented at sun.com in the document <a href="http://docs.sun.com/app/docs/doc/819-5461/ghzvx?a=view">How to Replace a Disk in the ZFS Root Pool</a>.</p>
<p>Attempting to attach the new device to the pool with zpool attach, I ran in the error message <strong><code>"cannot label 'c3t0d0': EFI labeled devices are not supported on root pools."</code></strong> I tried wiping the EFI label, but kept running into the same error.  I noticed other people talking about this issue; <a href="http://groups.google.com/group/comp.unix.solaris/browse_thread/thread/f010e5a60efaf77b"><br />
Removing EFI (format -e not working?)</a> and <a href="http://osdir.com/ml/os.solaris.opensolaris.help/2007-08/msg00173.html"><br />
Please help need to remove EFI label: msg#00173</a></p>
<p>My problem was that I was not properly creating the root partition on the disk with an SMI label.  I was properly using format -e, then executing &#8220;fdisk&#8221;, creating the VTOC on the entire disk, but I forgot the step where once the VTOC is created, you need to create partition 0, which will be used for the zpool vdev.</p>
<p>If you run into this error, make sure you use the &#8220;partition&#8221; option in fdisk -e, which will allow you to then define slice 0.  Label the slice &#8220;root&#8221; and give it as much space as you&#8217;d like.  Make sure it does not overlap with the boot slice which is automatically created when the VTOC is created.</p>
<p>Once slice 0 is present, use c1t0d0s0 rather than c1t0d0 when you attach the new disk to the root pool.  For example:</p>
<p>Correct:<br />
<code>zpool attach rpool c4t0d0s0 c3t0d0s0</code><br />
Incorrect:<br />
<code>zpool attach rpool c4t0d0s0 c3t0d0</code><br />
If you receive an error about overlapping partitions, just use zpool attach -f to force the attach.</p>
<p>Once the device is in the pool and re-silvering, use  <code>installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c3t0d0s0</code> to install the boot block.</p>
<p>After testing the new boot device, use <code>zpool detatch rpool c4t0d0s0</code> to remove the old device from the pool and complete the resize process.</p>
<p>Here&#8217;s my original partition layout:</p>
<pre>
Current partition table (original):
Total disk cylinders available: 3820 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders        Size            Blocks
  0       root    wm       1 - 3818        7.46GB    (3818/0/0) 15638528
  1 unassigned    wm       0               0         (0/0/0)           0
  2     backup    wu       0 - 3819        7.46GB    (3820/0/0) 15646720
  3 unassigned    wm       0               0         (0/0/0)           0
  4 unassigned    wm       0               0         (0/0/0)           0
  5 unassigned    wm       0               0         (0/0/0)           0
  6 unassigned    wm       0               0         (0/0/0)           0
  7 unassigned    wm       0               0         (0/0/0)           0
  8       boot    wu       0 -    0        2.00MB    (1/0/0)        4096
  9 unassigned    wm       0               0         (0/0/0)           0
</pre>
<p>Here&#8217;s my new, larger disk layout:</p>
<pre>
Current partition table (original):
Total disk cylinders available: 60797 + 2 (reserved cylinders)

Part      Tag    Flag     Cylinders         Size            Blocks
  0       boot    wm       1 - 60700      929.97GB    (60700/0/0) 1950291000
  1 unassigned    wm       0                0         (0/0/0)              0
  2     backup    wu       0 - 60796      931.46GB    (60797/0/0) 1953407610
  3 unassigned    wm       0                0         (0/0/0)              0
  4 unassigned    wm       0                0         (0/0/0)              0
  5 unassigned    wm       0                0         (0/0/0)              0
  6 unassigned    wm       0                0         (0/0/0)              0
  7 unassigned    wm       0                0         (0/0/0)              0
  8       boot    wu       0 -     0       15.69MB    (1/0/0)          32130
  9 unassigned    wm       0                0         (0/0/0)              0
</pre>
<p>After detaching the original, small disk from the mirror, the root pool expands to the size of the remaining vdev:</p>
<pre>
jmccune@rain:~$ zpool list rpool
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
rpool   930G  5.57G   924G     0%  ONLINE  -
</pre>
<img src="http://feeds.feedburner.com/~r/northstarlabs/bWiE/~4/6XslGUvG8zQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2009/06/18/resize-the-zfs-root-pool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://northstarlabs.net/2009/06/18/resize-the-zfs-root-pool/</feedburner:origLink></item>
		<item>
		<title>Podcasting the unix nerd way or Peapod for the win</title>
		<link>http://feedproxy.google.com/~r/northstarlabs/bWiE/~3/82b0JJs73Xs/</link>
		<comments>http://northstarlabs.net/2009/05/28/podcasting-the-unix-nerd-way-or-peapod-for-the-win/#comments</comments>
		<pubDate>Thu, 28 May 2009 13:00:25 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Disruptive Tech]]></category>
		<category><![CDATA[Media]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Solution]]></category>
		<category><![CDATA[Automation]]></category>
		<category><![CDATA[opensolaris]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=180</guid>
		<description><![CDATA[
I cooked dinner for myself today and sat down at the table looking forward to streaming The Daily Show or The Colbert Report on Hulu since there&#8217;s no way I&#8217;m paying $65 a month for cable TV.  As it turns out, there haven&#8217;t been any new episodes in awhile, and I like my fake [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://northstarlabs.net/blog/wp-content/uploads/2008/10/terminal.png" alt="Terminal" title="Terminal" width="64" height="64" class="size-full wp-image-69" /><br />
I cooked dinner for myself today and sat down at the table looking forward to streaming <a href="http://www.thedailyshow.com/">The Daily Show</a> or <a href="http://www.colbertnation.com/">The Colbert Report</a> on <a href="http://www.hulu.com/">Hulu</a> since there&#8217;s no way I&#8217;m paying $65 a month for cable TV.  As it turns out, there haven&#8217;t been any new episodes in awhile, and I like my fake news fresh off the wire, so I decided to catch up on my other fake news addiction; aggregated blog rss feeds.</p>
<p>I came across the <a href="http://www.ted.com/">TED</a> talk for today, which is Michell Obama.  Great speech by the way, check it out at: <a href="http://www.ted.com/talks/michelle_obama.html">http://www.ted.com/talks/michelle_obama.html</a>.  The streaming video quality left something to be desired, so I looked around and found the HD podcast URL at <a href="http://www.podcasters.tv/podcast/77862/tedtalks_hd_.html">podcasters.tv</a>.</p>
<p>This works well with iTunes, and <a href="http://www.nullriver.com/products/medialink">MediaLink</a> is able to copy the movie file from my MacBook pro, but for some reason streaming the video usually quits part way through playback with an obscure error code.</p>
<p>I have my OpenSolaris, Intel Atom based file server running on a gigabit network connected up to the Playstation 3 and HDTV using MediaLink, so I decided to look for some unix tool to download the podcast which could easily be run from cron.</p>
<p>After some searching and research into different options, I downloaded <a href="http://www.peapodpy.org.uk/">Peapod</a>, a wonderful python command line application, and gave it a whirl.</p>
<p>To my complete satisfaction, peapod runs from my home directory without requiring any piece of itself being installed into the system.  The only missing dependency I ran into was urlgrabber for python 2.4.  Luckily, I have <a href="http://peak.telecommunity.com/DevCenter/EasyInstall">easy_install</a> installed so it was a simple matter of:<br />
<code>pfexec /usr/bin/easy_install-2.4 urlgrabber</code><br />
Once urlgrabber was installed, setup of the podcast client was a breeze:<br />
<code><br />
jmccune@rain:~$ cd ~/bin<br />
jmccune@rain:~/bin/$ ln -s ../apps/peapod/peapod.py peapod<br />
jmccune@rain:~/bin/$ cd ~<br />
jmccune@rain:~$ peapod<br />
Creating user directory: /home/jmccune/.peapod<br />
Created a default configuration file in :<br />
/home/jmccune/.peapod/peapod.xml<br />
Please edit this file to contain your feeds and options.<br />
</code><br />
I commented out the sample podcast and added TED in HD.<br />
(Note: I found the feed URL by doing a &#8220;Get Info&#8221;, or clicking on the little i next to the podcast title in the podcast section of iTunes.)<br />
<img src="http://northstarlabs.net/blog/wp-content/uploads/2009/05/picture-2.png" alt="Podcast Get Info Image" title="Podcast Get Info Image" width="474" height="61" class="alignright size-full wp-image-181" /></p>
<p>For the title I made it &#8220;TED Talks (HD)&#8221; and for the URL, I used <a href="http://feeds.feedburner.com/TedtalksHD">http://feeds.feedburner.com/TedtalksHD</a>.</p>
<p>Finally, running peapod simply works.<br />
<code><br />
jmccune@rain:~$ peapod<br />
...Spawning thread 0 for feed url http://feeds.feedburner.com/TedtalksHD<br />
Fetching feed for TED Talks (HD)<br />
        Downloading TED Talks (HD) -- http://video.ted.com/talks/podcast/MichelleObama_2009P_480.mp4<br />
        Trackname MichelleObama_2009P_480.mp4<br />
        Savename /export/dozer/podcasts/jmccune/TED Talks (HD)/MichelleObama_2009P_480.mp4<br />
        Mime-type video/mp4<br />
</code></p>
<p>This will be added to cron to run every day a few hours before I get home from work, and <a href="http://mediatomb.cc/">MediaTomb</a> should pickup the new content.</p>
<p>And now to figure out how to manually kick off a MediaTomb scan of the folder once downloading is complete.</p>
<p>Here are some decent feeds I&#8217;ve found so far:<br />
<code><br />
peapod --addnew=http://www.hbo.com/podcasts/billmaher/podcast.xml --title="Bill Maher"<br />
</code></p>
<p>Please post more video feed URL&#8217;s, especially 720p and higher, in the comments if you have some good video podcasts worth watching on my TV.</p>
<img src="http://feeds.feedburner.com/~r/northstarlabs/bWiE/~4/82b0JJs73Xs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2009/05/28/podcasting-the-unix-nerd-way-or-peapod-for-the-win/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://video.ted.com/talks/podcast/MichelleObama_2009P_480.mp4" length="197619597" type="video/mp4" />
		<feedburner:origLink>http://northstarlabs.net/2009/05/28/podcasting-the-unix-nerd-way-or-peapod-for-the-win/</feedburner:origLink></item>
		<item>
		<title>Solaris Development</title>
		<link>http://feedproxy.google.com/~r/northstarlabs/bWiE/~3/pSFVJzFxMgk/</link>
		<comments>http://northstarlabs.net/2009/04/08/solaris-development/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 13:00:27 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[gnu]]></category>
		<category><![CDATA[opensolaris]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=164</guid>
		<description><![CDATA[Using OpenSolaris 2008.11, it appears the most complete way to obtain a full-featured development tool chain is to install the ss-dev and gcc-dev package clusters.
pfexec pkg install gcc-dev ss-dev
References:

Sun Studio Express 11/08 Packages

]]></description>
			<content:encoded><![CDATA[<p><img src="http://northstarlabs.net/blog/wp-content/uploads/2009/04/167px-opensolaris_logosvg1.png" alt="OpenSolaris logo" title="OpenSolaris logo" width="167" height="158" class="alignright size-full wp-image-168" />Using <a href="http://dlc.sun.com/osol/docs/content/2008.11/OSDEV/wits0.html">OpenSolaris 2008.11</a>, it appears the most complete way to obtain a full-featured development tool chain is to install the ss-dev and gcc-dev package clusters.</p>
<p><code>pfexec pkg install gcc-dev ss-dev</code></p>
<p>References:</p>
<ul>
<li><a href="http://dlc.sun.com/osol/docs/content/2008.11/OSDEV/wits2.html#wits4">Sun Studio Express 11/08 Packages</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/northstarlabs/bWiE/~4/pSFVJzFxMgk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2009/04/08/solaris-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://northstarlabs.net/2009/04/08/solaris-development/</feedburner:origLink></item>
		<item>
		<title>PS3 Media Server for Solaris</title>
		<link>http://feedproxy.google.com/~r/northstarlabs/bWiE/~3/GEP_e1W_eDk/</link>
		<comments>http://northstarlabs.net/2009/04/07/ps3-media-server-for-solaris/#comments</comments>
		<pubDate>Tue, 07 Apr 2009 13:00:57 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Media]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[dlna]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[ps3]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=174</guid>
		<description><![CDATA[I spent the better part of the evening attempting to get a reliable, responsive and otherwise unobtrusive DLNA media server running on my new OpenSolaris home file server.  I finally stumbled upon PMS which &#8220;just works&#8221; after using X11 forwarding over ssh once in order to get at the GUI configuration screen.  I [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://northstarlabs.net/blog/wp-content/uploads/2009/04/167px-opensolaris_logosvg1.png" alt="OpenSolaris logo" title="OpenSolaris logo" width="167" height="158" class="alignright size-full wp-image-168" />I spent the better part of the evening attempting to get a reliable, responsive and otherwise unobtrusive DLNA media server running on my new OpenSolaris home file server.  I finally stumbled upon <a href="http://code.google.com/p/ps3mediaserver/">PMS</a> which &#8220;just works&#8221; after using X11 forwarding over ssh once in order to get at the GUI configuration screen.  I went ahead and tried the Linux tarball.  None of the included binaries execute on solaris, but the jar file appears to run great.</p>
<p>Once running, my PS3 sees the media player quickly and easily and streams my MP3&#8217;s nicely.</p>
<p>I&#8217;m planning on cooking up a SMF profile to keep this running as a service and figure out the mplayer calls in order to stream my favorite web streams directly to the PS3.</p>
<p>Other DLNA media servers I tried were <a href="http://coherence.beebits.net/">Coherence</a> (no documentation, didn&#8217;t work out of box), <a href="http://mediatomb.cc/">Mediatomb</a> (needed to hack the source to get it to run on solaris.  When running, rarely showed up in the XMB), <a href="http://fuppes.ulrich-voelkel.de/">fuppes</a> (compile issues).</p>
<img src="http://feeds.feedburner.com/~r/northstarlabs/bWiE/~4/GEP_e1W_eDk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2009/04/07/ps3-media-server-for-solaris/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://northstarlabs.net/2009/04/07/ps3-media-server-for-solaris/</feedburner:origLink></item>
		<item>
		<title>Solaris 10 Root Shell Recovery</title>
		<link>http://feedproxy.google.com/~r/northstarlabs/bWiE/~3/vO49HtiqYBs/</link>
		<comments>http://northstarlabs.net/2009/04/03/solaris-10-root-shell-recovery/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 12:00:58 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=140</guid>
		<description><![CDATA[Contrary to recommendations from seasoned Unix admins, it&#8217;s perfectly acceptable to change the root shell from the bourne shell to something like bash.  The most common reason to leave the root shell alone usually goes something like, &#8220;you need a valid and statically linked shell defined in /etc/passwd to boot into single user mode [...]]]></description>
			<content:encoded><![CDATA[<p><div id="attachment_91" class="wp-caption alignright" style="width: 310px"><img src="http://northstarlabs.net/blog/wp-content/uploads/2008/11/solaris_logo-300x155.png" alt="Sun Solaris" title="Solaris Logo" width="300" height="155" class="size-medium wp-image-91" /><p class="wp-caption-text">Solaris</p></div><br />
Contrary to recommendations from seasoned Unix admins, it&#8217;s perfectly acceptable to change the root shell from the bourne shell to something like bash.  The most common reason to leave the root shell alone usually goes something like, &#8220;you need a valid and statically linked shell defined in /etc/passwd to boot into single user mode if you need to recover your system.&#8221;</p>
<p>There&#8217;s a really nice list of Solaris root shell misconceptions published at <a href="http://www.roble.com/docs/sol_root_shell.html">http://www.roble.com/docs/sol_root_shell.html</a>.</p>
<p>Fortunately for me, this isn&#8217;t the case in Solaris 10.  While setting up a new Solaris 10 system today, I accidentally set root&#8217;s shell to /sbin/bash instead of /usr/bin/bash.  /sbin/bash doesn&#8217;t exist, so I could no longer log into the system.</p>
<p>Luckily, this is a system with a Dell RAC card setup for remote console access.  I logged into the RAC and issued a &#8220;graceful shutdown&#8221; power off command, which Solaris responded to nicely and brought the system entirely down.  Once I powered the system back on, it&#8217;s simply a matter of booting into single user mode by passing the -s flag to the kernel.</p>
<p>Solaris 10 is smart enough to fall back to /sbin/sh if it can&#8217;t invoke the shell defined in /etc/passwd booted into single user mode.  So long as you don&#8217;t horribly mangle /sbin/sh and the libraries it&#8217;s linked to, you&#8217;ll be fine changing the root shell to anything you like.</p>
<p>Here&#8217;s how it went:<br />
<img src="http://northstarlabs.net/blog/wp-content/uploads/2009/04/2009-04-01_1708.png" alt="2009-04-01_1708" title="2009-04-01_1708" width="636" height="328" class="alignleft size-full wp-image-142" /><br />
<img src="http://northstarlabs.net/blog/wp-content/uploads/2009/04/2009-04-01_1709.png" alt="2009-04-01_1709" title="2009-04-01_1709" width="623" height="360" class="alignleft size-full wp-image-143" /><br />
<img src="http://northstarlabs.net/blog/wp-content/uploads/2009/04/2009-04-01_1710.png" alt="2009-04-01_1710" title="2009-04-01_1710" width="642" height="186" class="alignleft size-full wp-image-144" /><br />
<img src="http://northstarlabs.net/blog/wp-content/uploads/2009/04/2009-04-01_1711.png" alt="2009-04-01_1711" title="2009-04-01_1711" width="614" height="361" class="alignleft size-full wp-image-145" /><br />
<img src="http://northstarlabs.net/blog/wp-content/uploads/2009/04/2009-04-01_1714.png" alt="2009-04-01_1714" title="2009-04-01_1714" width="725" height="219" class="alignleft size-full wp-image-141" /></p>
<img src="http://feeds.feedburner.com/~r/northstarlabs/bWiE/~4/vO49HtiqYBs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2009/04/03/solaris-10-root-shell-recovery/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://northstarlabs.net/2009/04/03/solaris-10-root-shell-recovery/</feedburner:origLink></item>
		<item>
		<title>Solaris ZFS Windows Sharing</title>
		<link>http://feedproxy.google.com/~r/northstarlabs/bWiE/~3/eUiHQK266_k/</link>
		<comments>http://northstarlabs.net/2009/04/02/solaris-zfs-windows-sharing/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 17:45:30 +0000</pubDate>
		<dc:creator>jmccune</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[solaris zfs]]></category>

		<guid isPermaLink="false">http://northstarlabs.net/?p=130</guid>
		<description><![CDATA[Today, I setup my new Atom 330 based OpenSolaris 2008.11 file server to share files using windows file sharing.  Windows file sharing uses the SMB/CIFS protocol and is commonly implemented using Samba on Unix.  With OpenSolaris 2008.11 and zfs, however, the SMB/CIFS protocol is implemented in the kernel itself by way of an [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I setup my new Atom 330 based OpenSolaris 2008.11 file server to share files using windows file sharing.  Windows file sharing uses the SMB/CIFS protocol and is commonly implemented using <a href="http://www.samba.org/">Samba</a> on Unix.  With <a href="http://www.opensolaris.org/">OpenSolaris</a> <a href="http://www.opensolaris.org/os/project/indiana/resources/relnotes/200811/x86/">2008.11</a> and zfs, however, the SMB/CIFS protocol is implemented in the kernel itself by way of an SMB module.<br />
<div id="attachment_91" class="wp-caption alignright" style="width: 310px"><img class="size-medium wp-image-91" title="Solaris Logo" src="http://northstarlabs.net/blog/wp-content/uploads/2008/11/solaris_logo-300x155.png" alt="Sun Solaris" width="300" height="155" /><p class="wp-caption-text">Sun Solaris</p></div></p>
<p>Unfortunately, it&#8217;s not quite as simple as executing <code>zfs set sharesmb=on dpool/export/dozer</code>.  The <code>SUNWsmbs</code> and <code>SUNWsmbskr</code> packages need to be installed, the system needs to be rebooted, pam configured to create smb password hashes, passwords reset, and finally the smb SMF service needs to be enabled.</p>
<p>You may need to create new filesystems with the <code>casesensitivity</code> and <code>nbmand</code> zfs properties set correct and copy your data over to these filesystems.</p>
<p>Here is the transcript:<br />
<code><br />
pfexec pkg install SUNWsmbs<br />
pfexec pkg install SUNWsmbskr<br />
pfexec reboot<br />
pfexec svcadm enable -r smb/server<br />
pfexec zfs create -o casesensitivity=mixed -o nbmand=on dpool1/export/dozer<br />
pfexec zfs set sharesmb=on dpool1/export/dozer<br />
pfexec bash -c "echo 'other   password required       pam_smb_passwd.so.1     nowarn' &gt;&gt; /etc/pam.conf"<br />
pfexec passwd jmccune<br />
</code><br />
You must reset your password to generate the new SMB hash value.  All users that need SMB access will need to reset their password in this manner.</p>
<p>You may check the sharing status with sharemgr;<br />
<code><br />
jmccune@rain:/export/dozer/isos$ pfexec sharemgr show -vp<br />
default nfs=()<br />
zfs<br />
zfs/dpool1/export/dozer smb=()<br />
dpool1_export_dozer=/export/dozer<br />
dpool1_export_dozer_documents=/export/dozer/documents<br />
dpool1_export_dozer_isos=/export/dozer/isos<br />
dpool1_export_dozer_movies=/export/dozer/movies<br />
dpool1_export_dozer_music=/export/dozer/music<br />
dpool1_export_dozer_pictures=/export/dozer/pictures<br />
</code></p>
<p>Troubleshooting.<br />
svcadm may speak up about a dependency on the physical network.  This does not appear to be an error.<br />
<code><br />
jmccune@rain:~$ pfexec svcadm enable -r smb/server<br />
svcadm: svc:/milestone/network depends on svc:/network/physical, which has multiple instances.<br />
</code></p>
<p>You may receive an error that sharing failed.  In order to resolve, make sure you&#8217;ve done everything I listed above and rebooted the system.<br />
<code><br />
cannot share 'pool/media': smb add share failed<br />
</code></p>
<p>References</p>
<ul>
<li><a href="http://www.aspdeveloper.net/tiki-index.php?page=SolarisSMBShareSetup">http://www.aspdeveloper.net/tiki-index.php?page=SolarisSMBShareSetup</a></li>
</ul>
<img src="http://feeds.feedburner.com/~r/northstarlabs/bWiE/~4/eUiHQK266_k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://northstarlabs.net/2009/04/02/solaris-zfs-windows-sharing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://northstarlabs.net/2009/04/02/solaris-zfs-windows-sharing/</feedburner:origLink></item>
	</channel>
</rss>
