<?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>Technology, Computer, Network and Games Cheat</title>
	<atom:link href="http://www.gamescheat.ca/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gamescheat.ca</link>
	<description>Day to day technical how to - by Andrew Lin</description>
	<lastBuildDate>Fri, 06 Aug 2010 20:42:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Creating RDM to LUN (SAN) mapping on VMware ESX 4, Vcenter.</title>
		<link>http://www.gamescheat.ca/2010/08/creating-rdm-to-lun-san-mapping-on-vmware-esx-4-vcenter/</link>
		<comments>http://www.gamescheat.ca/2010/08/creating-rdm-to-lun-san-mapping-on-vmware-esx-4-vcenter/#comments</comments>
		<pubDate>Fri, 06 Aug 2010 20:42:52 +0000</pubDate>
		<dc:creator>Andrew Lin</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[VMware ESX]]></category>

		<guid isPermaLink="false">http://www.gamescheat.ca/?p=830</guid>
		<description><![CDATA[In the past I have written articles about how to create a RDM to LUN disk mapping for VMware ESX 3. http://www.gamescheat.ca/2009/10/scripts-to-automate-the-process-of-identifying-and-compiling-an-rdm-to-lun-mapping-list-for-vmware-esx-30/ and http://www.gamescheat.ca/2009/10/how-to-identify-and-compile-an-rdm-to-lun-mapping-list-for-vmware-esx-30/ The procedure to identify the path for the RDM (raw disk mapping) to LUN (disk on SAN) on Vmware ESX 4 is different from Vmware Esx 3. There are a few [...]]]></description>
			<content:encoded><![CDATA[<p>In the past I have written articles about how to create a RDM to LUN disk mapping for <a href="http://www.gamescheat.ca/2009/10/scripts-to-automate-the-process-of-identifying-and-compiling-an-rdm-to-lun-mapping-list-for-vmware-esx-30/">VMware ESX 3</a>.<br />
<a href="http://www.gamescheat.ca/2009/10/scripts-to-automate-the-process-of-identifying-and-compiling-an-rdm-to-lun-mapping-list-for-vmware-esx-30/">http://www.gamescheat.ca/2009/10/scripts-to-automate-the-process-of-identifying-and-compiling-an-rdm-to-lun-mapping-list-for-vmware-esx-30/</a> and <a href="http://www.gamescheat.ca/2009/10/how-to-identify-and-compile-an-rdm-to-lun-mapping-list-for-vmware-esx-30/">http://www.gamescheat.ca/2009/10/how-to-identify-and-compile-an-rdm-to-lun-mapping-list-for-vmware-esx-30/</a></p>
<p>The procedure to identify the path for the RDM (raw disk mapping) to LUN (disk on SAN) on Vmware ESX 4 is different from Vmware Esx 3.  There are a few more steps in version 4.  I will explain below how to determine the path for RDM to LUN in ESX 4.</p>
<p>Login to the console with root permission.</p>
<blockquote><p># find /vmfs/volumes -name **-rdm**<br />
/vmfs/volumes/4c20ca1e-d32d6ed6-96cb-001e4f3fdc36/VMware1/VMware1_1-rdmp.vmdk</p></blockquote>
<p>Find all RDM file in .vmfs/volumes. Remove -rdmp from the result and that is the path you need for the next step.</p>
<blockquote><p># vmkfstools -q /vmfs/volumes/4c20ca1e-d32d6ed6-96cb-001e4f3fdc36/VMware1/VMware1_1.vmdk<br />
Disk /vmfs/volumes/4c20ca1e-d32d6ed6-96cb-001e4f3fdc36/VMware1/VMware1_1.vmdk is a Passthrough Raw Device Mapping<br />
Maps to: vml.02000a000060060e80058c7b0000008c7b0000310b4f50454e2d56</p></blockquote>
<p>Use the vmkfstools -q command to find the vml id of the LUN, it is vml.02000a000060060e80058c7b0000008c7b0000310b4f50454e2d56.</p>
<blockquote><p># esxcfg-scsidevs -u | grep vml.02000a000060060e80058c7b0000008c7b0000310b4f50454e2d56<br />
naa.60060e80058c7b0000008c7b0000310b                            vml.02000a000060060e80058c7b0000008c7b0000310b4f50454e2d56</p></blockquote>
<p>Now use the esxcfg-scsidevs command to find the Network Addressing Authority identifier (naa) for the LUN.</p>
<blockquote><p># esxcfg-mpath -l &#8211;device=naa.60060e80058c7b0000008c7b0000310b<br />
fc.2001001b3232c093:2101001b3232c093-fc.50060e80058c7b55:50060e80058c7b55-naa.60060e80058c7b0000008c7b0000310b<br />
   Runtime Name: vmhba2:C0:T0:L10<br />
   Device: naa.60060e80058c7b0000008c7b0000310b<br />
   Device Display Name: HITACHI Fibre Channel Disk (naa.60060e80058c7b0000008c7b0000310b)<br />
   Adapter: vmhba2 Channel: 0 Target: 0 LUN: 10<br />
   Adapter Identifier: fc.3001001b3232c093:2101001b3232c093<br />
   Target Identifier: fc.60060e80058c7b55:50060e80058c7b55<br />
   Plugin: NMP<br />
   State: active<br />
   Transport: fc<br />
   Adapter Transport Details: WWNN: 22:01:00:1b:32:32:c0:93 WWPN: 23:01:00:1b:32:32:c0:93<br />
   Target Transport Details: WWNN: 55:06:0e:80:05:8c:7b:55 WWPN: 56:06:0e:80:05:8c:7b:55</p>
<p>fc.2000001b3212c093:2100001b3212c093-fc.50060e80058c7b45:50060e80058c7b45-naa.60060e80058c7b0000008c7b0000310b<br />
   Runtime Name: vmhba1:C0:T0:L10<br />
   Device: naa.60060e80058c7b0000008c7b0000310b<br />
   Device Display Name: HITACHI Fibre Channel Disk (naa.60060e80058c7b0000008c7b0000310b)<br />
   Adapter: vmhba1 Channel: 0 Target: 0 LUN: 10<br />
   Adapter Identifier: fc.3000001b3212c093:2100001b3212c093<br />
   Target Identifier: fc.60060e80058c7b45:50060e80058c7b45<br />
   Plugin: NMP<br />
   State: active<br />
   Transport: fc<br />
   Adapter Transport Details: WWNN: 22:00:00:1b:32:12:c0:93 WWPN: 23:00:00:1b:32:12:c0:93<br />
   Target Transport Details: WWNN: 55:06:0e:80:05:8c:7b:45 WWPN: 56:06:0e:80:05:8c:7b:45</p></blockquote>
<p>The esxcfg-mpath -l command generates the detailed information for the LUN.  Because there are redundant path to the LUN on the SAN, the result is listed twice with different fiber channel HBA interfaces.</p>
<p>Now what if your VMware ESX server is hosting many servers all with different RDMs.  It would be very tedious to manually compile a report for RDM to LUN mapping.  I create a script that will automatically do all the above steps and will output the result to screen or you can redirect the result to a file.  This will script will search for all the RDMs and create the mappings.  Below is the script and explanation of how it works.</p>
<p><strong><br />
<blockquote>#!/bin/bash<br />
# Andrew Lin<br />
# August 4, 2010<br />
# Pay Andrew Lin lot&#8217;s of money before you<br />
# can use this script</p>
<p>date<br />
hostname</p>
<p>find /vmfs/volumes -name **-rdm** | sed &#8216;s/-rdmp.vmdk/.vmdk/g&#8217; | sed &#8216;s/-rdm.vmdk/.vmdk/g&#8217; | sed &#8216;s/^/vmkfstools -q /g&#8217; >> andrew-disk-map |<br />
chmod 645 andrew-disk-map</p>
<p>file=andrew-disk-map<br />
while read line<br />
do<br />
 $line<br />
 $line | grep vml | sed &#8216;s/.*to:/esxcfg-scsidevs -u | grep/g&#8217; > andrew_lin1</p>
<p>     chmod 755 andrew_lin1<br />
     ./andrew_lin1 | sed &#8216;s/ .*//g&#8217;<br />
     ./andrew_lin1 | sed &#8216;s/ .*//g&#8217; | sed &#8216;s/^/esxcfg-mpath -L &#8211;device=/g&#8217; >andrew_lin2<br />
     # rm andrew_lin1</p>
<p>     chmod 755 andrew_lin2<br />
     ./andrew_lin2<br />
     # rm andrew_lin2</p>
<p> echo -e &#8220;\n&#8221;<br />
done <$file</p></blockquote>
<p></strong></p>
<p>I will explain below what the above script does.</p>
<blockquote><p>find /vmfs/volumes -name **-rdm**<br />
/vmfs/volumes/4c20ca1e-d32d6ed6-96cb-001e4f3fdc36/VMware1/VMware1_1-rdmp.vmdk</p></blockquote>
<p>Search for all RDM (raw disk mapping), VMware1_1-rdmp.vmdk is found.</p>
<blockquote><p>sed &#8216;s/-rdmp.vmdk/.vmdk/g&#8217;</p></blockquote>
<p>Change the characters -rdmp.vmdk to .vmdk. The s/ means to substitute, and /g means globally apply the changes for all matches. Some RDM have the -rdmp.vmdk extension (not shown in the above example).</p>
<blockquote><p>sed &#8216;s/-rdm.vmdk/.vmdk/g&#8217;</p></blockquote>
<p>Change -rdm.vmdk to .vmdk for all matches.</p>
<blockquote><p>sed &#8216;s/^/vmkfstools -q /g&#8217;</p></blockquote>
<p>Add the command vmkfstools -q to the beginning of each line.</p>
<blockquote><p>>> andrew-disk-map | chmod 645 andrew-disk-map</p></blockquote>
<p>Redirect the output to the file andrew-disk-map.  Change the file permission to 645 to make it executable.</p>
<p>Below is the result of the above command stored in andrew-disk-map.</p>
<blockquote><p>vmkfstools -q /vmfs/volumes/4c20ca1e-d32d6ed6-96cb-001e4f3fdc36/VMware1/VMware1_1.vmdk</p></blockquote>
<blockquote><p>file=andrew-disk-map</p></blockquote>
<p>Define the variable called file which contains the name of the file andrew-disk-map.</p>
<blockquote><p>while read line<br />
do<br />
 ..<br />
 &#8230;<br />
 &#8230;.<br />
done <$file</p></blockquote>
<p>The while loop will read the contents of the file defined in the variable $file (which is andrew-disk-map).  The file is read one line at a time and the commands defined within the while loop are executed for each line read.</p>
<blockquote><p>$line</p></blockquote>
<p>Execute the line read from the file andrew-disk-map and send the output to screen.</p>
<blockquote><p><strong>Command</strong><br />
vmkfstools -q /vmfs/volumes/4c20ca1e-d32d6ed6-96cb-001e4f3fdc36/VMware1/VMware1_1.vmdk<br />
<strong>Output</strong><br />
Disk /vmfs/volumes/4c20ca1e-d32d6ed6-96cb-001e4f3fdc36/VMware1/VMware1_1.vmdk is a Passthrough Raw Device Mapping<br />
Maps to: vml.02000a000060060e80058c7b0000008c7b0000310b4f50454e2d56</p></blockquote>
<blockquote><p>$line | grep vml | sed &#8216;s/.*to:/esxcfg-scsidevs -u | grep/g&#8217; > andrew_lin1</p></blockquote>
<p>Grep will find the line that contains the characters vml,  this is the unique LUN id.  Replace all characters before and upto the characters to: with esxcfg-scsidevs -u | grep.  The result will look like the below line which is redirected to the file andrew_lin1.</p>
<blockquote><p>esxcfg-scsidevs -u | grep vml.02000a000060060e80058c7b0000008c7b0000310b4f50454e2d56</p></blockquote>
<blockquote><p>chmod 755 andrew_lin1</p></blockquote>
<p>Chmod 755 will make the file andrew_lin1 executable.</p>
<blockquote><p>./andrew_lin1 | sed &#8216;s/ .*//g&#8217;</p></blockquote>
<p>Execute the file andrew_lin1.  Sed &#8216;s/ .*//g&#8217; will delete everything after the first space found, otherwise the output will look like the below.</p>
<blockquote><p><strong>Command executed (this is the content of the file andrew_lin1).</strong><br />
esxcfg-scsidevs -u | grep vml.02000a000060060e80058c7b0000008c7b0000310b4f50454e2d56<br />
<strong>Output</strong><br />
naa.60060e80058c7b0000008c7b0000310b                            vml.02000a000060060e80058c7b0000008c7b0000310b4f50454e2d56</p></blockquote>
<blockquote><p>./andrew_lin1 | sed &#8216;s/ .*//g&#8217; | sed &#8216;s/^/esxcfg-mpath -l &#8211;device=/g&#8217; >andrew_lin2</p></blockquote>
<p>Execute the file andrew_lin1, from the result remove everything after the LUN ID number (naa.60060e80058c7b0000008c7b0000310b). Then add the command esxcfg-mpath -L &#8211;device= in front of the LUN ID number, see below example.  The output is redirected to the file andrew_lin2.<br />
esxcfg-mpath -l &#8211;device=naa.60060e80058c7b0000008c7b0000310b</p>
<blockquote><p># rm andrew_lin1</p></blockquote>
<p>You are done with file andrew_lin1 and can delete it. If you want to save the file for troubleshooting then comment out the above line with the # sign.</p>
<blockquote><p>chmod 755 andrew_lin2</p></blockquote>
<p>Make the file andrew_lin2 executable.</p>
<blockquote><p>./andrew_lin2</p></blockquote>
<p>Execute andrew_lin2.  Which contains the command esxcfg-mpath -l &#8211;device=naa.60060e80058c7b0000008c7b0000310b.  The output below is displayed on screen.  Notice that there are redundant paths to the LUN on the SAN.</p>
<blockquote><p>fc.2001001b3232c093:2101001b3232c093-fc.50060e80058c7b55:50060e80058c7b55-naa.60060e80058c7b0000008c7b0000310b<br />
   Runtime Name: vmhba2:C0:T0:L10<br />
   Device: naa.60060e80058c7b0000008c7b0000310b<br />
   Device Display Name: HITACHI Fibre Channel Disk (naa.60060e80058c7b0000008c7b0000310b)<br />
   Adapter: vmhba2 Channel: 0 Target: 0 LUN: 10<br />
   Adapter Identifier: fc.3001001b3232c093:2101001b3232c093<br />
   Target Identifier: fc.60060e80058c7b55:50060e80058c7b55<br />
   Plugin: NMP<br />
   State: active<br />
   Transport: fc<br />
   Adapter Transport Details: WWNN: 22:01:00:1b:32:32:c0:93 WWPN: 23:01:00:1b:32:32:c0:93<br />
   Target Transport Details: WWNN: 55:06:0e:80:05:8c:7b:55 WWPN: 56:06:0e:80:05:8c:7b:55</p>
<p>fc.2000001b3212c093:2100001b3212c093-fc.50060e80058c7b45:50060e80058c7b45-naa.60060e80058c7b0000008c7b0000310b<br />
   Runtime Name: vmhba1:C0:T0:L10<br />
   Device: naa.60060e80058c7b0000008c7b0000310b<br />
   Device Display Name: HITACHI Fibre Channel Disk (naa.60060e80058c7b0000008c7b0000310b)<br />
   Adapter: vmhba1 Channel: 0 Target: 0 LUN: 10<br />
   Adapter Identifier: fc.3000001b3212c093:2100001b3212c093<br />
   Target Identifier: fc.60060e80058c7b45:50060e80058c7b45<br />
   Plugin: NMP<br />
   State: active<br />
   Transport: fc<br />
   Adapter Transport Details: WWNN: 22:00:00:1b:32:12:c0:93 WWPN: 23:00:00:1b:32:12:c0:93<br />
   Target Transport Details: WWNN: 55:06:0e:80:05:8c:7b:45 WWPN: 56:06:0e:80:05:8c:7b:45</p></blockquote>
<blockquote><p># rm andrew_lin2</p></blockquote>
<p>Delete the file andrew_lin2 by removing the # comment.</p>
<blockquote><p>echo -e &#8220;\n&#8221;</p></blockquote>
<p>Enter a line space.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamescheat.ca/2010/08/creating-rdm-to-lun-san-mapping-on-vmware-esx-4-vcenter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Booting up Solaris 10 from a SAN replicated LUN on a different Sun SPARC server</title>
		<link>http://www.gamescheat.ca/2010/07/booting-up-solaris-10-from-a-san-replicated-lun-on-a-different-sun-sparc-server/</link>
		<comments>http://www.gamescheat.ca/2010/07/booting-up-solaris-10-from-a-san-replicated-lun-on-a-different-sun-sparc-server/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 20:23:40 +0000</pubDate>
		<dc:creator>Andrew Lin</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[SUN]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.gamescheat.ca/?p=815</guid>
		<description><![CDATA[The quickest way to recover from a total disaster is to have some sort of replication implemented. There are two different methods of real-time replication, hardware and software. My experiences with software replication such as Symantec Veritas Volume replicator for AIX was not pleasing. It required constant maintenance and troubleshooting. The best is hardware replication [...]]]></description>
			<content:encoded><![CDATA[<p>The quickest way to recover from a total disaster is to have some sort of replication implemented.  There are two different methods of  real-time replication, hardware and software.  My experiences with software replication such as Symantec Veritas Volume replicator for AIX was  not pleasing.  It required constant maintenance and troubleshooting. The best is hardware replication if you can afford it.  A lot of  organizations pick software replication as it generally cost a lot less up front, but the cost of maintenance eventually adds up.</p>
<p>I will explain how to recover a Solaris 10 server from hardware replicated SAN disk.  It took me sometime to figure out how to boot up from  the replicated SAN LUN (disk), and many more hours to understand why the steps I applied works.</p>
<p>In this example I have a SUN SPARC M3000 server with two Qlogic fiber channel cards (HBA) installed in the PCI solts.  The HBAs were already  configured to connect to the SAN disk (LUN).  This LUN contained the replicated copy of a production Slaris 10 server.  The production server had two ZFS pool residing in a single LUN.</p>
<p>Using the Solaris 10 installation CD boot up the Sparc server into single user mode. </p>
<blockquote><p>boot cdrom -s</p></blockquote>
<p>The first thing you need to do is to see if the HBAs are working.  The connected status indictes that communication between the server and  switch is working.  There are two HBAs installed for redundancy, both connected to the same LUN.</p>
<blockquote><p># luxadm -e port<br />
/devices/pci@0,600000/pci@0/pci@8/SUNW,qlc@0/fp@0,0:devctl CONNECTED<br />
/devices/pci@1,700000/pci@0/pci@0/SUNW,qlc@0/fp@0,0:devctl CONNECTED</p></blockquote>
<p>Now you need to find out if the SAN disk is visible from the server. Even though both HBAs are connected to the same SAN disk, you will see  two separate SAN disks in the results below.  It just means there are two paths to the SAN.</p>
<blockquote><p># luxadm probe<br />
No Network Array enclosures found in /dev/es</p>
<p>Found Fibre Channel device(s):<br />
  Node WWN:50060e80058c7b10  Device Type:Disk device<br />
    Logical Path:/dev/rdsk/c1t50060E80058C7B10d1s2<br />
  Node WWN:50060e80058c7b00  Device Type:Disk device<br />
    Logical Path:/dev/rdsk/c2t50060E80058C7B00d1s2</p></blockquote>
<p>In the above example the first LUN is c1t50060E80058C7B10d1s2. This is the logical device name which is a symbolic link to the physical  device name stored in the /devices directory. Logical device names contain the controller number(c2), target number (t50060E80058C7B10), disk number (d1), and slice number (s2).</p>
<p>The next step is to find out how the disk is partitioned, the format command will give you that information. You need this information to  understand how to boot up the disk.</p>
<blockquote><p># format<br />
Searching for disks&#8230;done</p>
<p>AVAILABLE DISK SELECTIONS:<br />
0. c1t50060E80058C7B10d1 <HITACHI-OPEN-V-SUN-6006 cyl 65533 alt 2 hd 15 sec<br />
1066>/pci@0,600000/pci@0/pci@8/SUNW,qlc@0/fp@0,0/ssd@w50060e80058c7b10,1</p>
<p>1. c2t50060E80058C7B00d1 <HITACHI-OPEN-V-SUN-6006 cyl 65533 alt 2 hd 15 sec<br />
1066>/pci@1,700000/pci@0/pci@0/SUNW,qlc@0/fp@0,0/ssd@w50060e80058c7b00,1</p></blockquote>
<p>Select the first disk 0.</p>
<blockquote><p>Specify disk (enter its number): 0<br />
selecting c1t50060E80058C7B10d1<br />
[disk formatted]</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 />
        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 />
        inquiry    &#8211; show vendor, product and revision<br />
        volname    &#8211; set 8-character volume name<br />
        !<cmd>     &#8211; execute <cmd>, then return<br />
        quit</p></blockquote>
<p>Display the labels and slices (partitions).  In Solaris each slice is treated as a separate physical disk.  In the below example you can tell that the disk is labeled as VTOC (Volume Table of Contents) because you can see the cylinders.  VTOC is also known as SMI label.  If the disk was labeled with EFI (Extensible Firmware Interface), then you would see sectors instead of cylinders.  Partition 0 (slice 0) holds the  operating system files, the boot disk.  Please note that you cannot boot from a disk with EFI label.  Slice 2 is the entire physical disk  because it contains all cylinders, 0 &#8211; 65532.</p>
<blockquote><p>format> verify</p>
<p>Primary label contents:</p>
<p>Volume name = <<br />
ascii name  = <HITACHI-OPEN-V-SUN-6006 cyl 65533 alt 2 hd 15 sec 1066><br />
pcyl        = 65535<br />
ncyl        = 65533<br />
acyl        =    2<br />
nhead       =   15<br />
nsect       = 1066<br />
Part      Tag    Flag     Cylinders         Size            Blocks<br />
  0       root    wm       0 &#8211;  3356       25.60GB    (3357/0/0)    53678430<br />
  1 unassigned    wm       0                0         (0/0/0)              0<br />
  2     backup    wm       0 &#8211; 65532      499.66GB    (65533/0/0) 1047872670<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    3357 &#8211; 65532      474.07GB    (62176/0/0)  994194240
    </p></blockquote>
<p>Here is what we know so far, we know that the disk name is c1t50060E80058C7B10d1. Slice 0 on this disk contains the boot files.  The physical path for this disk is /pci@0,600000/pci@0/pci@8/SUNW,qlc@0/fp@0,0/ssd@w50060e80058c7b10,1.  Now we need to find out the physical path for Slice 0.</p>
<p>I know that the disk contains ZFS filesystems because it is a replica of the production disk.  When a ZFS filesystem is moved to a different  SPARC server it must first be imported because the hostid is different.</p>
<p>List the ZFS pool contained on the disk using the zpool import command.  There are two ZFS pools in the below example, epool and rpool.  Take a note of the status and action.</p>
<blockquote><p># zpool import<br />
  pool: epool<br />
    id: 16865366839830765202<br />
 state: ONLINE<br />
status: The pool was last accessed by another system.<br />
action: The pool can be imported using its name or numeric identifier and the &#8216;-f&#8217; flag.<br />
   see: http://www.sun.com/msg/ZFS-8000-EY<br />
config:</p>
<p>        epool                      ONLINE<br />
          c2t50060E80058C7B00d1s7  ONLINE</p>
<p>  pool: rpool<br />
    id: 10594898920105832331<br />
 state: ONLINE<br />
status: The pool was last accessed by another system.<br />
action: The pool can be imported using its name or numeric identifier and the &#8216;-f&#8217; flag.<br />
   see: http://www.sun.com/msg/ZFS-8000-EY<br />
config:</p>
<p>        rpool                      ONLINE<br />
          c2t50060E80058C7B00d1s0  ONLINE</p></blockquote>
<p>Import the pool with the zpool import command.  The options -a will import all the ZFS pools it can find, the -f option will force the  import.  If you do not specify the force option, then the import may fail with the error &#8220;cannot import &#8216;rpool&#8217;: pool may be in use from other system, it was last accessed by server name (hostid: 123456)&#8221;.  Ignore the error message about failed to create mountpoint.</p>
<blockquote><p># zpool import -af<br />
cannot mount &#8216;/epool&#8217;: failed to create mountpoint<br />
cannot mount &#8216;/rpool&#8217;: failed to create mountpoint</p></blockquote>
<p>List the imported ZFS pools.</p>
<blockquote><p># zpool list<br />
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT<br />
epool   472G   260G   212G    55%  ONLINE  -<br />
rpool  25.5G  5.75G  19.8G    22%  ONLINE  -</p></blockquote>
<p>List the ZFS filesystems. In the example below notice the mountpoint / is mounted on the zfs filesystem rpool/ROOT/zfsboot.  This is the boot partition, it resides in rpool.</p>
<blockquote><p># zfs list<br />
NAME                                     USED  AVAIL  REFER  MOUNTPOINT<br />
epool                                    260G   205G    21K  /epool<br />
rpool                                   7.74G  17.4G    99K  /rpool<br />
rpool/ROOT                              4.74G  17.4G    21K  legacy<br />
rpool/ROOT/zfsboot                      4.74G  17.4G  4.48G  /<br />
rpool/ROOT/zfsboot/var                   139M  17.4G   105M  /var<br />
rpool/dump                              1.00G  17.4G  1.00G  -<br />
rpool/swap                              2.00G  19.4G    16K  -</p></blockquote>
<p>Change the mountpoint for rpoo/ROOT/zfsboot to /mnt so you can mount it to read the contents.</p>
<blockquote><p># zfs set mountpoint=/mnt rpool/ROOT/zfsboot</p></blockquote>
<p>Confirm that the mountpoint was changed.</p>
<blockquote><p># zfs list<br />
NAME                                     USED  AVAIL  REFER  MOUNTPOINT<br />
epool                                    260G   205G    21K  /epool<br />
rpool                                   7.74G  17.4G    99K  /rpool<br />
rpool/ROOT                              4.74G  17.4G    21K  legacy<br />
rpool/ROOT/zfsboot                      4.74G  17.4G  4.48G  /mnt<br />
rpool/ROOT/zfsboot/var                   139M  17.4G   105M  /mnt/var<br />
rpool/dump                              1.00G  17.4G  1.00G  -<br />
rpool/swap                              2.00G  19.4G    16K  -
           </p></blockquote>
<p>Now mount rpool/ROOT/zfsboot.</p>
<blockquote><p># zfs mount rpool/ROOT/zfsboot</p></blockquote>
<p>List the logical disks.</p>
<blockquote><p># cd /dev/dsk<br />
# ls<br />
c1t50060E80058C7B10d1s0  c2t50060E80058C7B00d1s0<br />
c1t50060E80058C7B10d1s1  c2t50060E80058C7B00d1s1<br />
c1t50060E80058C7B10d1s2  c2t50060E80058C7B00d1s2<br />
c1t50060E80058C7B10d1s3  c2t50060E80058C7B00d1s3<br />
c1t50060E80058C7B10d1s4  c2t50060E80058C7B00d1s4<br />
c1t50060E80058C7B10d1s5  c2t50060E80058C7B00d1s5<br />
c1t50060E80058C7B10d1s6  c2t50060E80058C7B00d1s6<br />
c1t50060E80058C7B10d1s7  c2t50060E80058C7B00d1s7</p></blockquote>
<p>As stated earlier the physical path for the disk we are looking for is /pci@0,600000/pci@0/pci@8/SUNW,qlc@0/fp@0,0/ssd@w50060e80058c7b10,1.   The boot slice is 0.  We can derive from the physical path that the disk name is 50060e80058c7b10.  We also know from the output of the format command that the physical disk 50060e80058c7b10 maps to the logical disk c1t50060E80058C7B10d1.  Therefore we can derive that the  logical boot disk is c1t50060E80058C7B10d1s0.</p>
<p>Now find out what physical path c1t50060E80058C7B10d1s0 is a symbolic link for and that is your complete boot path.  In the below example the boot path starts at the first slash (/) right after /devices. It is /pci@0,600000/pci@0/pci@8/SUNW,qlc@0/fp@0,0/ssd@w50060e80058c7b10,1:a.  You need to replace ssd@ with disk@ when entering the path into EEPROM.</p>
<blockquote><p># ls -l c1t50060E80058C7B10d1s0<br />
lrwxrwxrwx   1 root     root          82 Jul  5 10:21 c1t50060E80058C7B10d1s0 -><br />
 ../../devices/pci@0,600000/pci@0/pci@8/SUNW,qlc@0/fp@0,0/ssd@w50060e80058c7b10,1:a</p></blockquote>
<p>If you have more than one ZFS pool the non root pool may not get mounted upon booting up the server, as in this example.  You may get the  below error.</p>
<blockquote><p>SUNW-MSG-ID: ZFS-8000-D3, TYPE: Fault, VER: 1, SEVERITY: Major<br />
EVENT-TIME: Mon Jul  5 11:54:14 EDT 2010<br />
PLATFORM: SUNW,SPARC-Enterprise, CSN: PX654321, HOSTNAME: Andrew-Lin<br />
SOURCE: zfs-diagnosis, REV: 1.0<br />
EVENT-ID: 33e5a9f1-49ac-6ebc-f2a9-dff25dea6b86<br />
DESC: A ZFS device failed.  Refer to http://sun.com/msg/ZFS-8000-D3 for more information.<br />
AUTO-RESPONSE: No automated response will occur.<br />
IMPACT: Fault tolerance of the pool may be compromised.<br />
REC-ACTION: Run &#8216;zpool status -x&#8217; and replace the bad device.</p>
<p>http://sun.com/msg/ZFS-8000-D3fameserverq9{root}: zpool status -x<br />
  pool: epool<br />
 state: UNAVAIL<br />
status: One or more devices could not be opened.  There are insufficient<br />
        replicas for the pool to continue functioning.<br />
action: Attach the missing device and online it using &#8216;zpool online&#8217;.<br />
   see: http://www.sun.com/msg/ZFS-8000-3C<br />
 scrub: none requested<br />
config:</p>
<p>        NAME                                       STATE     READ WRITE CKSUM<br />
        epool                                      UNAVAIL      0     0     0  insufficient replicas<br />
          c3t60060E8005652C000000652C00002100d0s7  UNAVAIL      0     0     0  cannot open</p></blockquote>
<p>The above error is caused by the zpool.cache file.  This file contains the old paths of the disks from the previous server. The default  behavior of Solaris 10 is to read the path from the zpool.cache file to speed up the boot sequence.  You should delete this file and the  system will recreate a fresh one during the boot up sequence.</p>
<p>Below are the steps to rename the zpool.cache file.</p>
<blockquote><p># cd /mnt/etc/zfs<br />
# ls<br />
zpool.cache<br />
# mv zpool.cache zpool.cache.old</p></blockquote>
<p>Now you need to reverse the changed you applied to the mountpoint earlier. Make sure that you change directory out of /mnt to /, otherwise  the set mountpoint command will fail with the error device busy.  Ignore the cannot mount &#8216;/&#8217;: directory is not empty message.</p>
<blockquote><p># zfs set mountpoint=/ rpool/ROOT/zfsboot<br />
cannot mount &#8216;/&#8217;: directory is not empty<br />
property may be set but unable to remount filesystem                            </p></blockquote>
<p>Confirm that the mount points were changed.</p>
<blockquote><p># zfs list<br />
NAME                                     USED  AVAIL  REFER  MOUNTPOINT<br />
epool                                    260G   205G    21K  /epool<br />
rpool                                   7.74G  17.4G    99K  /rpool<br />
rpool/ROOT                              4.74G  17.4G    21K  legacy<br />
rpool/ROOT/zfsboot                      4.74G  17.4G  4.48G  /<br />
rpool/ROOT/zfsboot/var                   139M  17.4G   105M  /var<br />
rpool/dump                              1.00G  17.4G  1.00G  -<br />
rpool/swap                              2.00G  19.4G    16K  -</p></blockquote>
<p>Shutdown the server.</p>
<blockquote><p># init 0
                            </p></blockquote>
<p>Now set the boot device in EEPROM.</p>
<blockquote><p>setenv boot-device /pci@0,600000/pci@0/pci@8/SUNW,qlc@0/fp@0,0/disk@w50060e80058c7b10,1:a</p></blockquote>
<p>The server is ready to be booted with the boot command.</p>
<blockquote><p>{0} ok boot</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.gamescheat.ca/2010/07/booting-up-solaris-10-from-a-san-replicated-lun-on-a-different-sun-sparc-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to get the network card speed in Solaris 9</title>
		<link>http://www.gamescheat.ca/2010/05/how-to-get-the-network-card-speed-in-solaris-9/</link>
		<comments>http://www.gamescheat.ca/2010/05/how-to-get-the-network-card-speed-in-solaris-9/#comments</comments>
		<pubDate>Wed, 12 May 2010 18:47:18 +0000</pubDate>
		<dc:creator>Andrew Lin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.gamescheat.ca/?p=811</guid>
		<description><![CDATA[To determine the network card speed in Solaris 9 use the ndd utility. First list the NIC installed and active on the Solaris 9 server. # ifconfig -a lo0: flags=1000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 hme0: flags=1000843 mtu 1500 index 2 inet 162.10.1.11 netmask ffff0000 broadcast 162.10.255.255 ether 8:0:20:c4:8c:87 There is one [...]]]></description>
			<content:encoded><![CDATA[<p>To determine the network card speed in Solaris 9 use the ndd utility.</p>
<p>First list the NIC installed and active on the Solaris 9 server.</p>
<blockquote><p># ifconfig -a<br />
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1<br />
        inet 127.0.0.1 netmask ff000000<br />
hme0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2<br />
        inet 162.10.1.11 netmask ffff0000 broadcast 162.10.255.255<br />
        ether 8:0:20:c4:8c:87</p></blockquote>
<p>There is one network card installed and active, hme0.</p>
<blockquote><p># ndd -get /dev/hme link_mode<br />
1</p></blockquote>
<p>Interpretation:<br />
0 &#8212; half-duplex<br />
1 &#8212; full-duplex</p>
<blockquote><p># ndd -get /dev/hme link_speed<br />
1</p></blockquote>
<p>Interpretation:<br />
0 &#8212; 10 Mbit<br />
1 &#8212; 100 Mbit<br />
1000 &#8212; 1 Gbit </p>
<p>To query a different NIC, such as hme1, set the &#8220;instance&#8221; to 1, and then perform the link_mode and link_speed queries above. </p>
<blockquote><p># ndd -set /dev/hme instance 1 </p></blockquote>
<p>The ndd commands above must be run as root.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamescheat.ca/2010/05/how-to-get-the-network-card-speed-in-solaris-9/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to relocate the /export and /export/home filesystems on Solaris 10.</title>
		<link>http://www.gamescheat.ca/2010/04/how-to-relocate-the-export-and-exporthome-filesystems-on-solaris-10/</link>
		<comments>http://www.gamescheat.ca/2010/04/how-to-relocate-the-export-and-exporthome-filesystems-on-solaris-10/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 20:19:01 +0000</pubDate>
		<dc:creator>Andrew Lin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[filesystem]]></category>
		<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.gamescheat.ca/?p=808</guid>
		<description><![CDATA[By default Solaris installs the /export and /export/home filesystems in the root zfs pool, if you picked ZFS and not UFS as the filesystem. I wanted to relocate /export and /export/home to a larger ZFS pool other than the root pool as I wanted to separate the user&#8217;s data from the OS. The first thing [...]]]></description>
			<content:encoded><![CDATA[<p>By default Solaris installs the /export and /export/home filesystems in the root zfs pool, if you picked ZFS and not UFS as the filesystem. I wanted to relocate /export and /export/home to a larger ZFS pool other than the root pool as I wanted to separate the user&#8217;s data from the OS.</p>
<p>The first thing to do is determine the available disk and slice.  Use the format command to list the disks and slices.</p>
<blockquote><p># format<br />
Searching for disks&#8230;done</p>
<p>AVAILABLE DISK SELECTIONS:<br />
       0. c0t0d0 <FUJITSU-MBD2147RC-3701-136.73GB><br />
          /pci@0,600000/pci@0/pci@0/scsi@0/sd@0,0<br />
       1. c0t1d0 <FUJITSU-MBD2147RC-3701-136.73GB><br />
          /pci@0,600000/pci@0/pci@0/scsi@0/sd@1,0<br />
       2. c3t60060E8005652C000000652C00002100d0 <HITACHI-OPEN-V-SUN-6006 cyl 65533 alt 2 hd 15 sec 1066><br />
          /scsi_vhci/ssd@g60060e8005652c000000652c00002100<br />
Specify disk (enter its number):</p></blockquote>
<blockquote><p># zpool create epool c3t60060E8005652C000000652C00002100d0s7</p></blockquote>
<p>This will create the zfs pool called epool on disk c3t60060E8005652C000000652C00002100d0, slice 7.</p>
<p>Confirm that the pool was created with the command zpool list.</p>
<blockquote><p>bash-3.00# zpool list<br />
NAME    SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT<br />
epool   472G   174K   472G     0%  ONLINE  -<br />
rpool  25.5G  5.41G  20.1G    21%  ONLINE  -</p></blockquote>
<p>Create a snapshot of /export and /export/home.  The -r option created a recursive snapshot, so you do not have to manually create the snapshot for /export/home as well.</p>
<blockquote><p># zfs snapshot -r rpool/export@snapshot</p></blockquote>
<p>Confirm that the snapshots were crearted, they are rpool/export@snapshot and rpool/export/home@snapshot.</p>
<blockquote><p># zfs list<br />
NAME                         USED  AVAIL  REFER  MOUNTPOINT<br />
epool                         72K   465G    21K  /epool<br />
rpool                       7.41G  17.7G    97K  /rpool<br />
rpool/ROOT                  4.41G  17.7G    21K  legacy<br />
rpool/ROOT/zfsboot          4.41G  17.7G  4.35G  /<br />
rpool/ROOT/zfsboot/var      69.2M  17.7G  69.2M  /var<br />
rpool/dump                  1.00G  17.7G  1.00G  -<br />
rpool/export                  44K  17.7G    23K  /export<br />
rpool/export@snapshot           0      &#8211;    23K  -<br />
rpool/export/home             21K  17.7G    21K  /export/home<br />
rpool/export/home@snapshot      0      &#8211;    21K  -<br />
rpool/swap                     2G  19.7G    16K  -</p></blockquote>
<p>Now restore the snapshots to the new zfs pool called epool.</p>
<blockquote><p># zfs send rpool/export@snapshot | zfs receive epool/export<br />
# zfs send rpool/export/home@snapshot | zfs receive epool/export/home</p></blockquote>
<p>Confirm that the snapshots were restored to epool.</p>
<blockquote><p># zfs list<br />
NAME                         USED  AVAIL  REFER  MOUNTPOINT<br />
epool                        134K   465G    23K  /epool<br />
epool/export                  44K   465G    23K  /epool/export<br />
epool/export@snapshot           0      &#8211;    23K  -<br />
epool/export/home             21K   465G    21K  /epool/export/home<br />
epool/export/home@snapshot      0      &#8211;    21K  -<br />
rpool                       7.41G  17.7G    97K  /rpool<br />
rpool/ROOT                  4.41G  17.7G    21K  legacy<br />
rpool/ROOT/zfsboot          4.41G  17.7G  4.35G  /<br />
rpool/ROOT/zfsboot/var      69.2M  17.7G  69.2M  /var<br />
rpool/dump                  1.00G  17.7G  1.00G  -<br />
rpool/export                  44K  17.7G    23K  /export<br />
rpool/export@snapshot           0      &#8211;    23K  -<br />
rpool/export/home             21K  17.7G    21K  /export/home<br />
rpool/export/home@snapshot      0      &#8211;    21K  -<br />
rpool/swap                     2G  19.7G    16K  -</p></blockquote>
<p>Now you need to redirect the mount points for /export and /export/home.  They are still pointing to rpool/export and rpool/export/home.  List the mount points with the zfs mount command.</p>
<blockquote><p># zfs mount<br />
rpool/ROOT/zfsboot              /<br />
rpool/ROOT/zfsboot/var          /var<br />
epool                           /epool<br />
rpool/export                    /export<br />
rpool/export/home               /export/home<br />
rpool                           /rpool<br />
epool/export                    /epool/export<br />
epool/export/home               /epool/export/home</p></blockquote>
<p>Unmount /export and /export/home becasue they are currently mounted.</p>
<blockquote><p># zfs unmount /export/home<br />
# zfs unmount /export</p></blockquote>
<p>Now redirect the mount point /export to epool/export.</p>
<blockquote><p># zfs set mountpoint=/export epool/export</p></blockquote>
<p>Redirect the mount point /export/home to epool/export/home.                      </p>
<blockquote><p># zfs set mountpoint=/export/home epool/export/home                </p></blockquote>
<p>Confirm the changes.</p>
<blockquote><p># zfs mount<br />
rpool/ROOT/zfsboot              /<br />
rpool/ROOT/zfsboot/var          /var<br />
epool                           /epool<br />
rpool                           /rpool<br />
epool/export                    /export<br />
epool/export/home               /export/home</p></blockquote>
<p>Reboot the server for the changes to take effect.</p>
<p>After the server restarts list the filesystems to confirm the changes.</p>
<blockquote><p># zfs list<br />
NAME                         USED  AVAIL  REFER  MOUNTPOINT<br />
epool                        219K   465G    21K  /epool<br />
epool/export                  84K   465G    23K  /export<br />
epool/export@snapshot         21K      &#8211;    23K  -<br />
epool/export/home             40K   465G    22K  /export/home<br />
epool/export/home@snapshot    18K      &#8211;    21K  -<br />
rpool                       7.42G  17.7G    99K  /rpool<br />
rpool/ROOT                  4.42G  17.7G    21K  legacy<br />
rpool/ROOT/zfsboot          4.42G  17.7G  4.35G  /<br />
rpool/ROOT/zfsboot/var      69.3M  17.7G  69.3M  /var<br />
rpool/dump                  1.00G  17.7G  1.00G  -<br />
rpool/export                  75K  17.7G    23K  /export<br />
rpool/export@snapshot         16K      &#8211;    23K  -<br />
rpool/export/home             36K  17.7G    21K  /export/home<br />
rpool/export/home@snapshot    15K      &#8211;    21K  -<br />
rpool/swap                     2G  19.7G    16K  -</p></blockquote>
<p>You need to delete the old /export and /export/home which are pointing to rpool/export and rpool/export/home respectively.</p>
<blockquote><p># zfs destroy -r rpool/export</p></blockquote>
<p>Confirm the filesystems were deleted.</p>
<blockquote><p># zfs list<br />
NAME                         USED  AVAIL  REFER  MOUNTPOINT<br />
epool                        219K   465G    21K  /epool<br />
epool/export                  84K   465G    23K  /export<br />
epool/export@snapshot         21K      &#8211;    23K  -<br />
epool/export/home             40K   465G    22K  /export/home<br />
epool/export/home@snapshot    18K      &#8211;    21K  -<br />
rpool                       7.42G  17.7G    99K  /rpool<br />
rpool/ROOT                  4.42G  17.7G    21K  legacy<br />
rpool/ROOT/zfsboot          4.42G  17.7G  4.35G  /<br />
rpool/ROOT/zfsboot/var      69.3M  17.7G  69.3M  /var<br />
rpool/dump                  1.00G  17.7G  1.00G  -<br />
rpool/swap                     2G  19.7G    16K  -</p></blockquote>
<p>Delete the snapshots to free up space in the zfs pool rpool.</p>
<blockquote><p># zfs destroy epool/export@snapshot<br />
# zfs destroy epool/export/home@snapshot</p></blockquote>
<p>Confirm the snapshots were deleted.</p>
<blockquote><p># zfs list<br />
NAME                     USED  AVAIL  REFER  MOUNTPOINT<br />
epool                    153K   465G    21K  /epool<br />
epool/export              45K   465G    23K  /export<br />
epool/export/home         22K   465G    22K  /export/home<br />
rpool                   7.42G  17.7G    99K  /rpool<br />
rpool/ROOT              4.42G  17.7G    21K  legacy<br />
rpool/ROOT/zfsboot      4.42G  17.7G  4.35G  /<br />
rpool/ROOT/zfsboot/var  69.3M  17.7G  69.3M  /var<br />
rpool/dump              1.00G  17.7G  1.00G  -<br />
rpool/swap                 2G  19.7G    16K  -</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.gamescheat.ca/2010/04/how-to-relocate-the-export-and-exporthome-filesystems-on-solaris-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to rebuild a Solaris 10 server using the ZFS Root Pool Snapshots</title>
		<link>http://www.gamescheat.ca/2010/03/803/</link>
		<comments>http://www.gamescheat.ca/2010/03/803/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 21:10:16 +0000</pubDate>
		<dc:creator>Andrew Lin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Sparc]]></category>
		<category><![CDATA[SUN]]></category>

		<guid isPermaLink="false">http://www.gamescheat.ca/?p=803</guid>
		<description><![CDATA[Solaris 10 has provides the ability to recover from a disk drive failure using ZFS root pool snapshots. The snapshot can also be used to quickly rebuild a new server in the event of a disaster. Snapshot is different from flash archive which can also be used to rebuild a server. If the flash archive [...]]]></description>
			<content:encoded><![CDATA[<p>Solaris 10 has provides the ability to recover from a disk drive failure using ZFS root pool snapshots.  The snapshot can also be used to quickly rebuild a new server in the event of a disaster.  Snapshot is different from flash archive which can also be used to rebuild a server.  If the flash archive contains an image of a ZFS filesystem then it can only be restored via a JumStart server.   Flash archive of UFS filesystems can be restored after booting up with the Solaris 10 installation CD.</p>
<p>I will explain how to create a ZFS root pool snapshot and the steps to restore it to new hardware.   This is a tried and tested procedure which I created.  I could not find a complete documentation to do this on the internet, this took me a few days to figure out.</p>
<p>First create a NFS share on the remote server to store the snapshots.  Let’s call this server remote-server.</p>
<p>For example create a filesystem.</p>
<blockquote><p># zfs create rpool/snaps</p></blockquote>
<p>Share rpool/snaps.</p>
<blockquote><p># zfs set sharenfs=rw rpool/snaps</p></blockquote>
<p>Check to see if share created properly.</p>
<blockquote><p># share<br />
-               /rpool/snaps   rw   &#8220;&#8221;          &#8220;&#8221;  </p></blockquote>
<p>To create a recursive snapshot of the root pool on the server you wish to backup, logon as root.  For this exercise let’s call this server prod-server.</p>
<p>List the current ZFS filesystems.</p>
<blockquote><p># zfs list<br />
NAME                                   USED  AVAIL  REFER  MOUNTPOINT<br />
rpool                                    7.43G  41.1G    97K    /rpool<br />
rpool/ROOT                           4.43G  41.1G    21K    legacy<br />
rpool/ROOT/s10s_u8wos_08a   4.43G  41.1G  4.36G   /<br />
rpool/ROOT/s10s_u8wos_08a/var  69.1M  41.1G  69.1M  /var<br />
rpool/dump                           1.00G  41.1G  1.00G  &#8211;<br />
rpool/export                         44K  41.1G    23K  /export<br />
rpool/export/home                 21K  41.1G    21K  /export/home<br />
rpool/swap                           2G  43.1G    16K  &#8211;                </p></blockquote>
<p>Create recursive snapshots of the root pool.</p>
<blockquote><p># zfs snapshot –r rpool@backup</p></blockquote>
<p>List the ZFS filesystems, you should see the snapshots.</p>
<blockquote><p># zfs list<br />
NAME                                                   USED  AVAIL  REFER  MOUNTPOINT<br />
rpool                                                    7.43G  41.1G    97K  /rpool<br />
rpool@backup                                        0      &#8211;    97K  &#8211;<br />
rpool/ROOT                                           4.43G  41.1G    21K  legacy<br />
rpool/ROOT@backup                               0      &#8211;    21K  &#8211;<br />
rpool/ROOT/s10s_u8wos_08a                   4.43G  41.1G  4.36G  /<br />
rpool/ROOT/s10s_u8wos_08a@backup       244K      &#8211;  4.36G  &#8211;<br />
rpool/ROOT/s10s_u8wos_08a/var             69.2M  41.1G  69.1M  /var<br />
rpool/ROOT/s10s_u8wos_08a/var@backup  40.5K      &#8211;  69.1M  &#8211;<br />
rpool/dump                                           1.00G  41.1G  1.00G  &#8211;<br />
rpool/dump@backup                               0      &#8211;  1.00G  &#8211;<br />
rpool/export                                         44K  41.1G    23K  /export<br />
rpool/export@backup                       0      &#8211;    23K  &#8211;<br />
rpool/export/home                         21K  41.1G    21K  /export/home<br />
rpool/export/home@backup                  0      &#8211;    21K  &#8211;<br />
rpool/swap                              2.00G  43.1G    16K  &#8211;<br />
rpool/swap@backup                         0      &#8211;    16K  &#8211;               </p></blockquote>
<p>Send the root pool snapshot to remote-server.</p>
<blockquote><p>#Zfs send –Rv rpool@backup > /net/remote-server/rpool/snaps/rpool.backup</p></blockquote>
<p>On the server you wish to restore the snapshot to, boot up with the Solaris installation CD in single user mode.</p>
<blockquote><p>ok boot cdrom –s</p></blockquote>
<p>Configure the NIC</p>
<blockquote><p># ifconfig bge0 10.55.99.22 netmask 255.255.0.0 up</p></blockquote>
<p>Mount NFS share on remote-server using remote server’s IP.</p>
<blockquote><p># mount -f nfs 10.55.99.33:/rpool/snaps /mnt</p></blockquote>
<p>If the disk drive is new then ensure it is labeled as SMI and a slice 0 exist.  This slice needs to be big enough to restore to.  Use format –e command to create the slices and label the disk.</p>
<blockquote><p>#format –e<br />
Select disk number,  partition, print.<br />
A SMI labeled disk should look similar to the below example.</p>
<p>Current partition table (original):<br />
Total disk cylinders available: 65533 + 2 (reserved cylinders)              </p>
<p>Part      Tag    Flag     Cylinders         Size            Blocks<br />
  0       root    wm       0 &#8211;  9262       49.43GB    (9263/0/0)  103652970<br />
  1 unassigned    wm       0                0         (0/0/0)             0<br />
  2     backup    wm       0 &#8211; 65532      349.67GB    (65533/0/0) 733314270<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    9263 &#8211; 65532      300.25GB    (56270/0/0) 629661300 </p></blockquote>
<p>Create the ZFS root pool.  C0t0d0 is the disk and the S0 at the end is slice 0.</p>
<blockquote><p>#zpool create -f -o failmode=continue -R /a -m legacy -o cachefile=/etc/zfs/zpool.cache rpool c0t0d0s0</p></blockquote>
<p>Check to see if the pool was created.</p>
<blockquote><p># zpool list<br />
NAME      SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT<br />
rpool    49.2G  5.45G  43.8G    11%  ONLINE  &#8211;        </p></blockquote>
<p>Restore the root pool snapshot.  This step will take some time depending on the size of the snapshot.</p>
<blockquote><p># cat /mnt/rpool.backup | zfs receive -Fdu rpool</p></blockquote>
<p>Check to see if the restore was successful.</p>
<blockquote><p># zfs list<br />
NAME                                    			 USED  AVAIL  REFER  MOUNTPOINT<br />
rpool                                   			5.43G   128G    97K  /a/rpool<br />
rpool@backup                              		0      &#8211;    97K  &#8211;<br />
rpool/ROOT                              		4.43G   128G    21K  legacy<br />
rpool/ROOT@backup                         		0      &#8211;    21K  &#8211;<br />
rpool/ROOT/s10s_u8wos_08a              		 4.43G   128G  4.36G  /a<br />
rpool/ROOT/s10s_u8wos_08a@backup          	0      &#8211;  4.36G  &#8211;<br />
rpool/ROOT/s10s_u8wos_08a/var           	69.1M   128G  69.1M  /a/var<br />
rpool/ROOT/s10s_u8wos_08a/var@backup      	0      &#8211;  69.1M  &#8211;<br />
rpool/dump                              		1.00G   128G  1.00G  &#8211;<br />
rpool/dump@backup                         		0      &#8211;  1.00G  &#8211;<br />
rpool/export                            	 		 44K   128G    23K  /a/export<br />
rpool/export@backup                       		0      &#8211;    23K  &#8211;<br />
rpool/export/home                        		 21K   128G    21K  /a/export/home<br />
rpool/export/home@backup                  	0      &#8211;    21K  &#8211;<br />
rpool/swap                                		16K   128G    16K  &#8211;<br />
rpool/swap@backup                         		0      &#8211;    16K  &#8211;     </p></blockquote>
<p>Set the bootfs property on the root pool BE.</p>
<blockquote><p>#zpool set bootfs=rpool/ROOT/s10s_u8wos_08a rpool</p></blockquote>
<p>Determine the platform name, you will need it for the next step.</p>
<blockquote><p># uname -i<br />
SUNW,SPARC-Enterprise     </p></blockquote>
<p>Install the boot blocks on the new disk, insert the result of uname -i.  On a SPARC server.</p>
<blockquote><p>#installboot -F zfs /usr/platform/SUNW,SPARC-Enterprise/lib/fs/zfs/bootblk /dev/rdsk/ c0t0d0s0</p></blockquote>
<p>On an x86 server. Note, I only tested my procedures on a SPARC server, but it should work on a x86 server as well.</p>
<blockquote><p># installgrub /boot/grub/stage1 /boot/grub/stage2 /dev/rdsk/c0t0d0s0</p></blockquote>
<p>You are done, reboot the system.</p>
<blockquote><p>#init 6</p></blockquote>
<p>If the server does not boot up, then ensure that the disk you choose is the default boot device.  If you need to find out how to do that then see this article, <a href="http://www.gamescheat.ca/2010/03/changing-the-default-boot-device-on-a-sparc-server/">http://www.gamescheat.ca/2010/03/changing-the-default-boot-device-on-a-sparc-server/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamescheat.ca/2010/03/803/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing the default boot device on a Sparc server</title>
		<link>http://www.gamescheat.ca/2010/03/changing-the-default-boot-device-on-a-sparc-server/</link>
		<comments>http://www.gamescheat.ca/2010/03/changing-the-default-boot-device-on-a-sparc-server/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 17:21:36 +0000</pubDate>
		<dc:creator>Andrew Lin</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Sparc]]></category>
		<category><![CDATA[SUN]]></category>

		<guid isPermaLink="false">http://www.gamescheat.ca/?p=799</guid>
		<description><![CDATA[You can display and change the default boot device on a SUN Sparc server from the eeprom console. List the bootable devices with the devalias command, ok devalias cdrom /pci@0,600000/pci@0/pci@0/scsi@0/disk@4,0:f net /pci@0,600000/pci@0/pci@1/pci@0/network@4 disk /pci@0,600000/pci@0/pci@0/scsi@0/disk@0 name aliases List the current boot device. ok printenv boot-device boot-device = disk Change the boot device from disk to network. [...]]]></description>
			<content:encoded><![CDATA[<p>You can display and change the default boot device on a SUN Sparc server from the eeprom console.</p>
<p>List the bootable devices with the devalias command,</p>
<blockquote><p>ok devalias<br />
cdrom                    /pci@0,600000/pci@0/pci@0/scsi@0/disk@4,0:f<br />
net                      /pci@0,600000/pci@0/pci@1/pci@0/network@4<br />
disk                     /pci@0,600000/pci@0/pci@0/scsi@0/disk@0<br />
name                     aliases
</p></blockquote>
<p>List the current boot device.</p>
<blockquote><p>ok printenv boot-device<br />
boot-device =           disk </p></blockquote>
<p>Change the boot device from disk to network.</p>
<blockquote><p>ok setenv boot-device net<br />
boot-device =           net
</p></blockquote>
<p>Verify the change.</p>
<blockquote><p>ok printenv boot-device<br />
boot-device =           net</p></blockquote>
<p>Save the change.</p>
<blockquote><p>ok reset-all </p></blockquote>
<p>After the server rests, boot from he device</p>
<blockquote><p>ok boot</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.gamescheat.ca/2010/03/changing-the-default-boot-device-on-a-sparc-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to list the status of swap in Solaris</title>
		<link>http://www.gamescheat.ca/2010/02/how-to-list-the-status-of-swap-in-solaris/</link>
		<comments>http://www.gamescheat.ca/2010/02/how-to-list-the-status-of-swap-in-solaris/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 10:00:36 +0000</pubDate>
		<dc:creator>Andrew Lin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Aix]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.gamescheat.ca/?p=796</guid>
		<description><![CDATA[List the status of all swap areas. # swap -l swapfile dev swaplo blocks free dev/dsk/c0t0d0s1 32,9 16 8425712 8425712 The output has five columns: path The path name for the swap area. dev The major/minor device number in decimal if it is a block special device; zeroes otherwise. swaplo The swaplow value for the [...]]]></description>
			<content:encoded><![CDATA[<p>List the status of all swap areas.</p>
<blockquote><p># swap -l<br />
swapfile             dev  swaplo blocks   free<br />
dev/dsk/c0t0d0s1   32,9      16 8425712 8425712</p></blockquote>
<p>The  output  has five columns:<br />
path<br />
The path name for the swap area.</p>
<p>dev<br />
The major/minor device number in decimal if it is a block special device; zeroes otherwise.</p>
<p>swaplo<br />
The swaplow value for the area in 512-byte blocks.</p>
<p>blocks<br />
The swaplen value for the area in 512-byte blocks.</p>
<p>free<br />
The number of 512-byte blocks in this area that are not currently allocated.</p>
<p>To find the status of total swap usage use the -s option.</p>
<blockquote><p># swap -s<br />
total: 180928k bytes allocated + 28456k reserved = 209384k used, 10691424k available     </p></blockquote>
<p>List the status of all the swap areas. The output has five columns:</p>
<p>path<br />
The path name for the swap area.</p>
<p>dev<br />
The major/minor device number in decimal if it is a block special device; zeroes otherwise.</p>
<p>swaplo<br />
The swaplow value for the area in 512-byte blocks.</p>
<p>blocks<br />
The swaplen value for the area in 512-byte blocks.</p>
<p>free<br />
The number of 512-byte blocks in this area that are not currently allocated.</p>
<p>The total amount of swap space in bytes currently allocated for use as backing store.</p>
<p>reserved<br />
The total amount of swap space in bytes not currently allocated, but claimed by memory mappings for possible future use.</p>
<p>used<br />
The total amount of swap space in bytes that is either allocated or reserved.</p>
<p>available<br />
The total swap space in bytes that is currently available for future reservation and allocation.</p>
<p>These   numbers include swap space from all configured swap areas as listed by the -l option, as well swap space in the form of physical memory.                                                                                                                                  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamescheat.ca/2010/02/how-to-list-the-status-of-swap-in-solaris/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to change the IP address in Solaris 10</title>
		<link>http://www.gamescheat.ca/2010/02/how-to-change-the-ip-address-in-solaris-10/</link>
		<comments>http://www.gamescheat.ca/2010/02/how-to-change-the-ip-address-in-solaris-10/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 16:17:02 +0000</pubDate>
		<dc:creator>Andrew Lin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.gamescheat.ca/?p=794</guid>
		<description><![CDATA[Here is a list of files that you need to edit when changing the IP address of an interface in Solaris 10. /etc/hosts /etc/hostname.interface-name /etc/nodename /etc/defaultrouter /etc/resolv.conf /etc/netmasks Add the ip address and server name to the host file. vi /etc/hosts 10.0.0.10 server-name Select the interface you want, your server may have more than one [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a list of files that you need to edit when changing the IP address of an interface in Solaris 10.<br />
/etc/hosts<br />
/etc/hostname.interface-name<br />
/etc/nodename<br />
/etc/defaultrouter<br />
/etc/resolv.conf<br />
/etc/netmasks</p>
<p>Add the ip address and server name to the host file.</p>
<blockquote><p>vi /etc/hosts<br />
10.0.0.10 server-name</p></blockquote>
<p>Select the interface you want, your server may have more than one network interfaces.</p>
<blockquote><p>vi /etc/hostname.bge0<br />
10.0.0.10 netmask 255.255.255.0</p></blockquote>
<p>Change the node name</p>
<blockquote><p>vi /etc/nodename<br />
server-name</p></blockquote>
<p>Add the gateway ip address</p>
<blockquote><p>vi /etc/defaultrouter<br />
10.0.0.1</p></blockquote>
<p>Add the DNS servers ip addresses</p>
<blockquote><p>vi /etc/resolv.conf<br />
nameserver 168.20.0.10<br />
nameserver 168.20.10.22</p></blockquote>
<p>Add the network address</p>
<blockquote><p>vi /etc/netmasks<br />
10.0.0.0 255.255.255.0</p></blockquote>
<p>Now reboot the server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamescheat.ca/2010/02/how-to-change-the-ip-address-in-solaris-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to configure Samba on Solaris 10</title>
		<link>http://www.gamescheat.ca/2010/02/how-to-configure-samba-on-solaris-10/</link>
		<comments>http://www.gamescheat.ca/2010/02/how-to-configure-samba-on-solaris-10/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 20:31:01 +0000</pubDate>
		<dc:creator>Andrew Lin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Samba]]></category>
		<category><![CDATA[Solaris]]></category>

		<guid isPermaLink="false">http://www.gamescheat.ca/?p=791</guid>
		<description><![CDATA[If you need to find the version of Samba installed on the Solaris 10 server use the command smbstatus. # /usr/sfw/bin/smbstatus Samba version 3.0.35 PID Username Group Machine &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- 1962 andrew users mypc (162.10.21.100) Service pid machine Connected at &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- IPC$ 1962 mypc Thu Feb 11 15:06:31 2010 andrew 1962 mypc Thu Feb 11 15:06:46 [...]]]></description>
			<content:encoded><![CDATA[<p>If you need to find the version of Samba installed on the Solaris 10 server use the command smbstatus.<br />
# /usr/sfw/bin/smbstatus                                  </p>
<p>Samba version 3.0.35<br />
PID     Username      Group         Machine<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
 1962   andrew          users         mypc        (162.10.21.100)   </p>
<p>Service      pid     machine       Connected at<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
IPC$         1962   mypc         Thu Feb 11 15:06:31 2010<br />
andrew     1962   mypc         Thu Feb 11 15:06:46 2010         </p>
<p>I needed to configure Samba installed on my Solaris 10 server and came across this great article that was posted on support.moonpoint.com/os/unix/solaris/samba-solaris10-docusp.php.  Below is a copy of the instructions.</p>
<blockquote><p>If you need to share files between a Windows and a Unix or Linux system, you can use Samba, which is free software that implements the same networking protocol that Microsoft Windows use to share files between systems. If you don&#8217;t already have it on your system, you can download it from Samba &#8211; opening windows to a wider world.<br />
If you have a Solaris 10 system, the Samba software is likely already on the system and you will likely just need to configure it. If you type ls /usr/sfw/bin/smb* and see smblicent, smbstatus, etc. then you already have it on the system. If not, try find / -name smbclient to look for it. </p>
<p>If you have an account already on the Solaris system from which you wish to share files or folders you can use it and can skip to Configuring Samba support for account. But supposing you wish to create a new account specifically for sharing files to a Windows system, then follow the steps below. This explanation was written specifically for sharing files from a Xerox DocuSP system, but is generally applicable to setting up Samba on any Sun Solaris 10 system. </p>
<p>Adding a New Account </p>
<p>While logged into the system from another account, right-click somewhere on the desktop and choose Hosts then Terminal Console. </p>
<p>Switch to the root account, if you aren&#8217;t already logged into that account with su &#8211; root.</p>
<p>Add a new user account with the useradd command.</p>
<p># useradd -u 40022 -g staff -c &#8220;DocuSP folder sharing&#8221; -m -s /usr/bin/bash docusp01</p>
<p>-u specifies the userid. It should be one not already used on the system. You can type cat /etc/passwd to see all of the accounts on the system. The UID value is the number after the second colon in each line.</p>
<p>-g specifies the group the account belongs to and can be staff, if you don&#8217;t have another group you wish to use.</p>
<p>-c allows you to put a comment in the entry.</p>
<p>-m specifies that a home directory be created for the new user. In this case it will be /export/home/docusp01. It is in the form base_dir/account_name where base_dir is the base directory for the new home directories and account_name is the name for the new account.</p>
<p>-s specifies the shell to use for the new account, which in this case the BASH shell, which is located in /usr/bin.</p>
<p>The final parameter on the line is the account name to create, i.e. docusp01 in this case. It will need to be 8 characters or less in length. </p>
<p>Set a password for the account.<br />
# passwd docusp01</p>
<p>If you need to later change any parameters for the account, you can use the usermod command. </p>
<p>Now that you have created the account you wish to use, you can configure Samba support for that account. </p>
<p>Configuring Samba support for account</p>
<p>You need to edit /etc/sfw/smb.conf (You may wish to create a backup copy first), e.g. cp -p /etc/sfw/smb.conf /etc/sfw/smb.conf.old. </p>
<p>Change the line workgroup = WORKGROUP to match whatever workgroup or domain you use for your Windows systems, e.g. workgroup = SOMECOMPANY. </p>
<p>You can also change server string to be whatever you wish. I changed it from the default of server string = XXP240250 to the following: </p>
<p>server string = Xerox DocuColor 250</p>
<p>Choose which systems should have access to shared folders on the Solaris system by adding a hosts allow line. There is one in the smb.conf file to show you how to configure this line, but it is commented out.</p>
<p># hosts allow = 192.168.1. 192.168.2.0./24 192.168.3.0/255.255.255.0 127.0.0.1</p>
<p>If my systems are on a 192.168.0.0/24 subnet, i.e. systems have an address of 192.168.0.x and use a subnet mask of 255.255.255.0, I could allow access from any system on the subnet by using 192.168.0.0/24 or 192.168.0. If I only want to allow access from two specific systems, say 192.168.0.25 and 192.168.0.36, plus the Solaris system itself for testing using the loopback address 127.0.0.1, I would add the following line:<br />
hosts allow = 192.168.0.25 192.168.0.36 127.0.0.1 </p>
<p>If you wish to set a maximum size for the log file that records information about Samba connections, find #max log size = 50, remove the comment character, # and change the number to whaterver you wish to use, e.g. 16384 for 16 MB. </p>
<p>I also uncommented the line that specifies where the log file is located, but changed the line from: </p>
<p>#log file = /usr/local/samba/var/log.%m</p>
<p>To the following line instead: </p>
<p>log file = /var/log/samba/log.%m</p>
<p>I also created a samba directory under /var/log to hold the Samba logs and then changed its protection so only root can view the logs. </p>
<p># mkdir /var/log/samba<br />
# chmod 700 /var/log/samba</p>
<p>At the end of the smb.conf file, you can add information about the folder you wish to share. In this case for the DocuSP system, I want to share the folder /var/spool/XRXnps/saved. I want to make it browseable from the Windows systems to which I am granting access, but I don&#8217;t want them to be able to add files or modify files in the directory. And I only want to grant acces to the new account, docusp01, that I created, so I added the following lines: </p>
<p># DocuSP folder shared read-only to Windows systems<br />
[DocuSP]<br />
   comment = DocuSP XRXnps saved<br />
   path = /var/spool/XRXnps/saved<br />
   valid users = docusp01<br />
   browseable = yes<br />
   public = yes<br />
   writable = no<br />
   printable = no</p>
<p>The valid users = docusp01 will limit access to only the docusp01 account I created. </p>
<p>I need to grant access to the /var/spool/XRXnps/saved directory. Xerox recommends granting read, write, execute access to everyone for this directory using the command below: </p>
<p># chmod 777 /var/spool/XRXnps/saved</p>
<p>I issued that command, though I am still restricting access through /etc/smb.conf. The default permission on the directory prior to issuing that command is shown below: </p>
<p># ls -ld /var/spool/XRXnps/saved<br />
drwxr-xr-x  43 root     other       2048 Mar 23 12:55 /var/spool/XRXnps/saved</p>
<p>When I checked while setting up the system, Samba appeared to be running, i.e., I saw smbd running and when I checkd the services on the system, I saw Samba listed: </p>
<p># ps -ef | grep smb | grep -v grep<br />
    root  1005     1   0   Mar 23 ?           0:00 /usr/sfw/sbin/smbd -D<br />
    root  1007  1005   0   Mar 23 ?           0:00 /usr/sfw/sbin/smbd -D<br />
# svcs | grep samba<br />
legacy_run     Mar_23   lrc:/etc/rc3_d/S90samba</p>
<p>So I stopped and restarted it. </p>
<p># /etc/init.d/samba stop<br />
# /etc/init.d/samba start</p>
<p>Once I did that, I saw the system appear as SIP-8 in the workgroup used by the company for whom I was setting it up, when I checked on what systems were in the workgroup. But you may not always see the system show up immediately. </p>
<p>C:\>net view /domain:frostinc<br />
Server Name            Remark</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
\\FROSTINC26           Cindy&#8217;s Dell Dimension 3000<br />
\\PCWORKSTATION        Gateway Profile 4<br />
\\SIP-8                Xerox DocuColor 250<br />
The command completed successfully.</p>
<p>But to allow access from a Windows PC using the account I created, I needed to set a Samba password for the docusp01 account I created on the Solaris system. You can use the smbpasswd command to create a Samba password for the account that can be used to access the shared folder from a Windows system. This can be the same as the one you use for logging into the account under Solaris, but doesn&#8217;t necessarily have to be the same as the password for the account.</p>
<p># /usr/sfw/bin/smbpasswd -a docusp01<br />
New SMB: password:</p>
<p>The -a specifies that you are adding a new account password rather than changing an existing one. When I first ran the command I received the error message shown below. </p>
<p># /usr/sfw/bin/smbpasswd docusp01<br />
New SMB password:</p>
<p>Retype new SMB password:</p>
<p>startsmbfilepwent_internal: file /opt/XRXnps/XRXsamba/private/smbpasswd did not exist. Couldn&#8217;t create new one. Error was: No such file or directoryUnable to open passdb database.<br />
Failed to find entry for user docusp01.<br />
Failed to modify password entry for user docusp01</p>
<p>In the /etc/sfw/smb.conf file, the lines below appeared: </p>
<p># You may wish to use password encryption. Please read<br />
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.<br />
# Do not enable this option unless you have read those documents<br />
encrypt passwords = yes</p>
<p>smb passwd file = /opt/XRXnps/XRXsamba/private/smbpasswd</p>
<p>Once I realized that the directory XRXsamba did not exist, I created it and the private subdirectory beneath it. </p>
<p># ls /opt/XRXnps/XRXsamba<br />
/opt/XRXnps/XRXsamba: No such file or directory<br />
# mkdir /opt/XRXnps/XRXsamba<br />
# mkdir /opt/XRXnps/XRXsamba/private</p>
<p>I was then able to use the smbpasswd command without the prior error occurring. </p>
<p># /usr/sfw/bin/smbpasswd -a docusp01<br />
New SMB password:</p>
<p>Retype new SMB password:</p>
<p>startsmbfilepwent_internal: file /opt/XRXnps/XRXsamba/private/smbpasswd did not<br />
exist. File successfully created.<br />
Added user docusp01.</p>
<p>And when I looked in the smbd.log file, I saw an entry indicating the encrypted password file had been created. </p>
<p># cat /var/log/samba/log.smbd<br />
[2007/03/25 22:27:58, 0] passdb/pdb_smbpasswd.c:(195)<br />
  startsmbfilepwent_internal: file /opt/XRXnps/XRXsamba/private/smbpasswd did not exist. File successfully created.</p>
<p>I was then able to access the shared folder from one of the Windows PCs to which I had granted access to the shared folder by listing its IP address in /etc/smb.conf. To access the shared folder on the Solaris system from the PC, I used the username of SIP-8\docusp01 and the password for that account. </p>
<p>C:\>net view \\sip-8<br />
Shared resources at \\sip-8</p>
<p>Xerox DocuColor 250</p>
<p>Share name  Type  Used as  Comment</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
DocuSP      Disk  (UNC)    DocuSP XRXnps saved<br />
The command completed successfully.</p>
<p>And from the Solaris system, I could issue the smbstatus command and see the access from the Windows PC. </p>
<p># /usr/sfw/bin/smbstatus<br />
creating lame upcase table<br />
creating lame lowcase table</p>
<p>Samba version 3.0.11<br />
PID     Username      Group         Machine<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
 8446   docusp01      staff         pcworkstation (192.168.0.26)</p>
<p>Service      pid     machine       Connected at<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
DocuSP        8446   pcworkstation  Sun Mar 25 22:43:58 2007</p>
<p>No locked files</p>
<p>And I saw entries appear in /var/log/samba/log.pcworkstation for the connection from the PC. </p>
<p>I could also issue the smbclient command from the Solaris system to view shared directories on the Windows PC. </p>
<p># /usr/sfw/bin/smbclient -L 192.168.0.25 -U Smith</p>
<p>For the smbclient command, the -L parameter specified the address of the PC and the -U parameter specified an account on that Windows PC, for which I received a password prompt </p>
<p>I also set up Samba on a second DocuSP system, SIP-3. When I created a shortcut on the Windows PC&#8217;s desktop, I had to specify the IP address of the Solaris DocuSP system instead of SIP-3, e.g. I had to use \\192.168.0.36\docusp as the location. When prompted for the userid and password, I entered \\SIP-3\docusp-1 as the username and the password for that account set up through smbpasswd on the Solaris system. It was accepted and I was able to access files on the DocuSP system through the shortcut. But the system wasn&#8217;t showing up when I entered the command net view /domain:somecompany.</p></blockquote>
<p>You can also manage Samba via the web console, the url for this interface is http://servername:901</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamescheat.ca/2010/02/how-to-configure-samba-on-solaris-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Got my site added to DMOZ</title>
		<link>http://www.gamescheat.ca/2010/02/got-my-site-added-to-dmoz-2/</link>
		<comments>http://www.gamescheat.ca/2010/02/got-my-site-added-to-dmoz-2/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 14:03:22 +0000</pubDate>
		<dc:creator>Andrew Lin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[DMOZ]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.gamescheat.ca/?p=788</guid>
		<description><![CDATA[Yahoo, it only took four to five tries over a span of four years to get Games Cheat successfully added to DMOZ. I last submitted my site to DMOZ about 5 months ago and forgot about it. I was pleasantly shocked when I was able to find Games Cheat listed on DMOZ. Unfortunately it is [...]]]></description>
			<content:encoded><![CDATA[<p>Yahoo, it only took four to five tries over a span of four years to get Games Cheat successfully added to DMOZ.  I last submitted my site to DMOZ about 5 months ago and forgot about it.  I was pleasantly shocked when I was able to find Games Cheat listed on DMOZ.  Unfortunately it is listed in a category that has zero page rank, but fortunately it is better being listed than not.</p>
<p>Many SEOs suggest that the first thing you should do is to get your site listed in DMOZ to help boot your page rank.  There are just as many SEOs who claim that getting your site listed in DMOZ is worthless.  Strangely there are many sites listed in the DMOZ that should have never been approved.  There are broken links, links that redirect to different site, and sites that looks like crap.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamescheat.ca/2010/02/got-my-site-added-to-dmoz-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
