<?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>unixpowered.com &#187; solaris</title>
	<atom:link href="http://www.unixpowered.com/blog/category/solaris/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.unixpowered.com/blog</link>
	<description></description>
	<lastBuildDate>Wed, 21 Jul 2010 13:42:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Solaris Containers and ZFS</title>
		<link>http://www.unixpowered.com/blog/2010/06/05/solaris-containers-and-zfs/</link>
		<comments>http://www.unixpowered.com/blog/2010/06/05/solaris-containers-and-zfs/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 09:02:36 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris containers]]></category>
		<category><![CDATA[solaris zones]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.unixpowered.com/blog/?p=498</guid>
		<description><![CDATA[I had to create some containers for developers to do their work. Developers always seem to want root access to a machine. Containers work very nice in this scenario: if a developer messes up his container, I can just clone a new one off a &#8220;gold&#8221; container. ZFS can be very handy here as well: [...]]]></description>
			<content:encoded><![CDATA[<p>I had to create some containers for developers to do their work. Developers always seem to want root access to a machine. Containers work very nice in this scenario: if a developer messes up his container, I can just clone a new one off a &#8220;gold&#8221; container. ZFS can be very handy here as well: by installing a container on ZFS filesystem and assigning ZFS quota, you can limit how big the container can grow.</p>
<p>So, first I created a ZFS pool out of two slices on two disks. This is not really recommended way to create ZFS pool. You should really be using two whole disks. And, ignore the fact that those disks both reside on the same controller. Right after that I created <em>dev1</em> filesystem within the <em>zonepool</em>:</p>
<p><code>bash-3.00# <strong>zpool create -m /export/home/zones zonepool mirror c0t0d0s3 c0t1d0s3</strong><br />
bash-3.00# <strong>zfs create zonepool/dev1</strong><br />
bash-3.00# <strong>zfs list</strong><br />
NAME               USED  AVAIL  REFER  MOUNTPOINT<br />
zonepool           122K  55.6G  25.5K  /export/home/zones<br />
zonepool/dev1     24.5K  8.00G  24.5K  /export/home/zones/dev1</code></p>
<p>Next I set ZFS quota on the filesystem to 8GB:</p>
<p><code>bash-3.00# <strong>zfs set quota=8G zonepool/dev1</strong><br />
bash-3.00# <strong>zfs get all zonepool/dev1</strong><br />
NAME              PROPERTY       VALUE                       SOURCE<br />
zonepool/dev1     type           filesystem                  -<br />
zonepool/dev1     creation       Fri Jun  4  9:17 2010       -<br />
zonepool/dev1     used           24.5K                       -<br />
zonepool/dev1     available      8.00G                       -<br />
zonepool/dev1     referenced     24.5K                       -<br />
zonepool/dev1     compressratio  1.00x                       -<br />
zonepool/dev1     mounted        yes                         -<br />
zonepool/dev1     quota          8G                          local<br />
zonepool/dev1     reservation    none                        default<br />
zonepool/dev1     recordsize     128K                        default<br />
zonepool/dev1     mountpoint     /export/home/zones/dev1     inherited from zonepool<br />
zonepool/dev1     sharenfs       off                         default<br />
zonepool/dev1     checksum       on                          default<br />
zonepool/dev1     compression    off                         default<br />
zonepool/dev1     atime          on                          default<br />
zonepool/dev1     devices        on                          default<br />
zonepool/dev1     exec           on                          default<br />
zonepool/dev1     setuid         on                          default<br />
zonepool/dev1     readonly       off                         default<br />
zonepool/dev1     zoned          off                         default<br />
zonepool/dev1     snapdir        hidden                      default<br />
zonepool/dev1     aclmode        groupmask                   default<br />
zonepool/dev1     aclinherit     secure                      default<br />
zonepool/dev1     canmount       on                          default<br />
zonepool/dev1     shareiscsi     off                         default<br />
zonepool/dev1     xattr          on                          default</code></p>
<p>Now, I should mention, that prior to configuring <em>/export/home/zones</em> to reside on ZFS I uninstalled <em>dev1</em> container which was there previously. So, the container itself was gone, but the system still had knowledge of the container&#8217;s configuration. I wrote a post on configuring containers <a title="Solaris Containers" href="index.php/archives/2009/06/14/solaris-containers/" target="_self">here</a>.</p>
<p><code>bash-3.00# <strong>zoneadm list -cv</strong><br />
ID NAME             STATUS     PATH                           BRAND    IP<br />
0 global           running    /                              native   shared<br />
- dev1             configured /export/home/zones/dev1        native   shared</code></p>
<p>Since the container was already configured, I went ahead and started installing it:</p>
<p><code>bash-3.00# <strong>zoneadm -z dev1 install</strong><br />
/export/home/zones/dev1 must not be group readable.<br />
/export/home/zones/dev1 must not be group executable.<br />
/export/home/zones/dev1 must not be world readable.<br />
/export/home/zones/dev1 must not be world executable.<br />
could not verify zonepath /export/home/zones/dev1 because of the above errors.<br />
zoneadm: zone dev1 failed to verify<br />
bash-3.00#</code></p>
<p>Woops, looks like the container directory permissions need some fixing:</p>
<p><code>bash-3.00# <strong>cd /export/home/zones/</strong><br />
bash-3.00# <strong>ls -l</strong><br />
total 3<br />
drwxr-xr-x   2 root     sys            2 Jun  3 09:48 dev1<br />
bash-3.00# <strong>chmod 700 dev1</strong><br />
bash-3.00# <strong>chown root:root dev1</strong></code></p>
<p>One more try to install the container:</p>
<p><code>bash-3.00# <strong>zoneadm -z dev1 install</strong><br />
Preparing to install zone .<br />
Creating list of files to copy from the global zone.<br />
Copying &lt;2561&gt; files to the zone.<br />
Initializing zone product registry.<br />
Determining zone package initialization order.<br />
Preparing to initialize &lt;1086&gt; packages on the zone.<br />
Initialized &lt;1086&gt; packages on zone.<br />
Zone  is initialized.<br />
The file  contains a log of the zone installation.</code></p>
<p>That&#8217;s it. After the container install completed, before booting <em>dev1</em>, I stuck the following <em>sysidcfg</em> file into <em>/etc</em> directory of <em>dev1</em> container:</p>
<p><code>bash-3.00# <strong>more sysidcfg</strong><br />
system_locale=en_US<br />
timezone=US/Central<br />
terminal=vt100<br />
security_policy=NONE<br />
network_interface=primary {<br />
hostname=dev1<br />
}<br />
nfs4_domain=dynamic<br />
name_service=NIS {<br />
domain_name=example.com<br />
name_server=nis1(10.1.1.1)<br />
}</code></p>
<p>That way I would not be asked any container configuration questions during first container boot. Except for the root password, of course.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2010/06/05/solaris-containers-and-zfs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing and patching Data Protector client on standalone Solaris machine</title>
		<link>http://www.unixpowered.com/blog/2010/05/07/installing-and-patching-data-protector-client-on-standalone-solaris-machine/</link>
		<comments>http://www.unixpowered.com/blog/2010/05/07/installing-and-patching-data-protector-client-on-standalone-solaris-machine/#comments</comments>
		<pubDate>Fri, 07 May 2010 16:24:39 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[hp data protector]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris tips]]></category>
		<category><![CDATA[solaris utilities]]></category>

		<guid isPermaLink="false">http://www.unixpowered.com/blog/?p=473</guid>
		<description><![CDATA[I needed to install HP Data Protector 5.5 client on an old machine running Solaris 2.6. I also needed to apply some Data Protector patches to that machine. The problem was I had no Data Protector Install Server for Data Protector version 5.5.
Normally, Data Protector clients are installed from Data Protector Install Server. When you [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to install<a title="HP Data Protector 5.5" href="http://h20000.www2.hp.com/bizsupport/TechSupport/Home.jsp?lang=en&amp;cc=us&amp;prodTypeId=18964&amp;prodSeriesId=3188924&amp;submit.y=0&amp;submit.x=0&amp;lang=en&amp;cc=us" target="_self"> HP Data Protector 5.5</a> client on an old machine running Solaris 2.6. I also needed to apply some Data Protector patches to that machine. The problem was I had no Data Protector Install Server for Data Protector version 5.5.</p>
<p>Normally, Data Protector clients are installed from Data Protector Install Server. When you need to deploy patches, first you patch the Install Server and then you push out patches to you Data Protector clients.</p>
<p>Installing the client itself on standalone machine is not a big deal. All you need is an appropriate Data Protector software depot and off you go. The problem was installing patches without the Install Server.</p>
<p>Here is the process I took installing and patching this machine:</p>
<p style="padding-left: 30px;"><em>B6960-15041_DP55_HPUX_PA_IS_CD.tar</em> &#8211; HPUX Install Server &#8211; contains Solaris 2.6 client<br />
<em>DPSOL_00168.zip</em> &#8211; Patch<br />
<em>DPSOL_00180.zip</em> &#8211; Patch</p>
<p>First, I decompressed Data Protector software depot that contains Solaris 2.6 client and installed Disk Agent on the machine:</p>
<p><code>root@client # <strong>tar xf <em>B6960-15041_DP55_HPUX_PA_IS_CD.tar</em></strong><br />
root@client # <strong>cd LOCAL_INSTALL</strong><br />
root@client # <strong>./omnisetup.sh -install da</strong></code></p>
<p>After that was done, it was time to patch Data Protector installation. First, I decompressed the patch archive. Then I located and decompressed the proper <em>packet.Z</em> file for Solaris 2.6:</p>
<p><code>root@client # <strong>unzip DPSOL_00168.zip</strong><br />
root@client # <strong>cd OB2-SOLUX/root/opt/omni/databases/vendor/da/sun/sparc/solaris-26/A.05.50/<br />
</strong>root@client # <strong>uncompress packet.Z</strong></code></p>
<p>Finally I installed the packet, which is really Solaris package:</p>
<p><code>root@client # <strong>pkgadd -d ./packet all</strong></code></p>
<p>The whole patch process has to be repeated for all patches you are trying to install. Note, that when you <em>unzip</em> the patch, you kind of have to know what you are looking for, so you need to pay attention to the <em>PATH</em> to <em>packet.Z</em> file; i.e. in the above case I was installing Data Agent patch on a Sun box, running Solaris 2.6 and Data Protector version 5.5.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2010/05/07/installing-and-patching-data-protector-client-on-standalone-solaris-machine/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Trussing processes on Sun Cluster?</title>
		<link>http://www.unixpowered.com/blog/2010/04/02/trussing-processes-on-sun-cluster/</link>
		<comments>http://www.unixpowered.com/blog/2010/04/02/trussing-processes-on-sun-cluster/#comments</comments>
		<pubDate>Fri, 02 Apr 2010 15:41:02 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris tips]]></category>
		<category><![CDATA[solaris utilities]]></category>
		<category><![CDATA[sun cluster]]></category>

		<guid isPermaLink="false">http://www.unixpowered.com/blog/?p=461</guid>
		<description><![CDATA[One of the apps running on Sun Cluster was randomly crashing. So, I decided to take a look what was happening. Yeah, there is DTrace in Solaris 10. Since I am pretty comfortable with truss I decided to give that a shot first:
root@node1 # truss -p 27462
truss: process is traced: 27462
root@node1 # 
That&#8217;s it. No [...]]]></description>
			<content:encoded><![CDATA[<p>One of the apps running on Sun Cluster was randomly crashing. So, I decided to take a look what was happening. Yeah, there is DTrace in Solaris 10. Since I am pretty comfortable with <a title="truss man page" href="http://docs.sun.com/app/docs/doc/816-5165/truss-1?l=en&amp;a=view&amp;q=truss" target="_self"><em>truss</em></a> I decided to give that a shot first:</p>
<p><code>root@node1 # <strong>truss -p 27462</strong><br />
truss: process is traced: 27462<br />
root@node1 # </code></p>
<p>That&#8217;s it. No <em>truss</em> output, nothing. That was weird. <em>truss</em> will not work if there is a debugger attached to the process to be traced, which was not the case. So, I figured it might have something to do with the fact that the process is handled by the cluster software.</p>
<p>Finaly, NOTES section of <a title="pmfadm manpage" href="http://docs.sun.com/app/docs/doc/819-0582/6n30g7iep?l=en&amp;a=view&amp;q=pmfadm" target="_self"><em>pmfadm</em> manpage</a> gave me the answer:</p>
<blockquote><p>To avoid collisions with other controlling processes. truss(1) does not allow tracing a process that it detects as being controlled by another process by way of the /proc interface. Since rpc.pmfd(1M) uses the /proc interface to monitor processes and their descendents, those processes that are submitted to rpc.pmfd by way of pmfadm cannot be traced or debugged.</p></blockquote>
<p>So, Dtrace it was. Thankfully, Brendan Gregg already did the hard work for me, by creating <a title="Brendan Gregg's DTrace truss" href="http://www.brendangregg.com/dtrace.html" target="_self">DTrace version</a> of <em>truss</em>. The more you know&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2010/04/02/trussing-processes-on-sun-cluster/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jetadmin and non-HP network printers</title>
		<link>http://www.unixpowered.com/blog/2010/03/21/jetadmin-and-non-hp-network-printers/</link>
		<comments>http://www.unixpowered.com/blog/2010/03/21/jetadmin-and-non-hp-network-printers/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 17:38:47 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[hp jetadmin]]></category>
		<category><![CDATA[hp jetdirect]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris tips]]></category>

		<guid isPermaLink="false">http://www.unixpowered.com/blog/?p=446</guid>
		<description><![CDATA[I was trying to get Dell 3130cn printer working with Jetadmin in Solaris. But, I was not able to create the print queue even though the printer was reachable, SNMP was working and so was telnet. Fortunately, there is a workaround I found somewhere on the Internet. Of course, I failed to keep the link [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to get <a title="Dell 3130cn Manual" href="http://support.dell.com/support/edocs/systems/3130cn/" target="_self">Dell 3130cn</a> printer working with Jetadmin in Solaris. But, I was not able to create the print queue even though the printer was reachable, SNMP was working and so was telnet. Fortunately, there is a workaround I found somewhere on the Internet. Of course, I failed to keep the link to the workaround. Anyways, the non-HP printer that you are trying to configure has to have Jetdirect card. The workaround:</p>
<ol>
<li>Take an HP Jetdirect printer that you already have configured.</li>
<li>Edit /etc/<em>hosts</em> file on the print server and add entry with Dell printer name. The IP address for that entry has to be the one belonging to the working HP printer.</li>
<li>Add a print queue as you normally would.</li>
<li>Remove the <em>/etc/hosts</em> file entry.</li>
<li>Test printing.</li>
</ol>
<p>Of course, this assumes that you have some sort of name resolution mechanism in place such as NIS, so the printer names get resolved properly. Also, your <em>/etc/nsswitch.conf</em> file has to specify that /etc/<em>hosts</em> file is the first place the server goes to when resolving names.</p>
<p>The <em>/etc/hosts</em> file entry temporarily overrides your global name resolution mechanism. This way you can create print queue with the Dell printer, but you are actually talking to the HP printer when creating the queue. You might also want to use generic network printer driver in Jetadmin. Anyways, I got that Dell printer working.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2010/03/21/jetadmin-and-non-hp-network-printers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Failed Repository Integrity Check</title>
		<link>http://www.unixpowered.com/blog/2010/02/10/failed-repository-integrity-check/</link>
		<comments>http://www.unixpowered.com/blog/2010/02/10/failed-repository-integrity-check/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 14:54:38 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[smf]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris tips]]></category>

		<guid isPermaLink="false">http://www.unixpowered.com/blog/?p=418</guid>
		<description><![CDATA[Last week I was presented with the following error on one of the Solaris 10 boxes:
svc.configd: smf(5) database integrity check of:
 /etc/svc/repository.db
 failed.  The database might be damaged or a media error might have
prevented it from being verified.  Additional information useful to
your service provider is in:
 /etc/svc/volatile/db_errors
 The system will not be able [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I was presented with the following error on one of the Solaris 10 boxes:</p>
<p><code>svc.configd: smf(5) database integrity check of:</code></p>
<p><code> /etc/svc/repository.db</code></p>
<p><code> failed.  The database might be damaged or a media error might have<br />
prevented it from being verified.  Additional information useful to<br />
your service provider is in:</code></p>
<p><code> /etc/svc/volatile/db_errors</code></p>
<p><code> The system will not be able to boot until you have restored a working<br />
database.  svc.startd(1M) will provide a sulogin(1M) prompt for recovery<br />
purposes.  The command:</code></p>
<p><code> /lib/svc/bin/restore_repository</code></p>
<p><code> can be run to restore a backup version of your repository.  See<br />
http://sun.com/msg/SMF-8000-MY for more information.</code></p>
<p>Having never seen this error, I was thinking: &#8220;this is gonna be interesting&#8230;&#8221;. Thankfully the error was pretty verbose so I started to disect it section by section. Yeah, service repository got hosed, somehow, and I can potentially find some usefull info in <em>/etc/svc/volatile/db_errors</em>. Unfortunatelly, there was nothing of use in there.</p>
<p>The <em>restore_repository</em> script mentioned gave me little more hope. I also went and checked out the page URL. After reading the page I decided to go ahead and try to restore the service repository.</p>
<p>I logged in to the box in single user mode and took a look at the restore script to get an idea of what it might do. Then, I ran it. Fortunatelly, the script was pretty good at doing checks and told me that I can not proceed any further because <em>/</em> filesystem is mounted <em>RO</em>. To fix this I was asked to run:</p>
<p><code>bash-3.00# <strong>/lib/svc/method/fs-root</strong><br />
bash-3.00# <strong>/lib/svc/method/fs-usr</strong></code></p>
<p>Once the filesystems were fixed up I ran the <em>restore_repository</em> script. I was asked which backup copy I wanted to restore and that was it. The system rebooted and came back up fine. This turned out to be a pretty good learning experience and <a title="Repository Integrity Check Failed" href="http://www.sun.com/msg/SMF-8000-MY" target="_self">http://www.sun.com/msg/SMF-8000-MY</a> is very well worth reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2010/02/10/failed-repository-integrity-check/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick and dirty SVM cheatsheet</title>
		<link>http://www.unixpowered.com/blog/2009/12/03/quick-and-dirty-svm-cheatsheet/</link>
		<comments>http://www.unixpowered.com/blog/2009/12/03/quick-and-dirty-svm-cheatsheet/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 12:50:43 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris utilities]]></category>
		<category><![CDATA[solaris volume manager]]></category>
		<category><![CDATA[storage]]></category>

		<guid isPermaLink="false">http://www.unixpowered.com/blog/?p=372</guid>
		<description><![CDATA[This list focuses mostly on mirror operations. I use Solaris Volume Manager quite a bit when mirroring internal drives. There are tons of additional features and commands, if you use SVM for  things other than mirroring. In that case you might want to look at check out Solaris Volume Manager Administration Guide.
Create database replicas:
metadb -f [...]]]></description>
			<content:encoded><![CDATA[<p>This list focuses mostly on mirror operations. I use Solaris Volume Manager quite a bit when mirroring internal drives. There are tons of additional features and commands, if you use SVM for  things other than mirroring. In that case you might want to look at check out <a title="Solaris Volume Manager Administration Guide" href="http://docs.sun.com/app/docs/doc/816-4520?l=en" target="_self">Solaris Volume Manager Administration Guide</a>.</p>
<p>Create database replicas:<br />
<code>metadb -f -a -c [number_of_replicas] [device]<br />
<strong>metadb -f -a -c 3 c0t0d0s7</strong></code></p>
<p>Delete all database replicas from device:<br />
<code>metadb -d [device]<br />
<strong>metadb -d c0t0d0s7</strong></code></p>
<p>Display status of database replicas:<br />
<code>metadb -i<br />
<strong>metadb -i</strong></code></p>
<p>Display metadevice status:<br />
<code>metastat<br />
<strong>metastat</strong></code></p>
<p>Create simple concat/stripe metadevice:<br />
<code>metainit -f [concat_metadevice] 1 1 [device]<br />
<strong>metainit -f d21 1 1 c0t0d0s1</strong></code></p>
<p>Create a mirror with one submirror:<br />
<code>metainit [mirror_metadevice] -m [submirror_metadevice]<br />
<strong>metainit d20 -m d21</strong></code></p>
<p>Attach a submirror to one sided mirror:<br />
<code>metattach [mirror_metadevice] [submirror_metadevice]<br />
<strong>metattach d20 d22</strong></code></p>
<p>Detach a submirror from a mirror:<br />
<code>metadetach [mirror_metadevice] [submirror_metadevice]<br />
<strong>metadetach d20 d22</strong></code></p>
<p>Clear a metadevice:<br />
<code>metaclear [metadevice]<br />
<strong>metaclear d22</strong></code></p>
<p>Offline a submirror:<br />
<code>metaoffline [mirror_metadevice] [submirror_metadevice]<br />
<strong>metaoffline d20 d22</strong></code></p>
<p>Online a submirror:<br />
<code>metaonline [mirror_metadevice] [submirror_metadevice]<br />
<strong>metaonline d20 d22</strong></code></p>
<p>Enable a failed component:<br />
<code>metareplace -e [metadevice] [device]<br />
<strong>metareplace -e d21 c0t0d0s1</strong></code></p>
<p>Rename a metadevice:<br />
<code>metarename [old_metadevice] [new_metadevice]<br />
<strong>metarename d20 d30</strong></code></p>
<p>Switch metadevice names:<br />
<code>metarename [metadevice_1] [metadevice_2]<br />
<strong>metarename -x d20 d30</strong></code></p>
<p>Configure system for root metadevice:<br />
<code>metaroot [metadevice]<br />
<strong>metaroot d10</strong></code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2009/12/03/quick-and-dirty-svm-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Moving Solaris Container to a different host</title>
		<link>http://www.unixpowered.com/blog/2009/11/05/moving-solaris-container-to-a-different-host/</link>
		<comments>http://www.unixpowered.com/blog/2009/11/05/moving-solaris-container-to-a-different-host/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 16:56:45 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris containers]]></category>
		<category><![CDATA[solaris tips]]></category>
		<category><![CDATA[solaris zones]]></category>

		<guid isPermaLink="false">http://wayciak.wordpress.com/?p=337</guid>
		<description><![CDATA[Cloning Solaris Container is pretty straight forward. But what if you want to have an identical container on another host? In a nutshell:

Make a clone of an existing container on host A
Detach the clone
Compress it and move it to host B
Create configuration for the moved container
Decompress the container on host B
Attach the decompressed container

I have [...]]]></description>
			<content:encoded><![CDATA[<p>Cloning Solaris Container is pretty straight forward. But what if you want to have an identical container on another host? In a nutshell:</p>
<ol>
<li>Make a <a title="Cloning Solaris Container" href="/index.php/archives/2009/08/10/cloning-solaris-container/" target="_blank">clone</a> of an existing container on host A</li>
<li>Detach the clone</li>
<li>Compress it and move it to host B</li>
<li>Create configuration for the moved container</li>
<li>Decompress the container on host B</li>
<li>Attach the decompressed container</li>
</ol>
<p>I have done this on Solaris 10 8/07. Before going any further, it is important that both host <em>A</em> and host <em>B</em> are running the same release of Solaris and they are both at the same patch level. Otherwise, you will almost certainly run into a situation where the container will refuse to attach to the new host.</p>
<p>I have created a cloned container called <em>mx2</em>. First, I have detached the container:</p>
<p><code>bash-3.00# <strong>zoneadm -z mx2 detach</strong></code></p>
<p>Then I compressed the container directory so I could move it to host <em>B</em>. It does not really matter which tool you use to compress the directory. Just make sure you preserve permissions, ownership or ACL&#8217;s . For me, for some reason <em>tar</em> had a little of an ordeal compressing the container directory:</p>
<p><code>bash-3.00# <strong>cd /export/home/zones</strong><br />
bash-3.00# <strong>tar cf mx2.tar mx2</strong><br />
tar: mx2/root/usr/jdk/instances/jdk1.5.0/jre/lib/sparc/cpu/sparcv9+vis/sparcv9/libclib_jiio.so: symbolic link too long<br />
tar: mx2/root/usr/jdk/instances/jdk1.5.0/jre/lib/sparc/cpu/sparcv9+vis2/sparcv9/libclib_jiio.so: symbolic link too long</code></p>
<p>Once I had the directory compressed I <em>scp</em>-ied it to host <em>B</em>. Then I decompressed it in the zones directory:</p>
<p><code><strong>bash-3.00# <strong>cd /export/home/zones</strong><br />
bash-3.00# <strong>tar xf mx2.tar</strong></strong></code></p>
<p>I have recreated the problematic symlinks mentioned above manually. If you are having trouble attaching the container check that container configurations are the same on both systems.</p>
<p>Before you can attach a container, you need to have container configuration in place. Without it you will not be able to attach the container.</p>
<p>Make sure your configuration is correct. I was attaching full root container and the system was complaining that the container being attached is missing some packages. In reality, my container configuration was for sparse root container. It turned out that when I was importing container configuration, some <em>inherit-package-dir</em> statements were added which has caused attach operation to fail. I had to remove those manually.</p>
<p>So, again, before attaching the container make sure your container configuration is good, you are inheriting correct package directories, etc. Once you have that right, you can attach the new container:</p>
<p><code>bash-3.00# <strong>zoneadm -z mx2 attach</strong></code></p>
<p>That&#8217;s it. Depending on your needs you might want to change hostname, ip address and so on.</p>
<p>Some interesting linkage:</p>
<p><a title="Solaris Containers replication" href="http://opensolaris.org/jive/thread.jspa?messageID=182046" target="_self">Solaris Containers replication</a><strong><strong><br />
</strong></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2009/11/05/moving-solaris-container-to-a-different-host/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mounting Linux NFS share: Not owner</title>
		<link>http://www.unixpowered.com/blog/2009/10/11/mounting-linux-nfs-share-not-owner/</link>
		<comments>http://www.unixpowered.com/blog/2009/10/11/mounting-linux-nfs-share-not-owner/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 12:03:22 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[centos]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linux tips]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris tips]]></category>

		<guid isPermaLink="false">http://www.unixpowered.com/blog/?p=365</guid>
		<description><![CDATA[I was trying to mount a RHEL 4 NFS share in Solaris 10. But for whatever reason I just could not seem to get it mounted. It would always come back with &#8220;Not owner&#8221; error:
bash-3.00# mount -F nfs carbon:/media/cdrecorder /mnt/carbon
nfs mount: mount: /mnt/carbon: Not owner
So, I checked and rechecked my settings with no success. Then, [...]]]></description>
			<content:encoded><![CDATA[<p>I was trying to mount a <acronym title="Red Hat Enterprise Linux 4">RHEL 4</acronym> NFS share in Solaris 10. But for whatever reason I just could not seem to get it mounted. It would always come back with <em>&#8220;Not owner&#8221;</em> error:</p>
<p><code>bash-3.00# <strong>mount -F nfs carbon:/media/cdrecorder /mnt/carbon</strong><br />
nfs mount: mount: /mnt/carbon: Not owner</code></p>
<p>So, I checked and rechecked my settings with no success. Then, I remembered reading something somewhere about NFS v4 in Linux being not so great at one time. Since the Linux box was running RHEL 4 I tought  this might be my problem. So, I decided to force mount using NFS v3, since Solaris 10 will try to mount the Linux share using NFS v4 first.</p>
<p><code>bash-3.00# <strong>mount -F nfs -o vers=3 carbon:/media/cdrecorder /mnt/carbon</strong><br />
bash-3.00# <strong>cd /mnt/carbon</strong><br />
bash-3.00# </code></p>
<p>That worked well. Since this was one time mounting job, I did not bother any further. If I would be doing this on regular basis I would probably edit <em>/etc/default/nfs</em> on the Solaris box and force maximum NFS client version to be v3.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2009/10/11/mounting-linux-nfs-share-not-owner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Weird disk label after using ZFS on a LUN</title>
		<link>http://www.unixpowered.com/blog/2009/10/04/weird-disk-label-after-using-zfs-on-a-lun/</link>
		<comments>http://www.unixpowered.com/blog/2009/10/04/weird-disk-label-after-using-zfs-on-a-lun/#comments</comments>
		<pubDate>Sun, 04 Oct 2009 15:42:49 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris tips]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://www.unixpowered.com/blog/?p=352</guid>
		<description><![CDATA[If you ever used ZFS on a LUN and then tried to reuse that LUN for UFS you might have noticed a &#8220;weird&#8221; disk label on it. This is known as EFI label.
Here is how it looks in format command:
partition&#62; p
Current partition table (original):
Total disk sectors available: 73383902 + 16384 (reserved sectors)
Part    [...]]]></description>
			<content:encoded><![CDATA[<p>If you ever used ZFS on a LUN and then tried to reuse that LUN for UFS you might have noticed a &#8220;weird&#8221; disk label on it. This is known as EFI label.</p>
<p>Here is how it looks in <em>format</em> command:</p>
<p><code>partition&gt; <strong>p</strong><br />
Current partition table (original):<br />
Total disk sectors available: 73383902 + 16384 (reserved sectors)</code></p>
<p><code>Part      Tag    Flag     First Sector        Size        Last Sector<br />
0        usr    wm                34      34.99GB         73383902<br />
1 unassigned    wm                 0          0              0<br />
2 unassigned    wm                 0          0              0<br />
3 unassigned    wm                 0          0              0<br />
4 unassigned    wm                 0          0              0<br />
5 unassigned    wm                 0          0              0<br />
6 unassigned    wm                 0          0              0<br />
8   reserved    wm          73383903       8.00MB         73400286</code></p>
<p>If you use straight <em>format</em> command there is no way to get rid of EFI label. Instead, you have to use <em>-e</em> option with <em>format</em> to get to expert features:</p>
<p><code>bash-3.00# <strong>format -e</strong></code></p>
<p>With <em>-e</em> options when you label the LUN you will be asked about the type of label you want to put on the disk:</p>
<p><code>format&gt; <strong>label</strong><br />
[0] SMI Label<br />
[1] EFI Label<br />
Specify Label type[1]: <strong>0</strong><br />
Warning: This disk has an EFI label. Changing to SMI label will erase all<br />
current partitions.<br />
Continue? y<br />
Auto configuration via format.dat[no]? <strong>yes</strong></code></p>
<p>I suppose you could alternatively use <em>dd</em> command and blank out the whole disk.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2009/10/04/weird-disk-label-after-using-zfs-on-a-lun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Corrupt superblock, now what?</title>
		<link>http://www.unixpowered.com/blog/2009/09/17/corrupt-superblock-now-what/</link>
		<comments>http://www.unixpowered.com/blog/2009/09/17/corrupt-superblock-now-what/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 19:41:54 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[solaris]]></category>
		<category><![CDATA[solaris tips]]></category>
		<category><![CDATA[solaris utilities]]></category>

		<guid isPermaLink="false">http://wayciak.wordpress.com/?p=283</guid>
		<description><![CDATA[This is an oldie, but a goodie. For some reason I was asked about it 3 times in a span of a week. Suppose your system was not shut down cleanly and it refuses to come up. During bootup fsck refuses to run, complaining about corrupt superblock. So, what do you do? First, get the [...]]]></description>
			<content:encoded><![CDATA[<p>This is an oldie, but a goodie. For some reason I was asked about it 3 times in a span of a week. Suppose your system was not shut down cleanly and it refuses to come up. During bootup <em>fsck</em> refuses to run, complaining about corrupt superblock. So, what do you do? First, get the alternate superblock locations and then run fsck using one of the alternate superblocks.</p>
<p>To get alternate superblock locations do:</p>
<p><strong><code>newfs -Nv /dev/rdsk/c0t0d0s3</code></strong></p>
<p>This will not actually format the slice. It will only print what it would do, if it was actually formating the slice. Basically, it is <em>newfs</em> dry run. It will also give you locations of alternate superblocks on the slice. I guess it should be mentioned that if you used non-default values while formating the slice originally, and you did not make a note of those values, this might not give you valid superblock numbers.</p>
<p>After you have your alternate superblock numbers you can use them to help out fsck (in this case superblock I am using is in block 8192):</p>
<p><strong><code>fsck -y -F ufs -o b=8192 /dev/rdsk/c0t0d0s3</code></strong></p>
<p>It might not hurt to run the above with <em>-n</em> option instead of <em>-y</em> to make sure it produces the results you are looking for.</p>
<p>Hopefully, the filesystem is not hosed so badly that it can not be repaired. This was more of an issue when Solaris did not have ufs logging. Nevertheless, it does not hurt to know this for one of those emergencies.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2009/09/17/corrupt-superblock-now-what/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
