Thursday, December 6, 2007

Enable MPxIO for fibre-channel devices in Solaris10 x86

Tip!!: if you use CAM (Common Array Manager from Sun Microsystems) when you asociate the host's iniciator to the WWN of the hba you should select in the Host Type field "Solaris(with Traffict Manager)"

2.1) To enable it You can either user the commad "stmsboot -e"
Note: Automatically updates "/etc/vfstab"file and dump configuration to reflect the device names changes when enabling or disabling Solaris I/O multipathing.
For more information about this command line go to:http://docs.sun.com/app/docs/doc/819-2240/6n4htdnlh?a=view

2.2) Or you can edit the file "/kernel/drv/fp.conf", at the end of it you should find the default value mpxio-disable="yes", just change the value "yes" to "no" and the feature will be enabled ->mpxio-disable="no". Reboot the server after the modification.
IMPORTANT: before you reboot your system, you should comment your entry in the "/etc/vfstab" file (if you have one)... Why??? you may ask...as soon as you reboot the server, the storage device path had changed, and the entry that you had in the "/etc/vfstab"is not valid, the system is going to try to mount the path entered before and won't find it...Guess what!...the system enter in a maitenance mode.

Monday, December 3, 2007

Solaris 8 Migration Assistant - Proyect Etude

Prerequisites:

1) Download the Solaris 8 Migration Assistant software:

http://www.sun.com/download/products.xml?id=470c4a45

s8ma-1_0-fcs-solaris10-sparc.tar.gz includes the following packages:
SUNWs8brandu and SUNWs8brandr.
SUNWs8p2v demo package.


2) Have a Solaris 8 Flash Archive available or create one previous to the test.
For more reference of how to create a Flash Archive please see the Flash Archive information posted previously.

3) Have a sparc server with the following configuration:
* Updated firmware.
* Solaris 10U4(8/07) with latest patches installed (September 2007) or a newer version.
* Patch 127111-01 installed, at the moment of the installation you may notice that you will have to install previously patch 118833-36.


Test Environment:

I just want to give you a look my test environment


This image was created using StarOffice...want to take a look... (http://www.sun.com/software/star/staroffice/reviews.jsp)


Installation Procedure:

1) Install the product, the installation can be made by each package:

# pkgadd -d /path/to/media/s8ma-1_0-rr/Product SUNWs8...

If you want to install all the packages just indicate the path where those are located:

# ls
SUNWs8brandr SUNWs8brandu SUNWs8p2v

# pkgadd -d /patht/to/media/s8ma-1_0- rr/Product

The following packages are available:
1 SUNWs8brandr Solaris 8 Migration Assistant: solaris8 brand support (Root) (sparc)
11.10.0,REV=2007.10.08.16.51
2 SUNWs8brandu Solaris 8 Migration Assistant: solaris8 brand support (Usr) (sparc)
11.10.0,REV=2007.10.08.16.51
3 SUNWs8p2v Solaris 8 p2v Tool (sparc) 11.10.0,REV=2007.10.08.16.51
Select package(s) you wish to process (or 'all' to process
all packages). (default: all) [?,??,q]: all
Processing package instance <SUNWs8brandr> from
Solaris 8 Migration Assistant: solaris8 brand support (Root)(sparc)
11.10.0,REV=2007.10.08.16.51
Copyright 2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Using as the package base directory.
.....

Installing Solaris 8 Migration Assistant: solaris8 brand support (Root) as <SUNWs8brandr>
## Installing part 1 of 1.
....
[ verifying class ]
Installation of <SUNWs8brandr> was successful.
Processing package instance <SUNWs8brandu> from
Solaris 8 Migration Assistant: solaris8 brand support (Usr)(sparc)
11.10.0,REV=2007.10.08.16.51
Copyright 2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.
Using as the package base directory.
....

This package contains scripts which will be executed with super-user
permission during the process of installing this package.
Do you want to continue with the installation of <
SUNWs8brandu> [y,n,?] y
Installing Solaris 8 Migration Assistant: solaris8 brand support (Usr) as <SUNWs8brandu>
## Installing part 1 of 1.
/usr/...

[ verifying class ]
## Executing postinstall script.
Adding service tags for installed solaris8 zones:
Installation of <SUNWs8brandu> was successful.
Processing package instance from
Solaris 8 p2v Tool(sparc) 11.10.0,REV=2007.10.08.16.51
Copyright 2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.

Using as the package base directory.
....
Installing Solaris 8 p2v Tool as <SUNWs8p2v>
## Installing part 1 of 1.
/opt/SUNWs8p2v/bin/create_archive
[ verifying class ]
Installation of <SUNWs8p2v> was successful.


2) Use the command zonecfg to create a Solaris 8 zone, test name: “mys8”:

# zonecfg -z mys8
mys8: No such zone configured
Use 'create' to begin configuring a new zone.
zonecfg:mys8> create -t SUNWsolaris8
zonecfg:mys8> set zonepath=/aux/zones/
mys8
zonecfg:mys8> add net
zonecfg:mys8:net> set physical=e1000g0
zonecfg:mys8:net> set address=x.x.x.x/24
zonecfg:mys8:net> end
zonecfg:mys8> commit

