<?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>Hacktopia &#187; Solaris Sparc</title>
	<atom:link href="http://www.hacktopia.net/wp/category/solaris-sparc/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.hacktopia.net/wp</link>
	<description>The zen of hacking</description>
	<lastBuildDate>Thu, 26 Jan 2012 17:35:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to mirror ZFS root disk on a sparc system.</title>
		<link>http://www.hacktopia.net/wp/how-to-mirror-zfs-root-disk-on-a-sparc-system/</link>
		<comments>http://www.hacktopia.net/wp/how-to-mirror-zfs-root-disk-on-a-sparc-system/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 18:43:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Solaris Sparc]]></category>

		<guid isPermaLink="false">http://www.hacktopia.net/wp/?p=121</guid>
		<description><![CDATA[First we look to see that everything looks good on our current drive that we are booted off of.  I would also like to note that there is no UFS on this system at all.  We are booting entirely off of the ZFS pool rpool. # zpool status pool: rpool state: ONLINE scrub: none requested [...]]]></description>
			<content:encoded><![CDATA[<p>First we look to see that everything looks good on our current drive that we are booted off of.  I would also like to note that there is no UFS on this system at all.  We are booting entirely off of the ZFS pool rpool.</p>
<blockquote><p># zpool status<br />
pool: rpool<br />
state: ONLINE<br />
scrub: none requested<br />
config:</p>
<p>NAME        STATE     READ WRITE CKSUM<br />
rpool       ONLINE       0     0     0<br />
c0t0d0s0  ONLINE       0     0     0</p>
<p>errors: No known data errors</p></blockquote>
<p>Now verify that the two disks that you want to mirror looks the same at the slave level.</p>
<blockquote><p># format<br />
Searching for disks&#8230;done</p>
<p>AVAILABLE DISK SELECTIONS:<br />
0. c0t0d0 &lt;ST320011A cyl 38790 alt 2 hd 16 sec 63&gt;<br />
/pci@1f,0/ide@d/dad@0,0<br />
1. c0t2d0 &lt;DEFAULT cyl 38790 alt 2 hd 16 sec 63&gt;<br />
/pci@1f,0/ide@d/dad@2,0<br />
Specify disk (enter its number): 0<br />
selecting c0t0d0<br />
[disk formatted, no defect list found]<br />
/dev/dsk/c0t0d0s0 is part of active ZFS pool rpool. Please see zpool(1M).<br />
/dev/dsk/c0t0d0s2 is part of active ZFS pool rpool. Please see zpool(1M).</p>
<p>FORMAT MENU:<br />
disk       &#8211; select a disk<br />
type       &#8211; select (define) a disk type<br />
partition  &#8211; select (define) a partition table<br />
current    &#8211; describe the current disk<br />
format     &#8211; format and analyze the disk<br />
repair     &#8211; repair a defective sector<br />
show       &#8211; translate a disk address<br />
label      &#8211; write label to the disk<br />
analyze    &#8211; surface analysis<br />
defect     &#8211; defect list management<br />
backup     &#8211; search for backup labels<br />
verify     &#8211; read and display labels<br />
save       &#8211; save new disk/partition definitions<br />
volname    &#8211; set 8-character volume name<br />
!&lt;cmd&gt;     &#8211; execute &lt;cmd&gt;, then return<br />
quit<br />
format&gt; ver</p>
<p>Primary label contents:</p>
<p>Volume name = &lt;        &gt;<br />
ascii name  = &lt;ST320011A cyl 38790 alt 2 hd 16 sec 63&gt;<br />
pcyl        = 38792<br />
ncyl        = 38790<br />
acyl        =    2<br />
nhead       =   16<br />
nsect       =   63<br />
Part      Tag    Flag     Cylinders         Size            Blocks<br />
0       root    wm       0 &#8211; 38789       18.64GB    (38790/0/0) 39100320<br />
1 unassigned    wm       0                0         (0/0/0)            0<br />
2     backup    wm       0 &#8211; 38789       18.64GB    (38790/0/0) 39100320<br />
3 unassigned    wm       0                0         (0/0/0)            0<br />
4 unassigned    wm       0                0         (0/0/0)            0<br />
5 unassigned    wm       0                0         (0/0/0)            0<br />
6 unassigned    wm       0                0         (0/0/0)            0<br />
7 unassigned    wm       0                0         (0/0/0)            0</p>
<p>format&gt; disk 1<br />
selecting c0t2d0<br />
[disk formatted, no defect list found]<br />
format&gt;</p></blockquote>
<p>Notice that both disks have 0 &#8211; 38789 Cylinders.  So the disks look good, now we can attach the second disk.</p>
<blockquote><p># zpool attach rpool c0t0d0s0 c0t2d0s0<br />
#<br />
# zpool status<br />
pool: rpool<br />
state: ONLINE<br />
status: One or more devices is currently being resilvered.  The pool will<br />
continue to function, possibly in a degraded state.<br />
action: Wait for the resilver to complete.<br />
scrub: resilver in progress for 0h0m, 3.28% done, 0h24m to go<br />
config:</p>
<p>NAME          STATE     READ WRITE CKSUM<br />
rpool         ONLINE       0     0     0<br />
mirror      ONLINE       0     0     0<br />
c0t0d0s0  ONLINE       0     0     0<br />
c0t2d0s0  ONLINE       0     0     0</p>
<p>errors: No known data errors</p></blockquote>
<p>WoW that was easy to mirror two disks with ZFS.  No need to set up data stores or anything like that.  The fact that the zpool status output specify &#8220;mirror&#8221; means the disks are mirrored and not striped.  If you have multiple zfs pools you can specify zpool status POOLNAME.</p>
<p>Now to try to distroy the disk, ha, ha, ha!</p>
<blockquote><p># dd if=/dev/random of=/dev/rdsk/c0t2d0s0<br />
969+0 records in<br />
969+0 records out</p></blockquote>
<p>Now if that disk was on a normal RAID utility stuch as solstice disk suite SDS or even hardware raid then both disks would be destroyed because they operate at the block level, and will copy the random blocks back do c0t0d0s0</p>
<blockquote><p># zpool status<br />
pool: rpool<br />
state: DEGRADED<br />
status: One or more devices could not be opened.  Sufficient replicas exist for<br />
the pool to continue functioning in a degraded state.<br />
action: Attach the missing device and online it using &#8216;zpool online&#8217;.<br />
see: http://www.sun.com/msg/ZFS-8000-2Q<br />
scrub: resilver in progress for 0h1m, 10.52% done, 0h12m to go<br />
config:</p>
<p>NAME          STATE     READ WRITE CKSUM<br />
rpool         DEGRADED     0     0     0<br />
mirror      DEGRADED     0     0     0<br />
c0t0d0s0  ONLINE       0     0     0<br />
c0t2d0s0  UNAVAIL      0     0     0  cannot open</p>
<p>errors: No known data errors</p></blockquote>
<p>Oha happy ZFS is already working on fixing or resilvering the disk that was written to with random data.</p>
<blockquote><p># zpool status<br />
pool: rpool<br />
state: DEGRADED<br />
status: One or more devices could not be opened.  Sufficient replicas exist for<br />
the pool to continue functioning in a degraded state.<br />
action: Attach the missing device and online it using &#8216;zpool online&#8217;.<br />
see: http://www.sun.com/msg/ZFS-8000-2Q<br />
scrub: resilver completed after 0h0m with 0 errors on Tue Apr 14 12:55:48 2009<br />
config:</p>
<p>NAME          STATE     READ WRITE CKSUM<br />
rpool         DEGRADED     0     0     0<br />
mirror      DEGRADED     0     0     0<br />
c0t0d0s0  ONLINE       0     0     0<br />
c0t2d0s0  UNAVAIL      0     0     0  cannot open</p>
<p>errors: No known data errors</p></blockquote>
<p>Now ZFS is angry because we wrote random data to the disk.</p>
<blockquote><p># zpool online  rpool  c0t2d0s0</p>
<p># installboot -F zfs /usr/platform/`uname -i`/lib/fs/zfs/bootblk /dev/rdsk/c0t2d0s0</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.hacktopia.net/wp/how-to-mirror-zfs-root-disk-on-a-sparc-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SDS (Solstice DiskSuite) Replacing a failed disk</title>
		<link>http://www.hacktopia.net/wp/sds-solstice-disksuite-replacing-a-failed-disk/</link>
		<comments>http://www.hacktopia.net/wp/sds-solstice-disksuite-replacing-a-failed-disk/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 22:16:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Soalris X86]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Solaris 10]]></category>
		<category><![CDATA[Solaris Sparc]]></category>
		<category><![CDATA[Veritas Volume Manager]]></category>

		<guid isPermaLink="false">http://www.hacktopia.net/wp/?p=35</guid>
		<description><![CDATA[1. Detach each submirror ex. metadetach -f d0 d20 d0: submirror d20 is detached 2. Clear each submirror ex. metaclear d20 d20: Concat/Stripe is cleared 3. Delete the db replica on the failed drive (you can find the replica output by issuing metadb command with no arguments): ex. metadb -d c0t2d0s7 4. Remove failed drive. [...]]]></description>
			<content:encoded><![CDATA[<p>1. Detach each submirror</p>
<p>ex.  metadetach -f d0 d20<br />
d0: submirror d20 is detached</p>
<p>2.  Clear each submirror</p>
<p>ex.  metaclear d20<br />
d20: Concat/Stripe is cleared</p>
<p>3.  Delete the db replica on the failed drive (you can find the replica output by issuing metadb command with no arguments):</p>
<p>ex.  metadb -d c0t2d0s7</p>
<p>4.  Remove failed drive. Replace with new drive.</p>
<p>5.  Run the format command and place the correct partition table, using the layout of the non-replaced drive.</p>
<p>6. re-create the metadb replica on the new disk</p>
<p>ex.  metadb -a c0t2d0s7</p>
<p>7. Run metainit for each replaced submirror</p>
<p>ex. metainit d21 1 1 c0t2d0s1<br />
d21: Concat/Stripe is setup</p>
<p>8.  Run metattach for each submirror</p>
<p>ex. metattach d0 d20<br />
d0: submirror d20 is attached</p>
<p>ex. metattach d1 d21<br />
d1: submirror d21 is attached</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hacktopia.net/wp/sds-solstice-disksuite-replacing-a-failed-disk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to manually set Solaris network interface Speed and Duplex</title>
		<link>http://www.hacktopia.net/wp/how-to-manually-set-solaris-network-interface-speed-and-duplex/</link>
		<comments>http://www.hacktopia.net/wp/how-to-manually-set-solaris-network-interface-speed-and-duplex/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 15:12:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Soalris X86]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Solaris Sparc]]></category>

		<guid isPermaLink="false">http://www.hacktopia.net/wp/?p=36</guid>
		<description><![CDATA[If you want to set the nic speed and duplex of a Solaris machine you need to basically set up a script that wil be run at start up in one of the run levels preferably /etc/rc2.d/ /etc/rc2.d/S70ndd 1000 full duplex autoneg #!/sbin/sh # PATH=/sbin:/usr/bin:/usr/sbin echo &#8220;Configuring Network Interfaces&#8221; interface=bge0 case &#8220;$1&#8243; in # Example [...]]]></description>
			<content:encoded><![CDATA[<p>If you want to set the nic speed and duplex of a Solaris machine you need to basically set up a script that wil be run at start up in one of the run levels preferably /etc/rc2.d/</p>
<p>/etc/rc2.d/S70ndd</p>
<p>1000 full duplex autoneg</p>
<p>#!/sbin/sh<br />
#<br />
PATH=/sbin:/usr/bin:/usr/sbin</p>
<p>echo &#8220;Configuring Network Interfaces&#8221;<br />
interface=bge0<br />
case &#8220;$1&#8243; in<br />
# Example setting Gigabit Ethernet to Auto Negotiate<br />
&#8216;start&#8217;)<br />
ndd -set /dev/$interface adv_1000fdx_cap 1<br />
ndd -set /dev/$interface adv_1000hdx_cap 0<br />
ndd -set /dev/$interface adv_100fdx_cap 0<br />
ndd -set /dev/$interface adv_100hdx_cap 0<br />
ndd -set /dev/$interface adv_10fdx_cap 0<br />
ndd -set /dev/$interface adv_10hdx_cap 0<br />
ndd -set /dev/$interface adv_autoneg_cap 1<br />
;;<br />
esac<br />
exit 0_cap 0</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hacktopia.net/wp/how-to-manually-set-solaris-network-interface-speed-and-duplex/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Having trouble unmounting a file system in Unix</title>
		<link>http://www.hacktopia.net/wp/having-trouble-unmounting-a-file-system-in-unix/</link>
		<comments>http://www.hacktopia.net/wp/having-trouble-unmounting-a-file-system-in-unix/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 15:11:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Soalris X86]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Solaris Sparc]]></category>

		<guid isPermaLink="false">http://www.hacktopia.net/wp/?p=39</guid>
		<description><![CDATA[So you are trying to unmount a file system for some reason and it just wont let you. It keeps on telling you that it is busy. Whats the deal. You already cd to / so you are not the culprit. So instead of kicking everyone off the box just figure out who the offender [...]]]></description>
			<content:encoded><![CDATA[<p>So you are trying to unmount a file system for some reason and it just wont let you.  It keeps on telling you that it is busy.  Whats the deal.  You already cd to / so you are not the culprit.  So instead of kicking everyone off the box just figure out who the offender is and yell at them.</p>
<p>Excerpt from /var/adm/messages</p>
<blockquote><p>6 server05 mount[4691]: [ID 612810 user.error] mount: /www: Device busy<br />
Feb  5 07:41:19 server05 mount[4708]: [ID 612810 user.error] mount: /www: Device busy<br />
Feb  5 07:41:43 server05 mount[4717]: [ID 612810 user.error] mount: /www: Device busy<br />
Feb  5 07:43:30 server05 mount[4949]: [ID 612810 user.error] mount: /www: Device busy<br />
Feb  5 07:49:55 server05 mount[5273]: [ID 612810 user.error] mount: /www: Device busy<br />
Feb  5 07:53:39 server05 mount[5656]: [ID 612810 user.error] mount: /www: Device busy<br />
Feb  5 07:54:31 server05 mount[5713]: [ID 612810 user.error] mount: /www: Device busy</p></blockquote>
<p>use fuser to identify the process that is causing the trouble.</p>
<blockquote><p>server05% fuser /www<br />
/www:     4053c</p></blockquote>
<blockquote><p>server05% ps -ef | grep 4053<br />
abe    4061  4053  0 07:27:20 pts/3    0:00 less access<br />
abe    4053  4031  0 07:26:50 pts/3    0:00 bash<br />
abe    4075  4053  0 07:28:05 pts/3    0:00 less access<br />
abe    4067  4053  0 07:27:42 pts/3    0:01 less access<br />
abe    4122  4053  0 07:28:44 pts/3    0:00 more<br />
abe    4121  4053  0 07:28:44 pts/3    0:00 grep -i keep-a access<br />
louis    6983  6950  0 08:14:57 pts/1    0:00 grep 4053</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.hacktopia.net/wp/having-trouble-unmounting-a-file-system-in-unix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to change the dump directory on a soalris server</title>
		<link>http://www.hacktopia.net/wp/hwo-to-change-the-dump-directory-on-a-soalris-server/</link>
		<comments>http://www.hacktopia.net/wp/hwo-to-change-the-dump-directory-on-a-soalris-server/#comments</comments>
		<pubDate>Wed, 09 Jul 2008 14:02:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Soalris X86]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Solaris Sparc]]></category>

		<guid isPermaLink="false">http://www.hacktopia.net/wp/?p=37</guid>
		<description><![CDATA[HOW TO CHANGE THE DUMP DIRECOTRY # dumpadm -d /dev/dsk/c0t0d0s1 Dump content: kernel pages Dump device: /dev/dsk/c0t0d0s1 (dedicated) Savecore directory: /var/crash/unknown Savecore enabled: no # dumpadm -y Dump content: kernel pages Dump device: /dev/dsk/c0t0d0s1 (dedicated) Savecore directory: /var/crash/unknown Savecore enabled: yes]]></description>
			<content:encoded><![CDATA[<p>HOW TO CHANGE THE DUMP DIRECOTRY</p>
<p># dumpadm -d /dev/dsk/c0t0d0s1<br />
Dump content: kernel pages<br />
Dump device: /dev/dsk/c0t0d0s1 (dedicated)<br />
Savecore directory: /var/crash/unknown<br />
Savecore enabled: no<br />
# dumpadm -y<br />
Dump content: kernel pages<br />
Dump device: /dev/dsk/c0t0d0s1 (dedicated)<br />
Savecore directory: /var/crash/unknown<br />
Savecore enabled: yes</p>
]]></content:encoded>
			<wfw:commentRss>http://www.hacktopia.net/wp/hwo-to-change-the-dump-directory-on-a-soalris-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

