<?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>a little stupid blog &#187; tech</title>
	<atom:link href="http://alittlestupid.com/category/tech/feed/" rel="self" type="application/rss+xml" />
	<link>http://alittlestupid.com</link>
	<description>join the revolution... be a little stupid</description>
	<lastBuildDate>Thu, 14 Jul 2011 14:27:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Howto: Mount LOFS File System To Running Solaris 10 Zone</title>
		<link>http://alittlestupid.com/2011/05/20/howto-mount-lofs-file-system-to-running-solaris-10-zone/</link>
		<comments>http://alittlestupid.com/2011/05/20/howto-mount-lofs-file-system-to-running-solaris-10-zone/#comments</comments>
		<pubDate>Fri, 20 May 2011 18:05:23 +0000</pubDate>
		<dc:creator>Juan Martinez</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://alittlestupid.com/?p=531</guid>
		<description><![CDATA[How to mount a loopback file system to a running Solaris 10 zone (i.e. container) from the global zone. In the example below, I&#8217;m mounting the the lofs file system as read-only so the Non-global zone cant modify the contents. Assumptions: 1. Global zone name: global 2. Non-global zone name: ngzname 3. Disk you want [...]]]></description>
			<content:encoded><![CDATA[<p>How to mount a loopback file system to a running Solaris 10 zone (i.e. container) from the global zone.  In the example below, I&#8217;m mounting the the lofs file system as read-only so the Non-global zone cant modify the contents.</p>
<p>Assumptions:<br />
1. Global zone name: global<br />
2. Non-global zone name: ngzname<br />
3. Disk you want mounted: c1t1d1s0<br />
4. Non-global zone is up and running</p>
<p>Let&#8217;s get started.</p>
<p>1. Identify the disk you want to mount from the global to the zone.  In this case its <em>c1t1d1s0</em>.</p>
<p>2. Mount the disk as you normally would from the global zone.<br />
    a. Create the mount point from the global zone</p>
<pre class="brush: plain; title: ; notranslate">
        # mkdir /mnt/olddisk
</pre>
<p>    b. Create the mount point for the Non-global zone</p>
<pre class="brush: plain; title: ; notranslate">
        # mkdir /zones/ngzname/root/mnt/olddisk
</pre>
<p>3. Mount the disk to both the global and Non-global zone<br />
     a. For the global</p>
<pre class="brush: plain; title: ; notranslate">
        # mount /dev/dsk/c1t1d1s0 /mnt/olddisk
</pre>
<p>     b. For the Non-global<br />
         <strong>ENSURE ngzone is up and running</strong>.  For me, mounting the file system as read-only was a requirement.  Your mileage may vary.</p>
<pre class="brush: plain; title: ; notranslate">
        # mount -o ro -F lofs /mnt/olddisk /zones/ngzname/root/mnt/olddisk
</pre>
<p>4. Verify mount point is up and running<br />
     a. From global</p>
<pre class="brush: plain; title: ; notranslate">
         # df -h /mnt/olddisk
         # mount | grep /mnt/olddisk
</pre>
<p>     b. Log into Non-global zone</p>
<pre class="brush: plain; title: ; notranslate">
          # df -h /mnt/olddisk
</pre>
<p>The disk should be mount as read only from the global to the Non-global zone as read-only.  Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://alittlestupid.com/2011/05/20/howto-mount-lofs-file-system-to-running-solaris-10-zone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to grow a ZFS volume</title>
		<link>http://alittlestupid.com/2010/10/24/how-to-grow-a-zfs-volume/</link>
		<comments>http://alittlestupid.com/2010/10/24/how-to-grow-a-zfs-volume/#comments</comments>
		<pubDate>Mon, 25 Oct 2010 03:20:09 +0000</pubDate>
		<dc:creator>Juan Martinez</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://alittlestupid.com/?p=518</guid>
		<description><![CDATA[How to grow a ZFS Volume. Assume the following is true: Pool Name: fort Volume Name: vol1 Mount Point: /mnt/vol1 1. Display file system mount status Notice its 1Gig in size (962M formatted). 2. Display current ZFS volume size and reservation properties Confirms the volume is 1Gig in size with a 1Gig reservation. 3. Change [...]]]></description>
			<content:encoded><![CDATA[<p>How to grow a ZFS Volume.</p>
<p>Assume the following is true:</p>
<li>Pool Name: <strong>fort</strong></li>
<li>Volume Name: <strong>vol1</strong></li>
<li>Mount Point:  <strong>/mnt/vol1</strong></li>
<p>1. Display file system mount status</p>
<pre class="brush: plain; title: ; notranslate">
# df -h /mnt/vol1/
Filesystem             size   used  avail capacity  Mounted on
/dev/zvol/dsk/fort/vol1
                       962M   1.0M   903M     1%    /mnt/vol1
</pre>
<p>Notice its 1Gig in size (962M formatted).</p>
<p>2. Display current ZFS volume size and reservation properties</p>
<pre class="brush: plain; title: ; notranslate">
# zfs get volsize,reservation fort/vol1
NAME           PROPERTY     VALUE          SOURCE
fort/vol1  volsize      1G             -
fort/vol1  reservation  1G             local
</pre>
<p>Confirms the volume is 1Gig in size with a 1Gig reservation.</p>
<p>3. Change the volsize ZFS property for fort/vol1 to 2Gig.</p>
<pre class="brush: plain; title: ; notranslate">
# zfs set volsize=2g fort/vol1
</pre>
<p>4. Confirm the changes were made by displaying the volsize and reservation ZFS properties.</p>
<pre class="brush: plain; title: ; notranslate">
# zfs get volsize,reservation fort/vol1
NAME           PROPERTY     VALUE          SOURCE
fort/vol1  volsize      2G             -
fort/vol1  reservation  2G             local
</pre>
<p>Notice the &#8220;volsize&#8221; is now set to 2Gig.  At this point, the OS doesnt see the expanded file system.  In order for the OS to see the size, you will have to expand the file system with &#8220;growfs&#8221;.</p>
<p>5. Run growfs to expand mounted file system</p>
<pre class="brush: plain; title: ; notranslate">
# growfs -M /mnt/vol1 /dev/zvol/rdsk/fort/vol1
Warning: 2048 sector(s) in last cylinder unallocated
/dev/zvol/rdsk/fort/vol1:   4194304 sectors in 683 cylinders of 48 tracks, 128 sectors
        2048.0MB in 49 cyl groups (14 c/g, 42.00MB/g, 20160 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
 32, 86176, 172320, 258464, 344608, 430752, 516896, 603040, 689184, 775328,
 3359648, 3445792, 3531936, 3618080, 3704224, 3790368, 3876512, 3962656,
 4048800, 4134944
</pre>
<p>The output should now show you the new volume size.</p>
<p>6. Confirm the size of mounted file system using df or dd.</p>
<pre class="brush: plain; title: ; notranslate">
# df -h /mnt/vol1/
Filesystem             size   used  avail capacity  Mounted on
/dev/zvol/dsk/fort/vol1
                       1.9G   2.0M   1.8G     1%    /mnt/vol1

# dd if=/dev/zvol/dsk/fort/vol1 of=/dev/null bs=1024k
2048+0 records in
2048+0 records out
</pre>
<p>Thats it!  Growing a ZFS volume is an online operation in my mind.    </p>
]]></content:encoded>
			<wfw:commentRss>http://alittlestupid.com/2010/10/24/how-to-grow-a-zfs-volume/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Super Cool Passwords</title>
		<link>http://alittlestupid.com/2010/01/21/my-super-cool-passwords/</link>
		<comments>http://alittlestupid.com/2010/01/21/my-super-cool-passwords/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 18:03:32 +0000</pubDate>
		<dc:creator>Juan Martinez</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://alittlestupid.com/?p=512</guid>
		<description><![CDATA[Here is a list of my all time favorite passwords I like to use for all my banking accounts, email accounts, and anything else that requires a password. I figure I&#8217;d save the bad guy the time of running through a normal dictionary attack and provide them here instead. Without further ado, here is my [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a list of my all time favorite passwords I like to use for all my banking accounts, email accounts, and anything else that requires a password.  I figure I&#8217;d save the bad guy the time of running through a normal <a href="http://en.wikipedia.org/wiki/Dictionary_attack">dictionary attack</a> and provide them here instead.  </p>
<p>Without further ado, here is my top 10 of all time favorite passwords.</p>
<ul>
<li>123456</li>
<li>12345</li>
<li>123456789</li>
<li>Password</li>
<li>iloveyou</li>
<li>princess</li>
<li>rockyou</li>
<li>1234567</li>
<li>12345678</li>
<li>abc123</li>
</ul>
<p>Thanks to <a href="http://www.downloadsquad.com/2010/01/21/analysis-of-32-million-breached-passwords-shows-people-use-stupi/">DLS</a> for making my list public!</p>
]]></content:encoded>
			<wfw:commentRss>http://alittlestupid.com/2010/01/21/my-super-cool-passwords/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>ZFS Deduplication</title>
		<link>http://alittlestupid.com/2009/11/02/zfs-deduplication/</link>
		<comments>http://alittlestupid.com/2009/11/02/zfs-deduplication/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 17:00:49 +0000</pubDate>
		<dc:creator>Juan Martinez</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://alittlestupid.com/?p=508</guid>
		<description><![CDATA[Jeff Bonwick talks about ZFS Deduplication: You knew this day was coming: ZFS now has built-in deduplication. If you already know what dedup is and why you want it, you can skip the next couple of sections. For everyone else, let&#8217;s start with a little background. Read more about it at http://blogs.sun.com/bonwick/en_US/entry/zfs_dedup.]]></description>
			<content:encoded><![CDATA[<p>Jeff Bonwick talks about ZFS Deduplication:</p>
<blockquote><p>You knew this day was coming: ZFS now has built-in deduplication.  If you already know what dedup is and why you want it, you can skip the next couple of sections. For everyone else, let&#8217;s start with a little background. </p></blockquote>
<p>Read more about it at <a href="http://blogs.sun.com/bonwick/en_US/entry/zfs_dedup">http://blogs.sun.com/bonwick/en_US/entry/zfs_dedup</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alittlestupid.com/2009/11/02/zfs-deduplication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Howto: Mount New File System To Running Solaris 10 Zone</title>
		<link>http://alittlestupid.com/2009/10/22/howto-mount-new-file-system-to-running-solaris-10-zone/</link>
		<comments>http://alittlestupid.com/2009/10/22/howto-mount-new-file-system-to-running-solaris-10-zone/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 19:17:14 +0000</pubDate>
		<dc:creator>Juan Martinez</dc:creator>
				<category><![CDATA[how-to's]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://alittlestupid.com/?p=499</guid>
		<description><![CDATA[I recently came across the need to mount a new file system to a Solaris 10 non-global zone without rebooting the actual zone. There are other ways to accomplish this same task but most of the solutions I&#8217;ve found required rebooting the non-global zone. Unfortunately, we could not take an outage by rebooting the non-global [...]]]></description>
			<content:encoded><![CDATA[<p>I recently came across the need to mount a new file system to a Solaris 10 non-global zone without rebooting the actual zone.  There are other ways to accomplish this same task but most of the solutions I&#8217;ve found required rebooting the non-global zone.  Unfortunately, we could not take an outage by rebooting the non-global zone yet the file system needed to be added to the zone.</p>
<p>The method below describes a way in which you can mount a new file system (UFS) to a running Solaris 10 zone without the need of a reboot.  </p>
<ul>
<strong>Assumptions:</strong>
<li>All commands need to be run from the global zone as the root user unless otherwise specified.</li>
<p><strong>Prerequisites:</strong>
<li>A Solaris 10 host with at least one running non-global zone.</li>
<p><strong>Limitations:</strong>
<li>You can not unmount the file system from the non-global zone.  Some say this is a benefit <img src='http://alittlestupid.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ul>
<p>Lets get started!</p>
<ol>
<ul>Log into the global zone and create the new file system like you normally would.  In this example, I use SVM to create a new metadevice (d1000), one way mirror (d2000), and a 1Gig soft partition (d2001).  Your mileage may vary.  </p>
<blockquote><p>
<code><br />
	# metainit d1000 1 1 c1t5d0s0 -i 128k<br />
	# metainit d2000 -m d1000<br />
	# metainit d2001 -p d2000 1g<br />
	# echo y | newfs -i 8192 /dev/md/rdsk/d2001<br />
</code>
</p></blockquote>
</ul>
<ul>Create the block and character devices for the zone.  Run &#8220;ls -lL&#8221; against the newly created soft partition (d2001) to find the major and minor character and block values.</p>
<blockquote><p>
       <code><br />
	# ls -lL /dev/md/*dsk/d2001<br />
        brw-r----- 1 root sys 85, 2001 Oct  6 13:46 /dev/md/dsk/d2001<br />
	crw-r----- 1 root sys 85, 2001 Oct  6 13:47 /dev/md/rdsk/d2001<br />
        </code>
        </p></blockquote>
<p><strong>NOTE:</strong> The major and minor values are <strong>85</strong> and <strong>2001</strong>, respectively.  Notice that the &#8220;dsk&#8221; device is a <em>&#8220;block-type&#8221;</em> file and &#8220;rdsk&#8221; device is a <em>&#8220;character-type&#8221;</em> file.</p>
</ul>
<ul>Run <a href="http://www.phy.ohiou.edu/cgi-bin/man-cgi.sol?mknod+1M">mknod</a> to create the two special files for the zone.  Keep in mind that the name of the two files need to be saved down the myzone device path.  </p>
<blockquote><p>
       <code><br />
         # mknod /zones/myzone1/dev/md/dsk/d2001 b 85 2001<br />
         # mknod /zones/myzone1/dev/md/rdsk/d2001 c 85 2001<br />
        </code>
        </p></blockquote>
</ul>
<ul>Correct the permissions and ownerships of the new d2001 block-type and character-type files. </p>
<blockquote><p>
       <code><br />
         # chmod 640 /zones/myzone1/dev/md/*dsk/d2001<br />
         # chown root:root /zones/myzone1/dev/md/*dsk/d2001<br />
        </code>
        </p></blockquote>
</ul>
<ul>Create a mount point in the &#8220;myzone1&#8243; non-global zone.</p>
<blockquote><p>
       <code><br />
       # mkdir /zones/myzone1/root/wandisimo<br />
       </code>
       </p></blockquote>
</ul>
<ul>Confirm its not already mounted</p>
<blockquote><p>
       <code><br />
         # mount | grep wandisimo<br />
       </code>
       </p></blockquote>
<p>You should not get anything back from the command above.
</ul>
<ul>Mount the file system </p>
<blockquote><p>
       <code><br />
         # mount /dev/md/dsk/d2001 /zones/myzone1/root/wandisimo<br />
       </code>
       </p></blockquote>
<p>You are probably thinking to your self, <em>&#8220;Why couldn&#8217;t we just skip to this step and be done with it?&#8221;</em>  From my testing, if the block and character files are not created down the &#8220;myzone1&#8243; device path first, it fails to mount.   If you were to add the soft partition using zonecfg or by adding it to the zone XML file then rebooting the non-global zone, the boot process actually creates the block and character device for you.  </p>
<p><strong>NOTE:</strong> Even though the file system successfully gets mounted, it will not show up in a &#8220;df&#8221; output as actually being mounted.
</ul>
<ul>Check to see if its mounted</p>
<blockquote><p>
       <code><br />
         # df -h | grep wandisimo<br />
        </code>
       </p></blockquote>
<p>You should not get any output.
</ul>
<ul>Confirm the file system is in fact mounted by running the mount command</p>
<blockquote><p>
       <code><br />
         # mount | grep wandisimo<br />
/zones/myzone1/root/wandisimo on /dev/md/dsk/d2001    read/write/setuid/devices/intr/largefiles/logging/xattr/onerror=panic/dev=15407d3 on Tue Oct  6 14:11:45 2009<br />
        </code>
       </p></blockquote>
</ul>
<ul>Log into the running non-global zone (myzone1) to confirm the file system is indeed mounted</p>
<blockquote><p>
       <code><br />
         # zlogin myzone1<br />
         (myzone1)# df -h /wandisimo<br />
         Filesystem             size   used  avail capacity  Mounted on<br />
         /wandisimo            1008M   1.0M   947M     1%    /wandisimo<br />
        </code>
       </p></blockquote>
</ul>
<p><strong>Done.  No need to reboot the non-global zone!</strong>
</ol>
<p>If you would like to make this permanent, you will need to add it to the /etc/vfstab in the global zone.</p>
]]></content:encoded>
			<wfw:commentRss>http://alittlestupid.com/2009/10/22/howto-mount-new-file-system-to-running-solaris-10-zone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WiFi Security: I like to use the analogy of door locks</title>
		<link>http://alittlestupid.com/2009/07/08/wifi-security-i-like-to-use-the-analogy-of-door-locks/</link>
		<comments>http://alittlestupid.com/2009/07/08/wifi-security-i-like-to-use-the-analogy-of-door-locks/#comments</comments>
		<pubDate>Wed, 08 Jul 2009 19:34:39 +0000</pubDate>
		<dc:creator>Juan Martinez</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://alittlestupid.com/?p=483</guid>
		<description><![CDATA[I came across a post on http://lifehacker.com titled &#8220;How to Crack a Wi-Fi Network&#8217;s WEP Password with BackTrack&#8220;. The article itself is good but one of the comment by commenter &#8220;MaribelAlligator&#8221; made a lot of sense. &#8220;I like to use the analogy of door locks. WEP is closest to a bathroom or bedroom lock (the [...]]]></description>
			<content:encoded><![CDATA[<p>I came across a post on <a href="http://lifehacker.com">http://lifehacker.com</a> titled &#8220;<a href="http://lifehacker.com/5305094/how-to-crack-a-wi+fi-networks-wep-password-with-backtrack#c13992122">How to Crack a Wi-Fi Network&#8217;s WEP Password with BackTrack</a>&#8220;.  The article itself is good but one of the comment by commenter &#8220;MaribelAlligator&#8221; made a lot of sense.</p>
<blockquote><p>
&#8220;I like to use the analogy of door locks. WEP is closest to a bathroom or bedroom lock (the kind you can unlock with a stiff pin). It&#8217;ll let people know you don&#8217;t want them to enter, but anyone with a the slightest bit of knowledge can get past it. WPA is like a standard door lock; it&#8217;s a lot more secure, but it is still possible to get by for someone with the right tools, knowledge, and circumstances. WPA2 is like a bank safe. It may be possible to defeat, depending on how it&#8217;s been set up, but it&#8217;s not realistically possible for anybody to actually do so&#8230; yet. Just to continue the analogy to other Wifi security methods, not broadcasting your SSID is like taking the numbers off of your house &#8211; The house is still there and everyone can see it, it&#8217;s just a bit harder to find for people that don&#8217;t know what they are looking for already. Filtering by MAC address is like having a guard at the door that checks everyone&#8217;s name against a list to see if they can enter. The only problem is, he doesn&#8217;t ask for ID or remember what people look like, so anybody can and can listen in to see what names are allowed and then claim to be anybody else.&#8221; &#8211;MaribelAlligator on lifehaker.com
 </p></blockquote>
<p>I like the description.  I just may have to steal that. (tounge in cheek moment)</p>
]]></content:encoded>
			<wfw:commentRss>http://alittlestupid.com/2009/07/08/wifi-security-i-like-to-use-the-analogy-of-door-locks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solaris zone stuck in &#8220;shutting_down&#8221; state</title>
		<link>http://alittlestupid.com/2009/07/04/solaris-zone-stuck-in-shutting_down-state/</link>
		<comments>http://alittlestupid.com/2009/07/04/solaris-zone-stuck-in-shutting_down-state/#comments</comments>
		<pubDate>Sat, 04 Jul 2009 20:37:58 +0000</pubDate>
		<dc:creator>Juan Martinez</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://alittlestupid.com/?p=476</guid>
		<description><![CDATA[Recently, one of the servers I manage had problems bringing down one of its non-global zones. I ran &#8220;zoneadm list -vic&#8221; and confirmed that ngzone1 was in a &#8220;shutting_down&#8221; state. (global-zone)# zoneadm list -vic ID NAME STATUS PATH BRAND IP 0 global running / native shared 8 ngzone1 shutting_down /z/host/ngzone1 native shared 9 ngzone2 running [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, one of the servers I manage had problems bringing down one of its non-global zones.  I ran &#8220;zoneadm list -vic&#8221; and confirmed that ngzone1 was in a &#8220;shutting_down&#8221; state.  </p>
<blockquote><p>
<code><br />
(global-zone)# zoneadm list -vic<br />
  ID NAME             STATUS     PATH                   BRAND    IP<br />
   0 global           running    /                             native   shared<br />
   8 ngzone1        shutting_down /z/host/ngzone1 native   shared<br />
   9 ngzone2        running    /z/host/ngzone2        native   shared<br />
</code>
</p></blockquote>
<p>From the global zone, I fixed the problem by killing the process that was hanging up the ngzone1 zone:</p>
<blockquote><p>
<code><br />
(global-zone)# ps -efZ | grep ngzone1<br />
  global    root  7623     1   0   May 24 ?           0:04 zoneadmd -z ngzone1<br />
 ngzone1  root 11679     1   0   May 31 ?           0:00 zsched<br />
 ngzone1  server 23527   1   0   Jun 06 ?          13:20 batchResearch1<br />
</code>
</p></blockquote>
<p>Sending a SIGKILL to PID  23527 enabled the ngzone1 to properly shutdown.  Don’t kill zoneadmd or zsched as that’s handled by the global zone.  Everything else should be fair game.  The only thing left now is to figure out what caused the process to hang preventing ngzone1 from properly being shut down.  </p>
]]></content:encoded>
			<wfw:commentRss>http://alittlestupid.com/2009/07/04/solaris-zone-stuck-in-shutting_down-state/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to find the WWN in Sun Solaris</title>
		<link>http://alittlestupid.com/2009/06/19/how-to-find-the-wwn-in-sun-solaris/</link>
		<comments>http://alittlestupid.com/2009/06/19/how-to-find-the-wwn-in-sun-solaris/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 20:01:41 +0000</pubDate>
		<dc:creator>Juan Martinez</dc:creator>
				<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://alittlestupid.com/?p=477</guid>
		<description><![CDATA[Covers a good amount of methods you can use to obtain the WWN (World Wide Name) from a Solaris host. http://www.sunsolarisadmin.com/hardware/how-to-find-the-wwn-world-wide-name-in-sun-solaris/]]></description>
			<content:encoded><![CDATA[<p>Covers a good amount of methods you can use to obtain the WWN  (World Wide Name) from a Solaris host.</p>
<p><a href="http://www.sunsolarisadmin.com/hardware/how-to-find-the-wwn-world-wide-name-in-sun-solaris/">http://www.sunsolarisadmin.com/hardware/how-to-find-the-wwn-world-wide-name-in-sun-solaris/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://alittlestupid.com/2009/06/19/how-to-find-the-wwn-in-sun-solaris/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add ZFS file system to Solaris non-global zone</title>
		<link>http://alittlestupid.com/2009/04/28/add-zfs-file-system-to-solaris-non-global-zone/</link>
		<comments>http://alittlestupid.com/2009/04/28/add-zfs-file-system-to-solaris-non-global-zone/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 20:26:30 +0000</pubDate>
		<dc:creator>Juan Martinez</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://alittlestupid.com/?p=456</guid>
		<description><![CDATA[Ever wanted to add a ZFS file system to a Solaris 10 non-global zone but ran into the following error: could not verify fs /test: zfs &#8216;tank/test&#8217; mountpoint is not &#8220;legacy&#8221; zoneadm: zone non-global-zone failed to verify The fix would be to update/create the ZFS dataset as a legacy mount point. For this post, I [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wanted to add a ZFS file system to a Solaris 10 non-global zone but ran into the following error:</p>
<blockquote><p>
could not verify fs /test: zfs &#8216;tank/test&#8217; mountpoint is not &#8220;legacy&#8221;<br />
zoneadm: zone non-global-zone failed to verify
</p></blockquote>
<p>The fix would be to update/create the ZFS dataset as a legacy mount point.  For this post, I assume that you have both basic understanding of <a href="http://en.wikipedia.org/wiki/Solaris_Containers">Solaris zone</a> technology and <a href="http://en.wikipedia.org/wiki/ZFS">zfs</a> file systems. </p>
<p>In the version of Solaris that I run, (Solaris 10 11/06, sparc) here are the steps you would need to follow in order to add a ZFS file system to a Solaris non-global zone. </p>
<ol>
<li>Create a legacy zfs pool from the global zone<br />
<blockquote><p>
# zpool create tank c0t0d0s0
</p></blockquote>
</li>
<li>Create a zfs dataset using the new <em>tank</em> zfs pool<br />
<blockquote>
<pre>
# zfs create tant/test
</pre>
</blockquote>
</li>
<li>Display the zfs pool<br />
<blockquote>
<pre>
# zfs list
NAME                USED  AVAIL  REFER  MOUNTPOINT
tank               6.57G   120G  26.5K  /tank
tank/test          24.5K   120G  24.5K  /tank/test
</pre>
</blockquote>
</li>
<li>Set the new tank/test dataset as a legacy mount point<br />
<blockquote>
<pre>
# zfs set mountpoint=legacy tank/test
</pre>
</blockquote>
</li>
<li>Display the zfs pool<br />
<blockquote>
<pre>
# zfs list
NAME                USED  AVAIL  REFER  MOUNTPOINT
tank               6.57G   120G  24.5K  /tank
tank/test          24.5K   120G  24.5K  legacy
</pre>
</blockquote>
</li>
<p>Notice the mount point for <em>tank/test</em> changed from the actual mount point <em>/tank/test</em> to <em>legacy</em>.</p>
<li>Create a Solaris non-global zone with similar options as below<br />
<blockquote>
<pre>
# zonecfg -z non-global-zone info

...
fs:
        dir: /test
        special: tank/test
        raw not specified
        type: zfs
        options: []
dataset:
        name: tank/test
...
</pre>
</blockquote>
</li>
</ol>
<p>After the zone has been created and booted, login into the non-global-zone and running a <em>&#8220;df&#8221;</em> will show you the new ZFS pool is mounted and ready to satisfy your ZFS needs.</p>
]]></content:encoded>
			<wfw:commentRss>http://alittlestupid.com/2009/04/28/add-zfs-file-system-to-solaris-non-global-zone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Assign metadevice to Solaris non-global zone</title>
		<link>http://alittlestupid.com/2009/04/23/assign-metadevice-to-solaris-non-global-zone/</link>
		<comments>http://alittlestupid.com/2009/04/23/assign-metadevice-to-solaris-non-global-zone/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 16:33:29 +0000</pubDate>
		<dc:creator>Juan Martinez</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://alittlestupid.com/?p=444</guid>
		<description><![CDATA[From the global zone, create the SVM Metadevice like you normally would. Create the zone and add the SVM Metadevice to the zone configuration via zonecfg. global-zone# zonecfg -z myzone myzone: No such zone configured Use 'create' to begin configuring a new zone. zonecfg:myzone> create zonecfg:myzone> set zonepath=/zones/myzone zonecfg:myzone> set autoboot=true zonecfg:myzone> add net zonecfg:myzone:net> [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>From the global zone, create the SVM Metadevice like you normally would.</li>
<li>Create the zone and add the SVM Metadevice to the zone configuration via zonecfg. </li>
</ol>
<p><code></p>
<blockquote><p>
global-zone# zonecfg -z myzone<br />
myzone: No such zone configured<br />
Use 'create' to begin configuring a new zone.<br />
zonecfg:myzone> create<br />
zonecfg:myzone> set zonepath=/zones/myzone<br />
zonecfg:myzone> set autoboot=true<br />
zonecfg:myzone> add net<br />
zonecfg:myzone:net> set address=192.168.1.100<br />
zonecfg:myzone:net> set physical=ce0<br />
zonecfg:myzone:net> end<br />
zonecfg:myzone:net> add device<br />
zonecfg:myzone:net> set match=/dev/md/*dsk/d110<br />
zonecfg:myzone:net> end<br />
zonecfg:myzone> add attr<br />
zonecfg:myzone:attr> set name=comment<br />
zonecfg:myzone:attr> set type=string<br />
zonecfg:myzone:attr>set value="My first zone with metadevices - myzone"<br />
zonecfg:myzone:attr> end<br />
zonecfg:myzone> verify<br />
zonecfg:myzone> export
</p></blockquote>
<p></code><br />
The key line to adding the SVM Metadevice to the non-global zone is the following:</p>
<blockquote><p>
zonecfg:myzone:net> add device<br />
zonecfg:myzone:net> set match=/dev/md/*dsk/d610<br />
zonecfg:myzone:net> end
</p></blockquote>
<p>I used an asterisk to signify that I want both the the dsk and rdsk devices.</p>
<p>Assuming all went well, you should be able to mount and unmount the SVM Metadevice from the non-global zone.  Why would you want to provide the ability for a non-global zone to mount and un-mount a file system at will?  In my case, the mount point assigned to d110 in the example above is cloned daily using <a href="http://en.wikipedia.org/wiki/Symmetrix">EMC clone technology</a>.  </p>
]]></content:encoded>
			<wfw:commentRss>http://alittlestupid.com/2009/04/23/assign-metadevice-to-solaris-non-global-zone/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.479 seconds -->