Notes:
-z -> String identifier for a zone
Create -t SUNWsolaris8 -> Creates the zone using the SUNWsolaris8 template.

3) Verify if the zone have been created, using zoneadm command:

# zoneadm list -vc
ID NAME STATUS PATH BRAND IP
0 global running / native shared
- mys8 installed /aux/zones/mys8 solaris8 shared

Notes:
list -> Display the name of the current zones, or specified zone if indicated.
-v -> Display verbose information: zone name, id, current state, root directory,
brand type, ip-type, and options.
-c -> Display all configured zones.


4) Install the Flash Archive already created following the example:

# zoneadm -z mys8 install -u -a /path/to/archive/S8test.flar
Log File: /var/tmp/mys8.install.1214.log
Source: /path/to/archive/
S8test.flar
Installing: This may take several minutes...
Postprocessing: This may take several minutes...
Result: Installation completed successfully.
Log File: /aux/zones/
mys8/root/var/log/mys8.install.1214.log

Notes:
-z -> String identifier for a zone.
install -> Install the specified zone in the system.
-u -> Apply sys-unconfig to the zone, in order to provide a new IP, etc; a new
identity to the zone and avoid duplicated systems.
-a -> Location of archive from which to copy system image (Flash Archive).

5) Verify if the zone is installed, using zoneadm command:

# zoneadm list -vc
ID NAME STATUS PATH BRAND IP
0 global running / native shared
4 mys8 installed /aux/zones/mys8 solaris8 shared

6) Boot the container (if necessary boot the zone in single-user mode in order to create mount point as needed).

# zoneadm -z mys8 boot

Notes:
-z -> String identifier for a zone.
boot -> boot the specified zone.
boot -s -> boot the specified zone in single-user mode.

7)Login to the container using zlogin:

# zlogin -C

Notes:
-C -> Login to the zone console.

8) Answer the Sysid questions, at the end the zone will reboot.

9) Login to “mys8” zone and verify the given configuration:

zonecfg:mys8> info
zonename: mys8
zonepath: /aux/zones/mys8
brand: solaris8
autoboot: false
bootargs:
pool:
limitpriv:
scheduling-class:
ip-type: shared
net:
address: x.x.x.x
physical: e1000g0

10) If you want to obtain information about the server used to provisions the container with the Solaris 8 Flash Archive go to:

# cd /aux/zones/mys8/root
# more identification
archive_id=75e839bf7c360291053b69a78a5b202b
files_archived_method=cpio
creation_date=20071105204038
creation_master=xx
content_name=servername
creation_node=xx
creation_hardware_class=sun4u
creation_platform=SUNW,Sun-Blade-1000
creation_processor=sparc
creation_release=5.8
creation_os_name=SunOS
creation_os_version=Generic_108528-29
files_compressed_method=compress
files_archived_size=2194225812
content_architectures=sun4u

11) Success!!!

Sunday, December 2, 2007

Flash Archive - (Project Etude)

The Flash archive documented in this blog can be used to replicate an operating system or part of it, in this case I'm replicating a Solaris 8 OS in order to perform a Solaris 8 Migration into the newest Sun Microsystem sparc server, using the the benefits of Solaris containers (see Project Etude in the next blog)

Steps to follow:

1) Become a super user (root) or an user that have the same privileges, it is recommended to boot the system that you want to replicate in single-user mode, if that option is not possible, you can create the flash archive from multiuser mode, shut down all the application you want to archive and applications that requires extensive operation system resources.

The system must be as inactive as possible.

2) If you want to create an exact replica of a system, use the following command:

Example:
# flarcreate -n system_copy -c /path/system_copy.flar
-n -> Indicates flash archive name.
-c -> Path where the flash archive is going to be storage and the name.flar which is compressed.

Note: If you are creating the flash archive for etude implementation, you may find that some procedures includes another parameter -S, the only difference with this parameter is that skip the disk space check, the creation of a compressed archive in memory before writing the archive to disk, and do not write the archive size data to the archive, which decrease the time of the archive creation.

# flarcreate -S -n system_copy -c /path/system_copy.flar

3) If you want to create a flash archive just replicating a few of the directories, you should create a file where you indicates the directories included or excluded, we recommend if the customer have data in external disks, to exclude those filesystems and restore it later, if the backup had been made already.

Example:
# flarcreate -n system_copy -z file_directories -c /path/system_copy .flar
-n -> Indicates flash archive name.
-z -> Indicates the name of the file where directories or filesystems are included or exclude.
-c -> Path where the flash archive is going to be storage and the name.flar, which is compressed.

The content of the file indicated in the -z option:

Ejemplo:
# vi file_directories
+ /
+ /var
+ /export/home
+ /reports
- /database
- /extra1
- /extra2


Note: This is used to include or exclude file systems as needed, you can customize the flash archive creation.
* the (+) indicates that the filesystem is included
* the (-) indicates that the filesystem is excluded.

As an confirmation of the creation of the flash archive a zero (0) value should be obtain as a result of the process, if the value is different the command execution failed.

Once the flash archive is created, you are going to be capable to review it's structure following the command line:
Example:

# flar info -l system_copy .flar
/....all the directories or filesystems included ....