<?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 &#187; Solaris</title>
	<atom:link href="http://www.gamescheat.ca/tag/solaris/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>Thu, 26 May 2011 18:48:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Nslookup resolves address but ping is unable to resolve hostname on Unix server</title>
		<link>http://www.gamescheat.ca/2010/11/nslookup-resolves-addpress-but-ping-is-unable-to-resolve-hostname-on-unix-server/</link>
		<comments>http://www.gamescheat.ca/2010/11/nslookup-resolves-addpress-but-ping-is-unable-to-resolve-hostname-on-unix-server/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 14:42:58 +0000</pubDate>
		<dc:creator>Andrew Lin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Aix]]></category>
		<category><![CDATA[Linux]]></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=844</guid>
		<description><![CDATA[I came across this issue on my newly built Solaris 10 server. I was able to ping a remote machine by Ip address, but not by its hostname. This indicated that I had the correct route and gateway. Using nslookup and dig I verified that the DNS servers were resolving the hostname to IP address. [...]]]></description>
			<content:encoded><![CDATA[<p>I came across this issue on my newly built Solaris 10 server.  I was able to ping a remote machine by Ip address, but not by its hostname. This indicated that I had the correct route and gateway. Using nslookup and dig I verified that the DNS servers were resolving the hostname to IP address.  I confirmed that the file /etc/resolv.conf had the correct syntax for search domain-name.com.</p>
<p>Here is what my /etc/resolv.conf looks like, the two DNS servers are defined correctly as it the search domain.<br />
<strong>domain andrewlin.com<br />
namesserver 10.10.10.11<br />
namesserver 10.10.11.13<br />
search andrewlin.com</strong><br />
The gateway was defined in /etc/defaultrouter.<br />
<strong>10.10.0.1</strong><br />
It seems that ping did not know how to resolve an address.  I was also not able to surf the internet with the Firefox browser in the Sun Java Desktop System for Soalris.  All symptoms indicated that the nsswitch.conf did not have the correct environment defined.  The /etc/nsswitch.conf file defines which services are to used to retrieve information such as hostnames, password files, and group files.  So in this case for the command ping and firefox which wants to resolve and address, it will check the nsswitch.conf file to see what services to use.</p>
<p>Below are the lines I changed in /etc/nsswitch.conf, by adding dns to the end of each lines.<br />
<strong>hosts: files dns<br />
ipnodes: files dns</strong><br />
I am now able to ping and surf the internet without any issues.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamescheat.ca/2010/11/nslookup-resolves-addpress-but-ping-is-unable-to-resolve-hostname-on-unix-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to map to a remote NFS directory from a VMware ESX 4 server.</title>
		<link>http://www.gamescheat.ca/2010/11/how-to-map-to-a-remote-nfs-directory-from-a-vmware-esx-4-server/</link>
		<comments>http://www.gamescheat.ca/2010/11/how-to-map-to-a-remote-nfs-directory-from-a-vmware-esx-4-server/#comments</comments>
		<pubDate>Tue, 16 Nov 2010 12:00:02 +0000</pubDate>
		<dc:creator>Andrew Lin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[VMware ESX]]></category>

		<guid isPermaLink="false">http://www.gamescheat.ca/?p=842</guid>
		<description><![CDATA[I ran into this error while trying to mount a NFS directory on a remote server from my Vmware ESX4 server. My Vmware esx server is called esx4-server and the remote NFS server is called remote-server. I executed the mount commant and got the below error. [root@esx4-server /]# mount -t nfs remote-server:/home/andrew/mnt mount.nfs: Input/output error [...]]]></description>
			<content:encoded><![CDATA[<p>I ran into this error while trying to mount a NFS directory on a remote server from my Vmware ESX4 server.  My Vmware esx server is called esx4-server and the remote NFS server is called remote-server.<br />
I executed the mount commant and got the below error.<br />
<strong>[root@esx4-server /]# mount -t nfs remote-server:/home/andrew/mnt<br />
mount.nfs: Input/output error</strong><br />
I then decided to use the -v (verbose) option for mount.  This will list the mounting process in verbose, it is better for troubleshooting.<br />
<strong>[root@esx4-server /]# mount -vt nfs remote-server:/home/andrew/mnt<br />
mount: trying 192.20.66.88 prog 100003 vers 3 prot tcp port 2049<br />
mount: trying 192.20.66.88 prog 100005 vers 3 prot udp port 32794<br />
mount.nfs: Input/output error</strong></p>
<p>I then checked the log files for more information, and below are the messages I saw.<br />
<strong>[root@esx4-server /]# cat /var/log/messages<br />
Oct 26 10:32:30 esx4-server vobd: Oct 26 10:32:30.936: 159470608100us: [esx.problem.vmfs.nfs.mount.connect.failed] Failed to mount to server 192.20.66.88 mount point /VMLibrary/. Error: Unable to connect to NFS server.<br />
Oct 26 11:36:50 esx4-server kernel: [162970.448490] portmap: server localhost not responding, timed out<br />
Oct 26 11:36:50 esx4-server kernel: [162970.453525] RPC: failed to contact portmap (errno -5).</strong><br />
From the log file I was able to determine that the pormap service was not started. It is required to map to a remote NFS directory.  I then proceeded with starting the protmap service.<br />
service portmap start</p>
<p>To esure that the service starts automatically when the server reboots use the below command.<br />
<strong>chkconfig portmap on</strong><br />
You may also have to stop the firewall service on the esx server with the command <strong>service firewall stop</strong>.  To prevent it from starting after a reboot, <strong>chkconfig firewall off</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamescheat.ca/2010/11/how-to-map-to-a-remote-nfs-directory-from-a-vmware-esx-4-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sun Sparc commands to power on and boot up the server.</title>
		<link>http://www.gamescheat.ca/2010/11/sun-sparc-commands-to-power-on-and-boot-up-the-server/</link>
		<comments>http://www.gamescheat.ca/2010/11/sun-sparc-commands-to-power-on-and-boot-up-the-server/#comments</comments>
		<pubDate>Mon, 15 Nov 2010 16:06:52 +0000</pubDate>
		<dc:creator>Andrew Lin</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Solaris]]></category>
		<category><![CDATA[Sparc]]></category>
		<category><![CDATA[SUN]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://www.gamescheat.ca/?p=839</guid>
		<description><![CDATA[Booting up the Sun Sparc M3000 server. After logging into the XSCF console, power on the server. XSCF> poweron -d 0 DomainIDs to power on:00 Continue? [y&#124;n] :y Switch to the server console. XSCF> console -d 0 Connect to DomainID 0?[y&#124;n] :y Devalias will list all devices which can be booted. {0} ok devalias cdrom [...]]]></description>
			<content:encoded><![CDATA[<p>Booting up the Sun Sparc M3000 server.</p>
<p>After logging into the XSCF console, power on the server.<br />
XSCF> poweron -d 0<br />
DomainIDs to power on:00<br />
Continue? [y|n] :y</p>
<p>Switch to the server console.<br />
XSCF> console -d 0<br />
Connect to DomainID 0?[y|n] :y</p>
<p>Devalias will list all devices which can be booted.<br />
{0} 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>
<p>To boot from the disk, use the boot command.<br />
{0} ok boot disk<br />
Boot device: /pci@0,600000/pci@0/pci@0/scsi@0/disk@0  File and args:<br />
SunOS Release 5.10 Version Generic_141444-09 64-bit<br />
Copyright 1983-2009 Sun Microsystems, Inc.  All rights reserved<br />
Use is subject to license terms.<br />
Hostname: andrew_lin</p>
<p>Switch back to the XSCF console with<br />
#. will bring you back to the XSCF console.</p>
<p>To list the default boot device use the printenv command.<br />
ok printenv boot-device<br />
boot-device =           /pci@0,600000/pci@0/pci@8/SUNW,qlc@0/fp@0,0/disk@w50060e80058c7b10,1:a</p>
<p>If you wanted to change the default boot device, use the setenv boot-device command.<br />
ok setenv boot-device device[n]</p>
<p>Save the changes with reset-all.<br />
ok reset-all</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gamescheat.ca/2010/11/sun-sparc-commands-to-power-on-and-boot-up-the-server/feed/</wfw:commentRss>
		<slash:comments>1</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>6</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>1</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>3</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>2</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>
	</channel>
</rss>

