<?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 tips</title>
	<atom:link href="http://www.unixpowered.com/blog/category/solaris-tips/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>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>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>
		<item>
		<title>Cloning Solaris Container</title>
		<link>http://www.unixpowered.com/blog/2009/08/10/cloning-solaris-container/</link>
		<comments>http://www.unixpowered.com/blog/2009/08/10/cloning-solaris-container/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 19:23:33 +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=323</guid>
		<description><![CDATA[There are two way to create a new container: create one from scratch, which takes a little while or you can clone an existing container. Cloning is quite faster than the actual creation so it is handy to have a &#8220;gold&#8221; master container which is used for cloning. Another reason for having a &#8220;gold&#8221; master [...]]]></description>
			<content:encoded><![CDATA[<p>There are two way to create a new container: create one from scratch, which takes a little while or you can clone an existing container. Cloning is quite faster than the actual creation so it is handy to have a &#8220;gold&#8221; master container which is used for cloning. Another reason for having a &#8220;gold&#8221; master container is the fact that the container from which you are making a clone has to be halted during cloning. I did this on Solaris 10 8/07 release. Cloning consists of the following:</p>
<ol>
<li>Export configuration of an existing container or create a new configuration from scratch</li>
<li>Customize the exported configuration for the new container</li>
<li>Import the new container configuration</li>
<li>Clone the &#8220;gold&#8221; master container</li>
<li>Configure the new container</li>
</ol>
<p>First you need configuration for the new container. You can either make one from scratch or export one from existing container and customize it.<br />
The following command will export the configuration from  &#8220;gold&#8221; master container and save it into <em>/tmp/mx1.cfg</em> file:<br />
<code><br />
bash-3.00# <strong>zonecfg -z gold export -f /tmp/mx1.cfg</strong></code></p>
<p>Now you can edit the configuration. Word of caution, importing seems to be a little flaky. For example, if an existing container has <em>bootargs</em> variable set, you will need to put quotes around them in the config file. So, if my <em>bootargs</em> are set to <em>-m verbose</em>, the string will have to be enclosed in <em>&#8220;&#8221;</em>. Otherwise the new container configuration will not be imported properly.</p>
<p>Once you have the configuration ready you can import it:<br />
<code>bash-3.00# <strong>zonecfg -z mx1 -f /tmp/mx1.cfg</strong></code></p>
<p>Now you can perform actual clone operation:</p>
<p><code>bash-3.00# <strong>zoneadm -z mx1 clone -m copy gold</strong><br />
Cloning zonepath /export/home/zones/gold...</code></p>
<p>This should not take very long. Once the operation is done you can see that the new container has been installed:</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 />
- mx1              installed   /export/home/zones/mx1         native   shared<br />
- gold             installed  /export/home/zones/gold        native   shared</code></p>
<p>At this point you can boot the new container. You will be taken through <a title="Performing the Initial Internal Zone Configuration" href="http://docs.sun.com/app/docs/doc/817-1592/z.login.task-31?a=view" target="_self">initial configuration</a> of the container. This initial container configuration can be pain if you are rolling out a lot of containers. You can simplify the process by creating a <a title="sysidcfg man page" href="http://docs.sun.com/app/docs/doc/816-5174/sysidcfg-4?a=view" target="_self"><em>sysidcfg</em></a> file and putting it into <em>/etc</em> directory of the container before performing the first boot.</p>
<p>In my case I would put the following <em>sysidcfg</em> into <em>/export/home/zones/mx1/root/etc</em>:</p>
<p><code>system_locale=C<br />
terminal=vt100<br />
network_interface=primary {<br />
hostname=mx1<br />
}<br />
security_policy=NONE<br />
name_service=DNS {<br />
domain_name=example.com<br />
name_server=192.168.1.1<br />
search=example.com<br />
}<br />
nfs4_domain=dynamic<br />
timezone=US/Central<br />
root_password=n2GSHfh</code></p>
<p>The nice thing about cloning is the fact that it&#8217;s fairly quick. So if you hose up a container, you can simply run</p>
<p><code>bash-3.00# <strong>zoneadm -z mx1 uninstall</strong><br />
Are you sure you want to uninstall zone mx1 (y/[n])? y</code></p>
<p>followed by</p>
<p><code>bash-3.00# <strong>zonecfg -z  mx1 delete</strong><br />
Are you sure you want to delete zone mx1 (y/[n])? y</code></p>
<p>and start all over again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2009/08/10/cloning-solaris-container/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to get HP Jetadmin working inside Solaris Container</title>
		<link>http://www.unixpowered.com/blog/2009/07/07/how-to-get-hp-jetadmin-working-inside-solaris-container/</link>
		<comments>http://www.unixpowered.com/blog/2009/07/07/how-to-get-hp-jetadmin-working-inside-solaris-container/#comments</comments>
		<pubDate>Tue, 07 Jul 2009 18:57:42 +0000</pubDate>
		<dc:creator>somedude</dc:creator>
				<category><![CDATA[hp jetadmin]]></category>
		<category><![CDATA[hp jetdirect]]></category>
		<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=304</guid>
		<description><![CDATA[I needed to build a print server and I had to use HP Jetadmin. I also wanted to use the Containers technology for the job. Here are few things I found out in the process. This was done on Solaris 10 08/07 and Jetadmin version E.10.34.
I did a little bit of searching, and all I [...]]]></description>
			<content:encoded><![CDATA[<p>I needed to build a print server and I had to use HP Jetadmin. I also wanted to use the <a title="Solaris Containers" href="http://www.sun.com/software/solaris/virtualization.jsp" target="_self">Containers</a> technology for the job. Here are few things I found out in the process. This was done on Solaris 10 08/07 and Jetadmin version E.10.34.</p>
<p>I did a little bit of searching, and all I found were conflicting reports: it should work, it does not work, it works, but not really&#8230;</p>
<p>First of all the container that will host Jetadmin has to be full-root, as Jetadmin install will put some files into <em>/usr/spool</em>. I suppose it would be possible to work around it and use sparse-root, even though it might be a little messy.</p>
<p>The problem I ran into was while creating print queues using <em>hppi</em> tool. During the process <em>mknod</em> command is called to create printer device file in <em>/dev</em> directory of the container. You can not use mknod inside a container and creation of the device file will fail. Sure enough, greping for <em>mknod</em> in Jetadmin&#8217;s <em>admin</em> directory yields the following:</p>
<p><code>bash-3.00$ <strong>grep mknod *</strong><br />
addptrtoq:         mknod $DFILE c 13 2</code></p>
<p>Closer look at <em>addptrtoq</em> reveals the following:</p>
<p><code>HPNPMODEL=$HPNP/sh/hpnp.model<br />
#DFILE=$HPNP/etc/$SPOOLNAME<br />
DFILE=/dev/$SPOOLNAME<br />
if [ ! -c $DFILE ]<br />
then<br />
mknod $DFILE c 13 2<br />
fi<br />
chmod 666 $DFILE</code></p>
<p>So to get around the problem, first you manually have to create the special file in the global zone inside <em>/dev</em> directory of the print server container. Then you can proceed with installing the printqueue using <em>hppi</em> tool.</p>
<p><code>bash-3.00# <strong>cd /export/home/zones/prtsvr/dev/</strong><br />
bash-3.00# <strong>mknod laser c 13 2</strong><br />
bash-3.00# <strong>chmod 666 laser</strong></code></p>
<p>Now you should be able to add a printer queue without any problems. So Jetadmin works just fine inside Solaris 10 Container. For me, anyways&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.unixpowered.com/blog/2009/07/07/how-to-get-hp-jetadmin-working-inside-solaris-container/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 -->
