Wednesday, April 11, 2012

SFS Emulex management tool - emlxadm


Using the Emulex storage tools to manage Leadville controlled Emulex adapters

With the introduction of Solaris 10, the Sun leadville storage stack was integrated into Solaris. This means that you no longer need to download and install the SFS stack or third party drivers, and the native Solaris tools (e.g., iostat, mpathadm, fcinfo, luxadm, etc.) can be used to manage specific aspects of storage management. I would like to emphasize the word “specific,” since there are a number of management tasks that can’t be performed (or performed easily) with the built-in tools.
If you happen to be using Emulex host bus adapters with Solaris 10, you are in luck! Emulex provides theSFS drivers and emlxadm management tool, which can be used to supplement the tools provided with Solaris. The Emulex tools and drivers are provided by the EMLXemlxu package, which you can download from Emulex’s website. The pkgadd utility can be used to install the package, and it will place the management tools under the /opt/EMLXemlxu directory. To begin using the Emulex storage management tools, you can run the emlxadm utility without any options:
$ /opt/EMLXemlxu/bin/emlxadm
Available Emulex HBA's:

1.  /devices/pci@8,700000/lpfc@5/fp@0,0 (CONNECTED)
2.  /devices/pci@8,700000/lpfc@4/fp@0,0 (CONNECTED)
3.  /devices/pci@9,600000/lpfc@1/fp@0,0 (CONNECTED)
4.  /devices/pci@9,600000/lpfc@2/fp@0,0 (CONNECTED)

Enter an HBA number or zero to exit: 1
This will display the list of adapters that are installed on the system, and will allow you to select a specific adapter to manage. Once you select a specific HBA from the list, you can issue commands through the emlxadm shell to view or configure HBAs. To view the fcode, boot code and firmware versions installed on the detected HBAs, you can use the “get_fw_rev,” “get_fcode_rev” and “get_boot_rev” commands:
emlxadm> get_fw_rev

Firmware revision: LP9002L 3.93a0

emlxadm> get_fcode_rev

FCODE revision: LP9002L 1.41a4

emlxadm> get_boot_rev

Boot revision: LP9002L 5.00a5
To view HBA specific attributes such as the link speed, HBA state and the WWPN assigned to the card, you can run the “get_host_params” command:
emlxadm> get_host_params
Host:
          Dtype: 0
FC4_type[proto]: 0x00000120, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000
          State: Online
      Linkspeed: 2Gb
           D_id: 11b00
           LILP: 0
      Hard Addr: 0
           WWPN: 10000000c936560c
           WWNN: 20000000c936560c
To list the number of targets visible through a specific HBA, the “get_num_devs” command can be used:
emlxadm> get_num_devs
There are 3 devices reported on this port.
Since the fabric name server contains a slew of useful information, emlxadm provides a “ns” command to dump it’s contents:
emlxadm> ns
Nameserver:
-----------------------------------------------------------------------------------
     TYPE: Lport
      PID: 011855
     WWPN: 500104f0005f0276
PORT_NAME: (STK     T9940B          1.35)
     WWNN: 500104f0005f0275
NODE_NAME: (null)
      IPA: ffffffffffffffff
  IP_ADDR: 0.0.0.0
    CLASS: Class3
FC4_TYPES: 00000100,00000000,00000000,00000000,00000000,00000000,00000000,00000000 

-----------------------------------------------------------------------------------
     TYPE: Nport
      PID: 011900
     WWPN: 500104f0005f027f
PORT_NAME: (STK     T9940B          1.35)
     WWNN: 500104f0005f027e
NODE_NAME: (null)
      IPA: ffffffffffffffff
  IP_ADDR: 0.0.0.0
    CLASS: Class3
FC4_TYPES: 00000100,00000000,00000000,00000000,00000000,00000000,00000000,00000000 

-----------------------------------------------------------------------------------
     TYPE: Lport
      PID: 011A55
     WWPN: 500104f0005f0273
PORT_NAME: (STK     T9940B          1.35)
     WWNN: 500104f0005f0272
NODE_NAME: (null)
      IPA: ffffffffffffffff
  IP_ADDR: 0.0.0.0
    CLASS: Class3
FC4_TYPES: 00000100,00000000,00000000,00000000,00000000,00000000,00000000,00000000
The emlxadm utility also provides “download_” commands to download firmware images to each HBA, and has several “reset_” commands to reset HBAs. These are two areas where the native Solaris tools don’t shine so well, so the emlxadm utility is a welcome addition to the Solaris storage stack! Viva la Emulex!!

Monday, September 19, 2011

Installing Oracle WebLogic Server and Creating a Domain

Original link: http://st-curriculum.oracle.com/obe/fmw/wls/10g/r3/installconfig/install_wls/install_wls.htm

Installing Oracle WebLogic Server and Creating a Domain

Installing Oracle WebLogic Server and Creating a Domain
Purpose

This OBE tutorial describes and shows you how to install and configure the Oracle WebLogic Server Instance.

Time to Complete

Approximately 1 hour
Topics

This OBE tutorial covers the following topics:
Overview
Scenario
Verifying the Prerequisites
Installing Oracle WebLogic Server Platform
Creating a New WebLogic Server Domain
Summary
Related information
Viewing Screenshots

Place the cursor over this icon to load and view all the screenshots for this tutorial. (Caution: Because this action loads all screenshots simultaneously, response time may be slow depending on your Internet connection.)

Note: Alternatively, you can place the cursor over each individual icon in the following steps to load and view only the screenshot associated with that step.

The screenshots will not reflect the specific environment you are using. They are provided to give you an idea of where to locate specific functionality in Oracle WebLogic Server.
Overview

Oracle WebLogic Server 10.3 offers a common application architecture that includes the following:

A set of integrated technology framework that provides a solutions-oriented starting point for addressing your project needs
A unified, simplified management architecture empowering developers and administrators to realize business objectives in an environment that is populated with distributed, heterogeneous technologies and platforms
A highly-reliable, available, scalable, extensible, standards-based and high-performing foundation—WebLogic Server—that allows you to have flexibility in your IT solutions

Back to Topic List
Scenario

You are an application server administrator in Dizzyworld Corporation. You will install and configure the Oracle WebLogic Server for your enterprise setup. By using Oracle WebLogic Server, you can deploy, execute, and maintain highly integrated and reliable enterprise applications. Oracle WebLogic Server increases productivity and lowers the Total Cost of Ownership (TCO) for enterprise setups by providing a unified, simplified, extensible platform for system administrators and management.



Back to Topic List
Verifying the Prerequisites

Before you start the tasks, make sure that your system environment meets the following requirements:

Software Requirements

The system should have Oracle WebLogic Server 10.3 installed.

Hardware Requirements
Item Specification
Processor Type Intel Xeon or Pentium IV
Processor Speed 2.4 GHz or higher
Number of Processors 1 or more (if required)
Memory 2 GB
Hard Disk Space 20 GB (initial size)
Operating System RedHat Enterprise Linux 4 Update 5

Back to Topic List



Installing Oracle WebLogic Server Platform


To install the Oracle WebLogic Server Platform, perform the following steps:

1.


Navigate to the staged location for the Linux installable and enter the following command at the prompt and then click Next.

$ cd /stage
$ ./server103_linux32.bin



2.


The Choose BEA Home Directory screen appears. In the path field, enter /u01/app/oracle/product/Middleware and click Next.


3.

In the Choose Install Type screen, select the Custom option and click Next.


4.

The Choose Products and Components screen appears. Deselect the Workshop option and then click Next.


5.

Select the bundled BEA JRockit 1.6.0_05 SDK option and click Next.


6.

Under the Product Installation Directories section, enter the WebLogic Server home path as /u01/app/oracle/product/Middleware/wlserver_10.3 and click Next.


7.

Review the installation summary and click Next.


8.

Notice that the installation is completed. Next, click Done. You can view the QUICKSTART information and then click "X" to close the dialog box.



Back to Topic List

Creating a New WebLogic Server Domain

A domain is the basic administration unit for Oracle WebLogic Server. It consists of one or more Oracle WebLogic Server instances and logically related resources and services that are managed collectively, as one unit. The basic domain infrastructure consists of one Administration Server and optional Managed Servers and clusters. To create a new WebLogic Server Domain, perform the following steps:

1.


Navigate to /u01/app/oracle/product/Middleware/wlserver_10.3/common/bin and run the config.sh file.



2.


Select the Create a new WebLogic domain option and click Next.


3.

In the Select Domain Source screen, retain the Generate a domain configured automatically to support the following products: option and click Next.


4.

In the Configure Administrator Username and Password page, provide the following values:
Parameter Value
User name admin
User password welcome1
Description Retain the default value


5.

In the Configure Server Start Mode and JDK step, under the WebLogic Domain Startup Mode, select the Production Mode option and click Next.


6.

In the Customize Environment and Services Settings page, select the Yes option and click Next.


7.

In the Configure RDBMS Security Store Database step, retain the default values and click Next.


8.

In the Configure the Administration Server step, retain the default values and click Next.




9.

In the Configure Managed Servers step, Click Add and provide the following values and click Next.
Parameter Value
Name dizzy1
Listen address default value
Listen port 7003
SSL listen port N/A
SSL enabled unchecked

Note: Repeat the step for adding another Managed Server dizzy2 with Listen port as 7005.


10.

In the Configure Clusters step, click Next.




11.

In the Configure Machines step, click Next.




12.

Review the WebLogic Domain summary and click Next.




13.

Type the Domain name as dizzyworld and click Create.




14.

Review the WebLogic Domain summary and click Next.




15.

In the Creating Domain screen, click Done.




16.

To view the directory structure and files for the newly created domain, enter the following commands at the prompt:

$ cd /u01/app/oracle/product/Middleware/user_projects/domains/dizzyworld
$ ls




17.

To start the WebLogic Server instance, enter ./startWebLogic.sh.


Note: Type the username as admin and password as welcome1 when prompted.


18.

To start the Web console, open the browser, enter http://localhost:7001/console and click Go.




19.

In the Login screen, type admin and welcome1 in the Username and Password fields, respectively. Next, click Log In.




20.

The home page for the Web console is displayed.





Back to Topic List


Summary

In this lesson, you learned how to:
Verify the Prerequisites
Install Oracle WebLogic Server Platform
Create a New WebLogic Server Domain

Back to Topic List



Related Information

Back to Topic List

Place the cursor over this icon to hide all screenshots.




Wednesday, May 25, 2011

Sample httpd.conf and rhel6dvd.conf

Sample httpd.conf and rhel6dvd.conf to list directory contents of /vol01/rhel6dvd for the purpose of remote linux install using http method.




[pandrel@rhel6-n3 conf]$ cat httpd.conf |egrep -v '^$|^#'
ServerTokens OS
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 60
KeepAlive Off
MaxKeepAliveRequests 100
KeepAliveTimeout 15

StartServers 8
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000


StartServers 4
MaxClients 300
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0

Listen 80
Listen 81
LoadModule auth_basic_module modules/mod_auth_basic.so
LoadModule auth_digest_module modules/mod_auth_digest.so
LoadModule authn_file_module modules/mod_authn_file.so
LoadModule authn_alias_module modules/mod_authn_alias.so
LoadModule authn_anon_module modules/mod_authn_anon.so
LoadModule authn_dbm_module modules/mod_authn_dbm.so
LoadModule authn_default_module modules/mod_authn_default.so
LoadModule authz_host_module modules/mod_authz_host.so
LoadModule authz_user_module modules/mod_authz_user.so
LoadModule authz_owner_module modules/mod_authz_owner.so
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so
LoadModule authz_dbm_module modules/mod_authz_dbm.so
LoadModule authz_default_module modules/mod_authz_default.so
LoadModule ldap_module modules/mod_ldap.so
LoadModule authnz_ldap_module modules/mod_authnz_ldap.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule mime_magic_module modules/mod_mime_magic.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule actions_module modules/mod_actions.so
LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule substitute_module modules/mod_substitute.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_ftp_module modules/mod_proxy_ftp.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule proxy_ajp_module modules/mod_proxy_ajp.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule cache_module modules/mod_cache.so
LoadModule suexec_module modules/mod_suexec.so
LoadModule disk_cache_module modules/mod_disk_cache.so
LoadModule cgi_module modules/mod_cgi.so
LoadModule version_module modules/mod_version.so
Include conf.d/*.conf
User apache
Group apache
ServerAdmin root@localhost
ServerName rhel6-n3
UseCanonicalName Off
DocumentRoot "/var/www/html"

Options Indexes FollowSymLinks
IndexOptions Type=text/plain
AllowOverride None


Options Indexes FollowSymLinks
IndexOptions Type=text/plain
AllowOverride None
Order allow,deny
Allow from all


#
# UserDir is disabled by default since it can confirm the presence
# of a username on the system (depending on home directory
# permissions).
#
UserDir disabled
#
# To enable requests to /~user/ to serve the user's public_html
# directory, remove the "UserDir disabled" line above, and uncomment
# the following line instead:
#
#UserDir public_html

DirectoryIndex index.html index.html.var
AccessFileName .htaccess

Order allow,deny
Deny from all
Satisfy All

TypesConfig /etc/mime.types
DefaultType text/plain

MIMEMagicFile conf/magic

HostnameLookups Off
ErrorLog logs/error_log
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog logs/access_log combined
ServerSignature On
Alias /icons/ "/var/www/icons/"

Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all


# Location of the WebDAV lock database.
DAVLockDB /var/lib/dav/lockdb

ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"

AllowOverride None
Options None
Order allow,deny
Allow from all

IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
AddIconByType (TXT,/icons/text.gif) text/*
AddIconByType (IMG,/icons/image2.gif) image/*
AddIconByType (SND,/icons/sound2.gif) audio/*
AddIconByType (VID,/icons/movie.gif) video/*
AddIcon /icons/binary.gif .bin .exe
AddIcon /icons/binhex.gif .hqx
AddIcon /icons/tar.gif .tar
AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
AddIcon /icons/a.gif .ps .ai .eps
AddIcon /icons/layout.gif .html .shtml .htm .pdf
AddIcon /icons/text.gif .txt
AddIcon /icons/c.gif .c
AddIcon /icons/p.gif .pl .py
AddIcon /icons/f.gif .for
AddIcon /icons/dvi.gif .dvi
AddIcon /icons/uuencoded.gif .uu
AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
AddIcon /icons/tex.gif .tex
AddIcon /icons/bomb.gif core
AddIcon /icons/back.gif ..
AddIcon /icons/hand.right.gif README
AddIcon /icons/folder.gif ^^DIRECTORY^^
AddIcon /icons/blank.gif ^^BLANKICON^^
DefaultIcon /icons/unknown.gif
ReadmeName README.html
HeaderName HEADER.html
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
AddLanguage ca .ca
AddLanguage cs .cz .cs
AddLanguage da .dk
AddLanguage de .de
AddLanguage el .el
AddLanguage en .en
AddLanguage eo .eo
AddLanguage es .es
AddLanguage et .et
AddLanguage fr .fr
AddLanguage he .he
AddLanguage hr .hr
AddLanguage it .it
AddLanguage ja .ja
AddLanguage ko .ko
AddLanguage ltz .ltz
AddLanguage nl .nl
AddLanguage nn .nn
AddLanguage no .no
AddLanguage pl .po
AddLanguage pt .pt
AddLanguage pt-BR .pt-br
AddLanguage ru .ru
AddLanguage sv .sv
AddLanguage zh-CN .zh-cn
AddLanguage zh-TW .zh-tw
LanguagePriority en ca cs da de el eo es et fr he hr it ja ko ltz nl nn no pl pt pt-BR ru sv zh-CN zh-TW
ForceLanguagePriority Prefer Fallback
AddDefaultCharset UTF-8
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
AddHandler type-map var
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/error/"



AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback



BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully
---------------------------------------------------------------------


[pandrel@rhel6-n3 httpd]$ cat conf.d/rhel6dvd.conf

ServerName rhel6-n3
DocumentRoot "/vol01"

Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all



SELinux Apache Security

Apache and Security Arrangements
If you have an iptables firewall on your computer, you'll need to disable it at least for TCP/IP port 80. If you're configuring a secure Web site, you'll also need to disable iptables for port 443. If you've enabled SELinux, you'll need to change the Access Control List (ACL) security contexts of key directories. Chapter 15 describes these processes in detail. For now, just take the following two steps:

Run system-config-securitylevel, allow incoming WWW (HTTP) and Secure WWW (HTTPS) connections as "Trusted Services," and exit normally.

Run the ls -Z /var/www command. Note the ACL settings. If you configure other directories for Web services, you'll need to change their ACL settings. For example, if you create and then use the /www directory, run the following commands:

# chcon -R -u system_u /www/
# chcon -R -t httpd_sys_content_t /www/

Host-Based Security
You can add the Order, allow, and deny directives to regulate access based on host names or IP addresses. This basic command allows access by default. It reads the deny directive first:

Order deny,allow

Apache configuration

Installation
The RPM packages required by Apache are included in the Web Server package group. If required on the Installation and Configuration portion of the exam, you should install Apache during the installation process. But mistakes happen. Just remember that the simplest way to install Apache after installation is with the following command:

# yum install httpd

Alternatively, if you need the Red Hat GUI Apache Management tool, run the following command, which also installs the Apache httpd RPM as a dependency:

# yum install system-config-httpd

Another option is to just install the default packages associated with the entire Web Server package group with the following command:

# yum groupinstall web-server

If you don't remember the names of available groups, run the yum grouplist command. From the output, you should see "Web Server"; in other words, the following command also works:

# yum groupinstall "Web Server"

If your exam instructions require the installation of other packages such as mod_ssl (required for secure Web sites) and Squid, you can combine their installation in the same command:

# yum install mod_ssl squid

If in doubt about package names, you can find them in the Web Server package group, as documented on the first installation CD in the Server/repodatata/comps-rhel5-server-core.xml file. If you're working with the RHEL 5 desktop, substitute Client for Server (upper- and lowercase). Once you've connected to a repository such as the RHN, the same information should be available in comps.xml in the /var/cache/yum/rhel-i386-server-5 directory. If you're working a different architecture and a client, substitute accordingly.

Starting on Reboot
Once Apache is installed, you'll want to make sure it starts the next time you boot Linux. If it doesn't start when the person who grades your Red Hat exam reboots your computer, you may not get credit for your work on the Apache service.

The most straightforward way to make sure Apache starts the next time you boot Linux is with the chkconfig command. You'll need to set it to start in at least runlevels 3 and 5, with a command such as:

# chkconfig --level 35 httpd on

Alternatively, you can configure it to start in all standard runlevels (2, 3, 4, and 5) with the following command:

# chkconfig httpd on

To determine whether the chkconfig command worked, use the --list switch:

# chkconfig --list httpd

Normally to start services, it's best to use the associated script in the /etc/init.d directory, which contains an httpd script. However, Apache often starts and stops more gracefully with the following commands:

# apachectl stop
# apachectl start


The Apache Configuration Files
There are two key configuration files for the Apache Web server: httpd.conf in the /etc/httpd/conf directory and ssl.conf in the /etc/httpd/conf.d directory. The default versions of these files create a generic Web server service you can further customize and optimize, as desired. There are other configuration files in two directories: /etc/httpd/conf and /etc/httpd/conf.d. They're illustrated in Figure 9-2.


Figure 9-2: Apache configuration files
On the Job Previous versions of Apache-1.3.x and earlier-required two other Apache configuration files in the same directory: access.conf and srm.conf. Even though these files were essentially blank in later versions of Apache 1.3.x, they were still required. These files are no longer required in any way in Apache 2.x.


You need to know the httpd.conf file in the /etc/httpd/conf directory well. If you're required to configure a secure Web server during the RHCE exam, you'll also need to configure the ssl.conf configuration file in the /etc/httpd/conf.d directory.

Analyzing the Default Apache Configuration
Apache comes with a well-commented set of default configuration files. In this section, you'll look at the key commands in the httpd.conf configuration file, in the /etc/httpd/conf directory. Browse through this file in your favorite text editor or using a command such as less. Before beginning this analysis, keep two things in mind:

If you configure Apache with the Red Hat HTTP tool (system-config-httpd), it overwrites any changes that you may have made with a text editor.

The main Apache configuration file incorporates the files in the /etc/httpd/conf.d directory with the following directive:

Include conf.d/*.conf

There are a couple of basic constructs in httpd.conf. First, directories, files, and modules are configured in "containers." The beginning of the container starts with the name of the directory, file, or module to be configured, contained in directional brackets (< >). Examples of this include:






The end of the container starts with a forward slash (/). For the same examples, the ends of the containers would look like:





Next, Apache includes a substantial number of directives-commands that Apache can understand that have some resemblance to English. For example, the ExecCGI directive allows executable CGI scripts.

As the RHCE course divides the discussion of Apache into different units, I do the same here. However, the following sections, with the exception of secure virtual hosts, are based on the same httpd.conf file in the /etc/httpd/conf/ directory.

While this provides an overview, the devil is often in the details, which are analyzed (briefly) in the next section. For detailed information, see the Apache Web site at http://httpd.apache.org.

Analyzing httpd.conf
This section examines the default Apache configuration file, httpd.conf. If you want to follow along, open it on your system. Only the default active directives in that file are discussed here. Read the comments; they include more information and options.

For detailed information on each directive, see http://httpd.apache.org/docs/2.2/mod/quickreference.html. The default directives are summarized in the following three tables. Table 9-1 specifies directives associated with Section 1: Global Environment.

Table 9-1: Global Environment Directives Directive
Description

ServerTokens
Specifies the response code at the bottom of error pages; if you're interested, see what happens when you change the values between OS, Prod, Major, Minor, Min, and Full.

ServerRoot
Sets the default directory; other directives are subdirectories.

PidFile
Names the file with the Process ID (and locks the service).

Timeout
Limits access time for both sent and received messages.

KeepAlive
Supports persistent connections.

MaxKeepAliveRequests
Limits requests during persistent connections (unless set to 0, which is no limit).

KeepAliveTimeout
Sets a time limit, in seconds, before a connection is closed.

StartServers
Adds child Apache processes; normally set to 8, which means 9 Apache processes run upon startup.

MinSpareServers
Specifies a minimum number of idle child servers.

MaxSpareServers
Specifies a maximum number of idle child servers; always at least +1 greater than MinSpareServers.

ServerLimit
Sets a limit on configurable processes; cannot exceed 20000.

MaxClients
Limits the number of simultaneous requests; other requests to the server just have to wait.

MaxRequestsPerChild
Limits the requests per child server process.

MinSpareThreads
Specifies the minimum number of spare threads to handle additional requests.

MaxSpareThreads
Specifies the maximum number of available idle threads to handle additional requests.

ThreadsPerChild
Sets the number of threads per child server process.

Listen
Specifies a port and possibly an IP address (for multihomed systems) to listen for requests.

LoadModule
Loads various modular components, such as authentication, user tracking, executable files, and more.

Include
Adds the content of other configuration files.

User
Specifies the username run by Apache on the local system.

Group
Specifies the group name run by Apache on the local system.


In all three tables, directives are listed in the order shown in the default version of httpd.conf. If you want to experiment with different values for each directive, save the change and then use apachectl restart to restart the Apache daemon. If not defined in these tables, directives are described, later in this chapter, as they appear in the configuration file.

Table 9-2 specifies directives associated with Section 2: Main Server Configuration.

Table 9-2: Main Server Configuration Directives Directive
Description

ServerAdmin
Sets the administrative e-mail address; may be shown (or linked to) on default error pages.

UseCanonicalName
Supports the use of ServerName as the referenced URL.

DocumentRoot
Assigns the root directory for Web site files.

Options
Specifies features associated with Web directories, such as ExecCGI, FollowSymLinks, Includes, Indexes, MultiViews, and SymLinksIfOwnerMatch.

AllowOverride
Supports overriding of previous directives from .htaccess files.

Order
Sets the sequence for evaluating Allow and Deny directives.

Allow
Configures host computers that are allowed access.

Deny
Configures host computers that are denied access.

UserDir
Specifies location of user directories; can be set to enable or disable for all or specified users.

DirectoryIndex
Specifies files to look for when navigating to a directory; set to index.html by default.

AccessFileName
Sets a filename within a directory for more directives; normally looks for .htaccess.

TypesConfig
Locates mime.types, which specifies file types associated with extensions.

DefaultType
Sets a default file type if not found in mime.types.

MIMEMagicFile
Normally looks to /etc/httpd/conf/magic to look inside a file for its MIME type.

HostNameLookups
Requires URL lookups for IP addresses; results are logged.

ErrorLog
Locates the error log file, relative to ServerRoot.

LogLevel
Specifies the level of log messages.

LogFormat
Sets the information included in log files.

CustomLog
Creates a customized log file, in a different format, with a location relative to ServerRoot.

ServerSignature
Adds a list with server version and possibly ServerAdmin e-mail address to error pages and file lists; can be set to On, OFF, or EMail.

Alias
Configures a directory location; similar to a soft link.

DAVLockDB
Specifies the path to the lock file for the WebDAV (Web-based Distributed Authoring and Versioning) database.

ScriptAlias
Similar to Alias; for scripts.

IndexOptions
Specifies how files are listed from a DirectoryIndex.

AddIconByEncoding
Assigns an icon for a file by MIME encoding.

AddIconByType
Assigns an icon for a file by MIME type.

AddIcon
Assigns an icon for a file by extension.

DefaultIcon
Sets a default icon for files not otherwise configured.

ReadmeName
Configures a location for a README file to go with a directory list.

HeaderName
Configures a location for a HEADER file to go with a directory list.

IndexIgnore
Adds files that are not included in a directory list.

AddLanguage
Assigns a language for file name extensions.

LanguagePriority
Sets a priority of languages if not configured in client browsers.

ForceLanguagePriority
Specifies action if a Web page in the preferred language is not found.

AddDefaultCharset
Sets a default character set; you may need to change it for different languages.

AddType
Maps file name extensions to a specified content type.

AddHandler
Maps file name extensions to a specified handler; commonly used for scripts or multiple languages.

AddOutputFilter
Maps file name extensions to a specified filter.

BrowserMatch
Customizes responses to different browser clients.


Table 9-3 specifies directives associated with Section 3: Virtual Hosts. While virtual host directives are disabled by default, I include those directives in the commented example near the end of the default httpd.conf file. While these directives were already used in other sections, you can-and should-customize them for individual virtual hosts to support different Web sites on the same Apache server.

Table 9-3: Virtual Host Configuration Directives Directive
Description

NameVirtualHost
Specifies an IP address for multiple virtual hosts.

ServerAdmin
Assigns an e-mail address for the specified virtual host.

DocumentRoot
Sets a root directory for the virtual host.

ServerName
Names the URL for the virtual host.

ErrorLog
Creates an error log; the location is based on the DocumentRoot.

CustomLog
Creates an custom log; the location is based on the DocumentRoot.


Basic Apache Configuration for a Simple Web Server
As described earlier, Apache looks for Web pages in the directory specified by the DocumentRoot directive. In the default httpd.conf file, this directive points to the /var/www/html directory.

In other words, all you need to get your Web server up and running is to transfer Web pages to the /var/www/html directory.

The default DirectoryIndex directive looks for an index.html Web page file in this directory. You can test this for yourself by copying the default Firefox home page file, index.html, from the /usr/share/doc/HTML directory.

The base location of configuration and log files is determined by the ServerRoot directive. The default value from httpd.conf is

ServerRoot "/etc/httpd"

You'll note that the main configuration files are stored in the conf and conf.d subdirectories of the ServerRoot. If you run the ls -l /etc/httpd command, you'll find that Red Hat links /etc/httpd/logs to the directory with the actual log files, /var/log/httpd.




Apache Access Configuration
There are several parameters associated with security on the Apache Web server. The security of the server is enforced in part by firewalls and SELinux. Internal Apache security measures are associated with the main Apache httpd.conf configuration file.

Now that you've glanced at the configuration file, it's time to analyze it, and its associated directories, with a view toward security.

Basic Apache Security
You can modify the httpd.conf configuration file to secure the entire server or manage security on a directory-by-directory basis. Directory controls secure access by the server, as well as users who connect to the Web sites on the server. To explore the basics of Apache security, start with the first default active line in httpd.conf:

ServerTokens OS


This line looks deceptively simple; it limits what readers see about your Web server when you browse to a nonexistent page. If you don't use this command, outsiders can see whether you've loaded modules such as Perl, Python, and PHP. Sharing this knowledge can make your system more vulnerable. You can restrict access to the root directory on your Web server as shown here:


Options FollowSymLinks
AllowOverride None


This configures a very restrictive set of permissions. The Options FollowSymLinks line supports the use of symbolic links for Web pages. The AllowOverride None line disables any .htaccess files. Otherwise, .htaccess can allow others to administer your server, starting from the DocumentRoot directory. If .htaccess is in a subdirectory, such as /var/www/html/data/, the additional directives, if permitted by AllowOverride, would apply only to that directory.

You can improve this by limiting access to all but explicitly allowed users, such as those within your company, by adding the following commands to the container:

Order deny,allow
Deny from all

The next excerpt limits access to /var/www/html, which corresponds to the default DocumentRoot directive (while these directives are divided by numerous comments, they are all in the same stanza):


Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all


You'll note that the Options directive has changed; the Indexes setting allows readers to see a list of files on your Web server if no index.html file is present in the directory as defined by DocumentRoot. The Order and Allow lines allow all users to access the Web pages on this server.

Finally, the Listen directive defines the IP address and TCP/IP port for this server. For example, the default shown next means that this server will work with every computer that requests a Web page from any of the IP addresses for your computer on the standard TCP/IP port, 80:

Listen 80


If you have more than one IP address on your computer, you can use this directive to limit this Web server to one specific IP address. For example, if you've set up an intranet on this Web server, you could use the IP address that connects to your private network here.

If you're also setting up secure Web services, there's a second Listen directive in the ssl.conf file in the /etc/httpd/conf.d directory. The data from this file is automatically incorporated into your Apache configuration. It includes the following directive, which points to the default secure HTTP (HTTPS) port for TCP/IP, 443:

Listen 443




Exam Watch
The Red Hat Exam Prep guide suggests that you need to be ready to configure a regular HTTP and a secure HTTPS Web site.





Apache and Security Arrangements
If you have an iptables firewall on your computer, you'll need to disable it at least for TCP/IP port 80. If you're configuring a secure Web site, you'll also need to disable iptables for port 443. If you've enabled SELinux, you'll need to change the Access Control List (ACL) security contexts of key directories. Chapter 15 describes these processes in detail. For now, just take the following two steps:

Run system-config-securitylevel, allow incoming WWW (HTTP) and Secure WWW (HTTPS) connections as "Trusted Services," and exit normally.

Run the ls -Z /var/www command. Note the ACL settings. If you configure other directories for Web services, you'll need to change their ACL settings. For example, if you create and then use the /www directory, run the following commands:

# chcon -R -u system_u /www/
# chcon -R -t httpd_sys_content_t /www/

Host-Based Security
You can add the Order, allow, and deny directives to regulate access based on host names or IP addresses. This basic command allows access by default. It reads the deny directive first:

Order deny,allow

Monday, May 10, 2010

Veritas DMP statistics notes

Original source:http://unix-essentials.blogspot.com/search/label/SAN
VxVM - DMP Load Balancing

How to configure load balancing across multiple primary paths in an Active/Passive DMP environment using VERITAS Volume Manager (tm) 4.x

Details:

In an Active/Passive Dynamic Multipathing (DMP) environment, it is possible that there may be multiple primary paths to a device due to a mesh of SAN switches. Volume Manager 4.0 can be configured to allow load balancing across multiple primary paths. This TechNote explains how to do this.

Note: This feature was not available in releases prior to 4.0

In the following example, device c3t2d15 belongs to a disk group named tonydg and contains a simple concatenated volume named tony1. The device has eight primary paths:

# vxdisk list c3t2d15s2
Device: c3t2d15s2
<..snip..>
numpaths: 8
c2t0d15s2 state=enabled type=primary
c2t1d15s2 state=enabled type=primary
c3t1d15s2 state=enabled type=primary
c3t2d15s2 state=enabled type=primary
c4t3d15s2 state=enabled type=primary
c4t4d15s2 state=enabled type=primary
c5t3d15s2 state=enabled type=primary
c5t5d15s2 state=enabled type=primary



DMP statistics are enabled and a read based workload is applied to the volume:

# vxdmpadm iostat start

# dd if=/dev/vx/rdsk/tonydg/tony1 of=/dev/null bs=512k count=6144



By displaying the DMP statistics for device c3t2d15, it can be seen that all I/Os are being directed to one subpath, c5t5d15:

# vxdmpadm iostat show dmpnodename=c3t2d15s2
cpu usage = 8023us per cpu memory = 32768b
OPERATIONS MBYTES AVG TIME(ms)
PATHNAME READS WRITES READS WRITES READS WRITES
c2t0d15s2 0 0 0 0 0.000000 0.000000
c2t1d15s2 0 0 0 0 0.000000 0.000000
c3t1d15s2 0 0 0 0 0.000000 0.000000
c3t2d15s2 0 0 0 0 0.000000 0.000000
c4t3d15s2 0 0 0 0 0.000000 0.000000
c4t4d15s2 0 0 0 0 0.000000 0.000000
c5t3d15s2 0 0 0 0 0.000000 0.000000
c5t5d15s2 6144 0 3145728 0 0.011081 0.000000



Using vxdmpadm, it is clear that the default iopolicy for this enclosure is Single Active (which explains the above behavior):

# vxdmpadm getattr enclosure HDS92000 iopolicy
ENCLR_NAME DEFAULT CURRENT
============================================
HDS92000 Single-Active Single-Active



To load balance across multiple primaries, the iopolicy should be set to round-robin:

# vxdmpadm setattr enclosure HDS92000 iopolicy=round-robin

# vxdmpadm getattr enclosure HDS92000 iopolicy
ENCLR_NAME DEFAULT CURRENT
============================================
HDS92000 Single-Active Round-Robin



The DMP statistics are reset and the same workload is applied to the volume, load balancing across the primary paths can be seen.

# vxdmpadm iostat reset

# dd if=/dev/vx/rdsk/tonydg/tony1 of=/dev/null bs=512k count=6144

# vxdmpadm iostat show dmpnodename=c3t2d15s2
cpu usage = 7223us per cpu memory = 32768b
OPERATIONS MBYTES AVG TIME(ms)
PATHNAME READS WRITES READS WRITES READS WRITES
c2t0d15s2 786 0 402432 0 0.011013 0.000000
c2t1d15s2 778 0 398336 0 0.011267 0.000000
c3t1d15s2 772 0 395264 0 0.011205 0.000000
c3t2d15s2 744 0 380928 0 0.011094 0.000000
c4t3d15s2 750 0 384000 0 0.011029 0.000000
c4t4d15s2 768 0 393216 0 0.011169 0.000000
c5t3d15s2 733 0 375296 0 0.010943 0.000000
c5t5d15s2 813 0 416256 0 0.011068 0.000000



The enclosure can be returned to its default policy of single active with the following:

# vxdmpadm setattr enclosure HDS92000 iopolicy=singleactive



Note: This setting is not persistent across reboots, I/O policies will revert to their default. Persistence can be configured by adding the relevant vxdmpadm command to a boot script.


Monday, October 5, 2009

Some veritas usefull troubleshooting issues

original source: http://www.knodel.net/jeff/blog


Filesystems in shared disk group will not mount shared:

Tuesday, July 25th, 2006

Problem: You have imported your CVM disk group as shared, and its imported on all nodes of your cluster, but when you try to mount a volume, you get:

# mount -F vxfs -o cluster /dev/vx/dsk/oratestdg/oratest /oratest
UX:vxfs mount: ERROR: V-3-20003: Cannot open /dev/vx/dsk/oratestdg/oratest: No such device or address
UX:vxfs mount: ERROR: V-3-24996: Unable to get disk layout version
Solution:  The problem is that you do not have the disk group activation mode set properly.  If you run a vxdg list [dgname] , you can see the activation mode for each node.

Examine the contents of your /etc/default/vxdg.  You will probably see a line like:

default_activation_mode=off

Change it to default_activation_mode=sw, and restart veritas. 

 If you want to do it interactively by disk group, try vxdg -g [dgname] set activation=sw

 

Cannot add device to a CDS Disk Group

Monday, July 3rd, 2006

Problem: You are trying to initialize a disk group, and you are getting the following error:

# vxdg init vxfencoorddg c2t0d64
VxVM vxdg ERROR V-5-1-6478 Device c2t0d64s2 cannot be added to a CDS disk group
Solution: Set up the disk to be a CDS disk before running the init.

# vxdisksetup -i c2t0d64  format=cdsdisk

# vxdg init vxfencoorddg c2t0d64 

VERITAS vxfentsthdw will not process i/o fencing quorum disks

Monday, July 3rd, 2006

Problem: You are trying to run veritas’s hardware test, and despite meeting the hardware requirements, the tests fail with:

VCS FEN vxfenadm ERROR V-11-2-1204 Command 3 FAILED for: /dev/vx/rdmp/c2t0d215s2
VCS FEN vxfenadm ERROR V-11-2-1210 CLEAR failed for: /dev/vx/rdmp/c2t0d215s2
VCS FEN vxfenadm ERROR V-11-2-1133 Error returned
Solution: Veritas’ tool cannot use the Veritas Dynamic Multipathing device entry; you cannot use the /dev/rdmp path to the disks.  Try using the first /dev/rdsk/CTDS path to the device available.

While I am at it — if you are using the raw disk path (ie /dev/rdsk…) and it says that the device does not exist, and an ls -l (path) shows that it does — you need to write a solaris label onto the disk before the veritas processes can use the disk.

Sample Error: “Disk /dev/rdsk/c3t0d219s2 is not existent on host hostname”
#  format c#t#d#; vxdctl enable

Reattach Failed or Failing disks in Veritas

Monday, June 26th, 2006

Problem: A temporary problem caused veritas to label your disks as “Failed” or “Failing”:

Solution for Failed: vxreattach

Solution for Failing: vxedit -g  set failing=false

Veritas Plexes show “DISABLED RECOVER” in status

Monday, June 26th, 2006

Problem: The vxprint output shows that the plexes for the volume are in “DISABLED RECOVER” state.

Solution:

The following commands must be run on a plex to change the state of the plex to “CLEAN”. The volume can then be started, but a fsck may be required before mounting the file system.# vxmend -o force off

# vxmend on

# vxmend fix clean

# vxvol start

# fsck -F vxfs /dev/vx/rdsk//

# mount -F vxfs /dev/vx/dsk// /mountpoint



Filesystems in shared disk group will not mount shared

Problem: You have imported your CVM disk group as shared, and its imported on all nodes of your cluster, but when you try to mount a volume, you get:

# mount -F vxfs -o cluster /dev/vx/dsk/oratestdg/oratest /oratest
UX:vxfs mount: ERROR: V-3-20003: Cannot open /dev/vx/dsk/oratestdg/oratest: No such device or address
UX:vxfs mount: ERROR: V-3-24996: Unable to get disk layout version
Solution:  The problem is that you do not have the disk group activation mode set properly.  If you run a vxdg list [dgname] , you can see the activation mode for each node.

Examine the contents of your /etc/default/vxdg.  You will probably see a line like:

default_activation_mode=off

Change it to default_activation_mode=sw, and restart veritas. 

 If you want to do it interactively by disk group, try vxdg -g [dgname] set activation=sw



Show list of emc disks that do not have SCSI-3 Persistant Reservation set

Problem: How do you see which emc disks do not have SCSI-3 Persistant Reservation set:

for disk in `symdev list |grep -v “Not” |awk ‘{print $1}’` |sort -u do

print -n $disk

symdev show $disk |grep SCSI

done |grep -v Enabled



Apache Missing from Solaris 10

If you find you are missing your ‘built in’ apache2 installation, go back to your install media (or jumpstart image) and get the following packages:

Apache: SUNWapchS, SUNWapchd, SUNWapchr, SUNWapchu

Apache2:SUNWapch2S, SUNWapch2d, SUNWapch2r, SUNWapch2u

Install each using pkgadd.  Once you have done that, perform a kill -HUP on your /lib/svc/bin/svc.configd process (ps -ef |grep svc to get the processs id). or you will end up with a “svcadm: Pattern ‘apache2′ doesn’t match any instances” error when you run the svcadm startup command. 

Which happens to be: svcadm enable apache2
You’ll probably want to configure the /etc/apache2/httpd.conf as well.  (just copy over the /etc/apache2/httpd.conf.example and edit the ServerName and ServerAdmin as a start.)



Jumpstart Pain

So, here’s the jumpstart errors that I’ve run into recently, and what the problem was:

Command:

 boot net:speed=100,duplex=full - install

Hangs on:

 Timeout waiting for ARP/RARP packet

This error basically means that no one is answering your servers ‘who am i’ requests — in other words, your boot server is not answering/seeing its ARP requests.

 In this case, for me, it was that my ‘net’ device was set to a device that was connected to a cluster heartbeat, and not a real network.  Could also be because you have not set up your boot server properly.  Try a net-watch-all from the eeprom and see what networks have traffic.

Command:

 boot /pci@1f,700000/network@1:speed=100,duplex=full - install -v

Hangs on: Requesting Internet address for MAC

You probably forgot to start/restart rpcbootparamd

/usr/sbin/rpc.bootparamd start

Hangs on:

boot: cannot open kernel/sparcv9/unix
Enter filename [kernel/sparcv9/unix]:

Snoop Says: NFS R LOOKUP3 Permission denied

Check that your boot server is actually properly sharing the Tools/Boot Directory — I actually had to do an nfs.server stop and nfs.server start.

Says: Select A Language…

You’re not finding your sysidcfg file — check bootparams on the bootserver, make sure that sysidcfg is shared properly from the install server.

Searching for JumpStart directory…
not found
Check for matching shortname entry in /etc/hosts on install server.  Also make sure IP/Netmask not specified in sysidcfg.



Mounting an ISO under solaris

Wednesday, July 29, 2009

Emulex hbacmd utility

Emulex statistics:
The Emulex hbacmd(1m) utility can be used to print numerous configuration and performance attributes. The performance attributes can be used to gauage throughput and signal loss, which can aide in debugging performance and reliability issues. To view all available performance metrics, the hbacmd utility can be invoked with the “portstat” option and the WWPN to view:

$ hbacmd PortStat 10:00:00:00:c9:49:28:47

Port Statistics for
10:00:00:00:c9:49:28:47

Secs Since Last Reset : 21573
Exchange Count
: 1308267
Responder Exchange Count: 363
TX Seq Count : 1315705
RX
Seq Count : 6357365
TX Frame Count : 1336810
RX Frame Count : 161483066
TX Word Count : 31567104
RX Word Count : 3316320000
TX KB Count :
123309
RX KB Count : 12954375
LIP Count : -1
NOS Count : 0
Error
Frame Count : 0
Dumped Frame Count : -1
Link Failure Count : 1
Loss
of Sync Count : 0
Loss of Signal Count : 0
Prim Seq Prot Err Count : 0
Invalid TX Word Count : 8
Invalid RX Frame CRC Cnt: 0

This data could easily be integrated with Orca to provide useful historical graphs. Nice!"


Resetting Emulex HBAs
On rare ocassions it may be necessary to reset an Emulex HBA to re-establish connectivity to fabric services, and to find new targets and LUNs that have been added to the fabric. This can be accomplished with a system reboot ( which takes a good deal of time, and is not an option when availability is the primary service driver), or with the Emeulex hbacmd(1m) or lputil(1m) utilities. To reset an adaptor with hbacmd(1m), the WWPN is passed as an option:

$/usr/sbin/hbanyware/hbacmd Reset 10:00:00:00:c9:49:2c:b4
Reset HBA 10:00:00:00:c9:49:2c:b4
To reset an HBA through the lputil(1m) text-base menu, you can select option 4 from the main menu, and pick the adaptor to reset:

$ /usr/sbin/lputil/lputil
LightPulse Common Utility for Solaris/SPARC. Version 2.0a5
(4/7/2005).Copyright (c) 2005, Emulex Corporation
Emulex Fibre Channel Host
Adapters Detected: 3Host Adapter 0 (lpfc3) is an LP9802 (Ready Mode)Host Adapter
1 (lpfc4) is an LP9802 (Ready Mode)Host Adapter 2 (lpfc5) is an LP9802 (Ready Mode)
MAIN MENU
1. List Adapters

2. Adapter Information

3. Firmware Maintenance

4. Reset Adapter

5. Persistent Bindings
0. Exit
Enter choice
=> 4

0. lpfc3

1. lpfc4

2. lpfc5
Select an adapter => 0
MAIN MENU
1. List Adapters

2. Adapter Information

3. Firmware Maintenance

4. Reset Adapter

5. Persistent Bindings
0. Exit
Enter choice => 0


Once the adaptor is reset, you should see a message similar to the following in the system logfile:
Sep 7 15:23:49 tiger lpfc: [ID 728700 kern.warning] WARNING: lpfc3:1303:LKe:Link Up Event x1 received Data: x1 x0 x8 x14
Emulex makes a killer HBA, and provides several awesome software utilities to manage host side SAN connectivity.

hbacmd utility

$ hbacmd -hUsage: hbacmd { h=IP Address or Hostname{:port} }
Valid Commands:
Version
ListHBAs
HBAAttrib
PortAttrib
PortStat
ServerAttrib
TargetMapping
Reset
Download
PersistentBinding
Source: {C L}
C: Configuration
L: Live
AllNodeInfo
SetPersistentBinding
Scope: {P I B}
P: Bind set Permanently
I: Bind set Immediately
B: Bind set Both Immediately and at Reboot
BindType: {D P N}
D: Enable binding by D_ID
P: Enable binding by WWPN
N: Enable binding by WWNN
Id: Either WWPN, WWNN, or D_ID (depending on BindType)
RemoveAllPersistentBinding
RemovePersistentBinding
BindType: {D P N}
D: Enable binding by D_ID
P: Enable binding by WWPN
N: Enable binding by WWNN
Id: Either WWPN, WWNN, or D_ID (depending on BindType)
BindingCapabilities
BindingSupport
Source: {C L}
C: Configuration
L: Live
SetBindingSupport
BindFlag: {D P N A DA PA NA}
D: Enable binding by D_ID
P: Enable binding by WWPN
N: Enable binding by WWNN
A: Enable binding by AUTOMAP
DA: Enable binding by D_ID and AUTOMAP
PA: Enable binding by WWPN and AUTOMAP
NA: Enable binding by WWNN and AUTOMAP
DriverParams
DriverParamsGlobal
SetDriverParam

CtrlWord: {P G B N}
P: Permanent
G: Global
B: Both
N: Neither
SetBootBios
CtrlWord: {E D}
E: Enable
D: Disable
To view all of the Emulex HBAs installed in a server, hbacmd(1m) can be invoked with the “listhbas” option:
$ hbacmd listhbasManageable HBA List
Port WWN : 10:00:00:00:c9:49:28:42
Node WWN : 20:00:00:00:c9:49:28:42
Fabric Name: 10:00:00:60:69:80:2d:ee
Flags : 8000f980
Host Name : server01
Mfg : Emulex Corporation
Port WWN : 10:00:00:00:c9:49:28:47
Node WWN : 20:00:00:00:c9:49:28:47
Fabric Name: 10:00:00:60:69:80:0e:fc
Flags : 8000f980
Host Name : fraudmgmt01
Mfg : Emulex Corporation
[ ..... ]
To list firmware versions, serial numbers, WWN and a variety of model specific information, the hbacmd(1m) utility can be invoked with the “hbaattrib” option and the WWN to probe:
$ hbacmd HBAAttrib 10:00:00:00:c9:49:28:47HBA Attributes for 10:00:00:00:c9:49:28:47
Host Name : server01
Manufacturer : Emulex Corporation
Serial Number : MS51403247
Model : LP9802
Model Desc : Emulex LightPulse LP9802 2 Gigabit PCI Fibre Channel Adapter
Node WWN : 20 00 00 00 c9 49 28 47
Node Symname : Emulex LP9802 FV1.91A1 DV6.02f
HW Version : 2003806d
Opt ROM Version: 1.50a4
FW Version : 1.91A1 (H2D1.91A1)
Vender Spec ID : 80F9
Number of Ports: 1
Driver Name : lpfc
Device ID : F980
HBA Type : LP9802
Operational FW : SLI-2 Overlay
SLI1 FW : SLI-1 Overlay 1.91a1
SLI2 FW : SLI-2 Overlay 1.91a1
IEEE Address : 00 00 c9 49 28 47
Boot BIOS : Fcode Firmware1.50a4
Driver Version : 6.02f; HBAAPI(I) v2.0.e, 11-07-03
To view host port information (e.g., port speed, device paths) and fabric parameters (e.g., fabric ID (S_ID), # of ports zoned along with this port), hbacmd(1m) can be invoked with the “portattrib” option:
$ hbacmd PortAttrib 10:00:00:00:c9:49:28:47Port Attributes for 10:00:00:00:c9:49:28:47
Node WWN : 20 00 00 00 c9 49 28 47
Port WWN : 10 00 00 00 c9 49 28 47
Port Symname :
Port FCID : 6D0900
Port Type : Fabric
Port State : Operational
Port Service Type : 6
Port Supported FC4 : 00 00 01 20 00 00 00 01
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
Port Active FC4 : 00 00 01 20 00 00 00 01
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00
Port Supported Speed: 2 GBit/sec.
Port Speed : 2 GBit/sec.
Max Frame Size : 2048
OS Device Name : /devices/pci@84,2000/lpfc@1
Num Discovered Ports: 3
Fabric Name : 10 00 00 60 69 80 0e fc

Tuesday, July 28, 2009

Technology for Sun Partners

Technology for Sun Partners: "A Hands on Introduction to ZFS Pools; Part 3: RAIDZ2"

The hands on tutorial shows how to manage disks through ZFS with very limited resources. The tutorial is based on the following components
One 7 port USB 2.0 hub
Six 1GB USB 2.0 memory sticks
OpenSolaris 2008.05 as a live CD (and a system to boot off); any Solaris 10 systems will do as well
It has been released in three parts:
Getting started, pool creation import and export of pools
Mirrors, managing disk failures and spare disks
RAIDZ2
Within this part of the tutorial you will learn
How to create a RAIDZ2 volume ZFS with 2 parity volumes out of 6 USB sticks
How to it recovers after disk failures through resilvering
How to scrub a pool
Check out the first part to learn about the Solaris requirements, the six required USB sticks and the USB hub and how to configure them.
As already stated in the other parts; get some extra graphical tools like iobar from the freely available Tools CD. This will visualize nicely what's happening on your disks (see below):

Getting Started
Non Disclaimer: Please be cautious with your system. All commands apply significant changes to your system. Data corruption may easily occur. Have a good backup of your system. The system is not warranted to work since it depends on the USB sticks, the hub and how how Solaris get's informed about status changes. ZFS hasn't been optimized for USB sticks and hick ups may occur at any time. Do not use such a configuration for important work. This is a low cost self learning sand box!
As already mentioned sin the first part:
Become super user ( su)
Clean up your /dev/dsk device list ( devfsadm -C)
This time we will plug in all 6 sticks at the very beginning since we will need them all.
The goal will be to create a 4GB “high trough put” USB volume with 2*1GB parity disks. This configuration will be able to survive the failure of any 2 disks.

The command rmformat will tell us the mapping of sticks to devices. In my case it's:
Stick
controller
1
c9t0d0p0
2
c8t0d0p0
3
c7t0d0p0
4
c6t0d0p0
5
c5t0d0p0
6
c4t0d0p0
Creating a RAIDZ2 File System
A RAIDZ2 pool with the name z2pool is getting created with the command below. The file system /z2pool will get mounted automatically.jack@opensolaris:~# zpool create z2pool raidz2 c4t0d0p0 c5t0d0p0 c6t0d0p0 c7t0d0p0 c8t0d0p0 c9t0d0p0
The next step will be a simple check of the file system availability. Creating some load on the file system will makes things more realistic. The load generation will consist of creating a tar file from /usr in the back ground. The 4GB available should be enough and the command will need at least 5 minutes to complete. iobar is a good way to see graphically what's going on. The command iostat -xnc 2 will do the same job in a separate window.jack@opensolaris:~# cd /z2pool
jack@opensolaris:/z2pool# tar cf usr.tar /usr &
[1] 1641
jack@opensolaris:/z2pool# tar: Removing leading `/' from member
names
tar: Removing leading `/' from hard link targets
The zpool status command will tell us about the configuration of our file system:zpool status -v z2pool
pool: z2pool
state: ONLINE
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
z2pool ONLINE 0 0 0
raidz2 ONLINE 0 0 0
c4t0d0p0 ONLINE 0 0 0
c5t0d0p0 ONLINE 0 0 0
c6t0d0p0 ONLINE 0 0 0
c7t0d0p0 ONLINE 0 0 0
c8t0d0p0 ONLINE 0 0 0
c9t0d0p0 ONLINE 0 0 0
errors: No known data errors
Everything seems to be up and operational...
Creating a Disk Failure in a RAIDZ2 Volume
This is the fun part of the tutorial. The destructive one...
Let's pull out stick 4 and see what's happening:

The zpool status command will give an update:
zpool status -v z2pool pool: z2pool
state: DEGRADED
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
z2pool DEGRADED 0 0 0
raidz2 DEGRADED 0 0 0
c4t0d0p0 ONLINE 0 0 0
c5t0d0p0 ONLINE 0 0 0

c6t0d0p0 REMOVED 0 0 0
c7t0d0p0 ONLINE 0 0 0
c8t0d0p0 ONLINE 0 0 0
c9t0d0p0 ONLINE 0 0 0
errors: No known data errors
So far, so good ...
ZFS realizes that disk c6t0d0p0 is gone and the configuration is degraded. The file system is still operational as the 3 blinking LEDs of active sticks indicate in the photo above.
There's only one thing which is more fun than pulling out an operational disks:
Pulling out a second one...
The photo below documents that stick 2 got removed as well.

The command zpool status reflects the trouble we're in now:jack@opensolaris:zpool status -v z2pool
pool: z2pool
state: DEGRADED
scrub: none requested
config:
NAME STATE READ WRITE CKSUM
z2pool DEGRADED 0 0 0
raidz2 DEGRADED 0 0 0
c4t0d0p0 ONLINE 0 0 0
c5t0d0p0 ONLINE 0 0 0

c6t0d0p0 REMOVED 0 0 0
c7t0d0p0 ONLINE 0 0 0

c8t0d0p0 REMOVED 0 0 0
c9t0d0p0 ONLINE 0 0 0
errors: No known data errors
This is as far as we can go with this configuration. 2 disks are removed. Everything is degraded and still operational. I leave it to the reader to pull another stick and see a corrupted file system.
Recovering from a degraded RAIDZ2 Volume
We are now in the situation to have four operational disks and two disks which have been ripped out. The next steps will show you how to clean up the mess.
The first step is to plug in stick 2 known to Solaris as c8t0d0p0. This is a special situation since ZFS labelled it and it knows c8t0d0p0 already.

This operation is the equivalent to reconnecting a functional disk. Replacing a broken disk 2 by a new disks would lead to a different situation. A new disk would need to be added and be told to replace the removed disks. I'm not covering this case here (I have no more memory sticks). I'm plugging in the remaining disconnected disk in the hope to regain a complete configuration.

The command zpool status tells us about the actions being taken by Solaris:jack@opensolaris:/z2pool# zpool status -v z2pool
pool: z2pool
state: ONLINE
status:
One or more devices is currently being resilvered. The pool
will
continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scrub: r
esilver in progress for 0h0m, 21.32% done, 0h0m to go
config:
NAME STATE READ WRITE CKSUM
z2pool ONLINE 0 0 0
raidz2 ONLINE 0 0 0
c4t0d0p0 ONLINE 0 0 0
c5t0d0p0 ONLINE 0 0 0
c6t0d0p0 ONLINE 0 0 0
c7t0d0p0 ONLINE 0 0 0
c8t0d0p0 ONLINE 0 0 0
c9t0d0p0 ONLINE 0 0 0
errors: No known data errors
ZFS put both disks back into the state online and it is resilvering the two disks. 21% of the synchronisation has been completed at the time I checked. Keep in mind that the resilvering process takes much longer if there is concurrent other IO happening. Be aware the the times to bring everything back in a correct state depends
on the medium,
the size of the volume,
the parallel IO.
Real disks will expose very different characteristics!
ZFS may decide as well that the reinserted USB sticks may be damaged and it takes them offline. In this case it takes a
jack@opensolaris:/zpool clear
command to pretend that the disk is OK. The disk may then need to be brought online with the command
jack@opensolaris:/zpool online
These extra operations seem to depend on the time the stick has been removed and the state the stick was in when it has been removed.
Low cost memory sticks aren't made for professional data center operations. They seem to degrade over time through the rude handling from my side. Use the scrub command to validate that they are functional:jack@opensolaris:/z2pool# zpool scrub z2pool
jack@opensolaris:/z2pool# zpool status -v z2pool
pool: z2pool
state: ONLINE
scrub: s
crub completed after 0h0m with 0 errors on Thu Jul 3 06:38:58
2008
config:
NAME STATE READ WRITE CKSUM
z2pool ONLINE 0 0 0
raidz2 ONLINE 0 0 0
c4t0d0p0 ONLINE 0 0 0
c5t0d0p0 ONLINE 0 0 0
c6t0d0p0 ONLINE 0 0 0
c7t0d0p0 ONLINE 0 0 0
c8t0d0p0 ONLINE 0 0 0
c9t0d0p0 ONLINE 0 0 0
Keep in mind that scrub will check the entire disk. This command may need significant time. Calling it when parallel IO happens makes it run much longer!
This it what it takes wo work with RAIDZ2 volumes. RAIDZ volumes with one parity bit and less redundancy work the same way.
You should have learned within this tutorial:
How to create a RAIDZ2 volume ZFS with 2 parity volumes out of 6 USB sticks
How to it recovers after disk failures through resilvering
How to scrub a zpool
Wrap Up: Observations
USB memory sticks seem to come with slightly different capacities. rmformat educates about the available capacity. This may create trouble with operations where equal sized media is expected like mirroring. There are overriding options to force ZFS to move on. You may want to be very cautious with these options in productive situations
Gnome dialog about inserted disk: Gnome and the volume manager see that a ZFS labelled disk has been attached. It shows a modal dialog with an error message which states that a disk belonging to a named zpool has not been able to be mounted. The volume manager is unfortunately not smart enough to mount a multi disk ZFS file system automatically after all disks have been attached. The little modal dialog is however quite useful since it tells the user that the device has been recognized
Which hub and which sticks to pick? No idea. I purchased the cheapest available USB 2.0 components. They worked. Please drop a comment if you know more.
Which Solaris to use?
Solaris 10U4 on a Ultra 20: worked
Solaris Developer Express 1/08 on a Tecra A5: worked
OpenSolaris 2008.05 as live CD on a Ultra 20: worked best!
OpenSolaris 2008.05 in a VmWare image with Fusion on a MacPro seems to work as well
Solaris Developer Express 1/08 in VmWare image with VmWare Player on Windows XP didn't work for me
The simplest way to exercise the tutorial seems to be the OpenSolaris Live CD booted straight from CD. It worked like a charm and there is no significant risk to damage something.
I hope you'll enjoy this tutorial as much as I did. Use the ZFS Administration Manual to learn about the correct usage of ZFS. Consider to use the newest available Solaris version. OpenSolaris 2008.05 as a live CD worked best for me.
Released parts of the hands on tutorial up to now are:
Getting started, pool creation import and export of pools
Mirrors, managing disk failures and spare disks
RAIDZ2

Friday, July 24, 2009

Step Install Oracle 10g R2 on Solaris 10 x86

Step Install Oracle 10g R2 on Solaris 10 x86 from AZIZ’s BLOG
September 4, 2007 in Oracle, Solaris
Tags: Install Oracle 10g R2, Solaris 10 x86

Checking Requirement:

—————————-

#/usr/sbin/prtconf grep “Memory size” [Check RAM size]
# /usr/sbin/swap -s [check swap]
# df -k /tmp [check /tmp size (>400mb)]
# uname -r [check solaris version]

# pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms SUNWsprot SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs SUNWxwfnt

# cat /etc/nsswitch.conf grep hosts
# hostname
# domainname

RUN INSTALL:
—————-
A. create group name “dba”, oracle inventory group “oinstall” and “oracle” user

# /usr/sbin/groupadd oinstall
# /usr/sbin/groupadd dba

{Determine oracle user exist or not
# id -a oracle
{if exist, should be look like this=
uid=440(oracle) gid=200(oinstall) groups=201(dba),202(oper)

{create oracle user=
# useradd -d /export/home/oracle -g dba -G oinstall -m -s /bin/ksh oracle

#mkdir /export/home/oracle
#chown oracle:dba /export/home/oracle

{set password=
# passwd -r files oracle

{to determine nobody user=
# id nobody
# /usr/sbin/useradd nobody >>run if does not exist

B. EDIT FILE /export/home/oracle/.profile
————————————–
umask 022
TMP=/tmp
TMPDIR=$TMP
DISPLAY=localhost:0.0
export TMP TMPDIR DISPLAY
ORACLE_BASE=/u01/app/oracle [replace with ur Oracle base Directory]
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 [replace with ur Oracle home Directory]

ORACLE_SID=jktdb [replace with your database]
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH

C. Configure Kernel Parameter
—————————–
Note: Do not follow the official installation instruction, they contain misleading and out errors of fact!

#projadd oracle [This command will create a new 'resource project']
edit the /etc/user_attr file:
adm::::profiles=Log Management
lp::::profiles=Printer Management
root::::auths=solaris.*,solaris.grant;profiles=Web Console Management,All;lock_after_retries=no

oracle::::project=oracle [add this line]

then:

#su – oracle
$ id -p
$ prctl -n project.max-shm-memory -i project oracle

The display look like this:
project: 100: oracle
NAME PRIVILEGE VALUE FLAG ACTION RECIPIENT
project.max-shm-memory
privileged 126MB – deny -
system 16.0EB max deny -

leaving the oracle user still connected in the original one Then, as root in the new terminal, you can issue this command:

#prctl -n project.max-shm-memory -v 4gb -r -i project oracle [create max memory to 4GB]

As soon as you’ve issued that command, switch back to the oracle user’s session and re-issue the earlier command:

$ prctl -n project.max-shm-memory -i project oracle

Note:
#prctl -n project.max-shm-memory -v 4gb -r -i project oracle [this setting will lost after reboot]
to set permanently, run this: #projmod -s -K “project.max-shm-memory=(priv,4gb,deny)” oracle

D. Performing the Oracle Installation
————————————-
#su – oracle
$xhost +
$export DISPLAY=localhost;0.0
$ xhost + >>run this if you install from remote PC
$ cd /export/home/database/ [the source unzipped here]

./runInstaller

FOR SOLARIS SPARC:
====================
$ gunzip ship_rel10_sol64_db.cpio.gz
$ cpio -idm < ship_rel10_sol64_db.cpio

$./runInstaller

If you found unsufficient SWAP disk space on your disk, create folder under / then run this command:
—————————————————
$ TMP=/directory
$ TMPDIR=/directory
$ export TMP TMPDIR

Follow the screen>>NEXT>>NEXT

last, run this as root user:
—————————-
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/10.2.0/db_1/root.sh

Create db:
———-
orc1
jktdb

E. 6.0 On-going Administration
——————————–
Finally, it’s time to get the web-based Enterprise Manager database administration tool up and running.
Since we’re using 10g Release 2, you should be able to launch a browser (Launch -> Web Browser) and simply navigate to : http://localhost:1158/em

If you do not know the correct port number to use, look for the following line in the $ORACLE_HOME/install/portlist.ini file.

in order to be able to log on as SYS with a password of whatever you supplied to the first screen of the Oracle installation wizard. In fact, getting a meaningful result at this point relies on three things having been performed successfully:

1. starting a listener (lsnrctl start)
2. opening the database (sqlplus / as sysdba then startup)
3. starting the Enterprise Manager agent (emctl start dbconsole)

F. Automating Database Startup
———————————————–
edit file “/var/opt/oracle/oratab” script to find lines with ‘Y’ at their ends
Create file “/etc/init.d/dbora”
——-
#!/bin/sh
ORA_HOME=/u01/app/oracle/product/10.2.0/db_1
ORA_OWNER=oracle

if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo “Oracle startup: cannot start”
exit
fi

case “$1″ in
’start’)
su – $ORA_OWNER -c “$ORA_HOME/bin/dbstart”
;;
’stop’)
su – $ORA_OWNER -c “$ORA_HOME/bin/dbshut”
;;
esac

———
#chmod 777 /etc/init.d/dbora
#/etc/init.d/dbora stop

To integrate dbora file to standart Solaris startup and shutdown process:
————————————————————————
#ln -s /etc/init.d/dbora /etc/rc0.d/K01dbora
#ln -s /etc/init.d/dbora /etc/rc2.d/S99dbora

IF u found error this:
———————–
ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener

edit file “dbstart” & “dbshut”, find line $ORACLE_HOME_LISTNER=$1

and change to = $ORACLE_HOME_LISTNER=/u01/app/oracle/product/10.2.0/db_1

RECOMMENDED DIRECTORY STRUCTURE:
———————————————-

[Oracle Base Directory:]
/u01/app/oracle
/u01/app/orauser
/opt/oracle/app/oracle

[Oracle Inventory Directory:]
ORACLE_BASE/oraInventory

[Oracle Home Directory:]

ORACLE_BASE/product/10.2.0/db_1

[Identify an existing oracle base directory:]
#more /var/opt/oracle/oraInst.loc
[the output should be:]

inventory_loc=/u01/app/oracle/oraInventory
inst_group=oinstall

# more /var/opt/oracle/oratab

*:/u03/app/oracle/product/10.2.0/db_1:N

*:/opt/orauser/infra_904:N

*:/oracle/9.2.0:N

COMMON INSTALLATION ERROR:
===========================
Unable to convert from “UTF-8″ to “646″ for NLS!
Solution: Install SUNWuiu8 package.

error adduser:
———————
UX: useradd: ERROR: Inconsistent password files. See pwconv(1M)

This is because the /etc/passwd and /etc/shadow files are out of synchronization on your machine. [CSCdi74894]
To fix this, run the pwconv command, and then rerun cwconfigure.

try to run:

wc -l /etc/passwd /etc/shadow

————–
ERROR Checking monitor: must be configured to display at least 256 colors >>> Could not execute auto check for
display colors using command /usr/openwin/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<
Some requirement checks failed. You must fulfill these requirements before continuing with theinstallation, at which time they will be rechecked.

Solution(s):
1. Install SUNWxwplt package
2. Set DISPLAY variable
3. Execute xhost + on target (set in DISPLAY) computer

———————————————————-
Exception in thread “main” java.lang.UnsatisfiedLinkError:
… libmawt.so: ld.so.1: java: fatal: libXm.so.4: open failed: No such file or directory

Solution: Install the SUNWmfrun package.

—————————————————————————————————-
Can’t load ‘/usr/perl5/5.8.4/lib/i86pc-solaris-64int/auto/Sun/Solaris/Project/Project.so’ for module
Sun::Solaris::Project: ld.so.1: perl: fatal: libpool.so.1: open failed: No such file or directory at
/usr/perl5/5.8.4/lib/i86pc-solaris-64int/DynaLoader.pm line 230. at /usr/sbin/projadd line 19 Compilation
failed in require at /usr/sbin/projadd line 19. BEGIN failed–compilation aborted at /usr/sbin/projadd line 19.

Solution: Install the SUNWpool SUNWpoolr packages.

———————————————————————–
bash-3.00$ /u01/app/oracle/product/10.2.0/db_1/bin/./emctl start dbconsole
Exception in getting local host
java.net.UnknownHostException: -a: -a
at java.net.InetAddress.getLocalHost(InetAddress.java:1191)
at oracle.sysman.emSDK.conf.TargetInstaller.getLocalHost(TargetInstaller.java:4977)
at oracle.sysman.emSDK.conf.TargetInstaller.main(TargetInstaller.java:3758)
Exception in getting local host

Solution : check server hostname and /etc/hosts
————————————————————————-

UNINSTALL ORACLE 10G:
———————
1. remove all database, by running $dbca
2. stop any oracle process running:
Database Control : $ORACLE_HOME/bin/emctl stop dbconsole
Oracle Net listener : $ORACLE_HOME/bin/lsnrctl stop
iSQL*Plus : $ORACLE_HOME/bin/isqlplusctl stop
Ultra Search : $ORACLE_HOME/bin/searchctl stop

3. Start Oracle Universal installer:

$ORACLE_HOME/oui/bin/runInstaller

4. In the Welcome window, click Deinstall Products.
5. In the Inventory screen, select the Oracle home and the products that you want to remove,
then click Remove.

Possibly related posts: (automatically generated)

* Solaris Network configuration
* Oracle Enterprise Manager 10g R2
* Oracle 10g Administration in Simple Steps
* Tuning RHEL for Oracle 9i and 10g


Configuring IP Network Multipathing on Solaris

Configuring IP Network Multipathing on Solaris « AZIZ’s BLOG
Configuring IP Network Multipathing on Solaris

May 8, 2009 in Solaris
Tags: configure IPMP on Solaris, IP Network Multipathing, IPMP, IPMP failover

IPMP has the following features:

1. It eliminates a single network adapter as a single point of failure in these cases, ( a. Network adapter failure b. Network link failure)
2. It enables interfaces to fail over within approximately 10 seconds when using the default configuration.
3. It can be configured by adjusting the parameters in the ”/etc/default/mpathd” file.
4. It can be configured for use with both IPv4 and IPv6.
5. It enables interfaces to be configured as standby interfaces.

{IPMP failure detection:
Probe­-based failure detection
-detects network error by sending ICMP ECHO_REQUEST messages
Link based failure detection
-detects network error by checking the IFF_RUNING

How to Configure IPMP on Solaris

*PROBE-BASED IPMP*

{Probe-­Based IPMP Requirements:

* The Solaris 8 10/00 OS, as a minimum, must be installed.
* Unique MAC addresses must be configured on each network interface.
* Multiple network adapter interfaces must be connected on each subnet.
* An IPMP group name must be assigned to the group of interfaces.
* A test address is assigned to an interface.
* Additional hosts or devices must exist on the same subnet.

{Configuring Probe­-Based IPMP:

Sample:

IPMP FAILOVER WITH 2 FLOATING/PUBLIC IP ADDRESS:

{2 NIC address:
e1000g0 ip : 192.168.1.1
e1000g1 ip : 192.168.1.2

{2 floating/public address:
192.168.1.3
192.168.1.4

{edit /etc/hosts with your 4 IP address:

192.168.1.3 server-1 server loghost
192.168.1.4 server-2 loghost
192.168.1.1 server-e1000g0 loghost
192.168.1.2 server-e1000g1 loghost

Here are the step:

1. # cat /etc/release
2. # eeprom ”local-­mac-­address?=true”
3. # ifconfig e1000g0 192.168.1.1 netmask + broadcast + group ipmpserver deprecated -failover up
4. # ifconfig e1000g0 addif 192.168.1.3 netmask + broadcast + failover up
5. # ifconfig e1000g1 192.168.1.2 netmask + broadcast + group ipmpserver deprecated -failover standby up
6. # ifconfig e1000g1 addif 192.168.1.4 netmask + broadcast + ­failover up
7. # ifconfig ­-a

{Using configuration files:
1. # cat /etc/hostname.e1000g0
server-e1000g0 netmask + broadcast + group ipmpserver deprecated -failover up \
addif server-1 netmask + broadcast + failover up

2. # cat /etc/hostname.e1000g1
server-e1000g1 netmask + broadcast + group ipmpserver deprecated -failover standby up \
addif server-2 netmask + broadcast + failover up

3. # init 6

IPMP FAILOVER WITH 1 FLOATING/PUBLIC IP ADDRESS:

{2 NIC address:
e1000g0 ip : 192.168.1.1
e1000g1 ip : 192.168.1.2

{1 floating/public address:
192.168.1.3

{edit /etc/hosts with your 3 IP address:

192.168.1.3 server loghost
192.168.1.1 server-e1000g0
192.168.1.2 server-e1000g1

{Using configuration files:
1. # cat /etc/hostname.e1000g0
server-e1000g0 netmask + broadcast + group ipmpserver deprecated -failover up \
addif server netmask + broadcast + failover up

2. # cat /etc/hostname.e1000g1
server-e1000g1 netmask + broadcast + group ipmpserver deprecated -failover standby up

3. # init 6

*LINK-BASED IPMP*

{Link­-Based IPMP Requirements:

* Solaris 9 12/02 OS, at a minimum, must be installed.
* Network interfaces must use any of the following drivers: hme, eri, ce, ge, bge, qfe, dmfe, e1000g, ixgb, nge, nxge, rge, xge
* Unique MAC addresses must be configured on each of the interfaces.
* An IPMP group name must be assigned to interfaces

{Configuring Link­-Based IPMP

1. # cat /etc/release
2. # eeprom ”local­mac­address=true”
3. # ifconfig e1000g0 192.168.1.1 netmask + broadcast + group up
4. # ifconfig e1000g1 192.168.1.2 netmask + broadcast + group standby up
5. # ifconfig ­a

{Configuring Link­-IPMP – Administration Guide – IP ServicesBased IPMP using configuration files
1. # cat /etc/hostname.e1000g0
server-e1000g0 netmask + broadcast + group up

2. # cat /etc/hostname.e1000g1
server-e1000g1 netmask + broadcast + group standby up

3. # init 6

{Edit file “/etc/default/mpathd” to adjust failover detection timeout.

find the line “FAILURE_DETECTION_TIME=10000″.

the default config is 10000, it mean the failover will take around 10 seconds.

To test the interface failover and failback, use these commands:

#if_mpadm -d e1000g0 >> Dettach interface and force failover
#if_mpadm -r e1000g0 >> Reattach interface and failback

NOTE:

deprecated =the interface will not used for data traffic
-failover = the test interface (physical NIC) will not failover
+failover = the floating/public ip address will failover.


Reference:

IPMP – Administration Guide – IP Services

man ifconfig
man in.mpathd
docs.sun.com

——————————————————
COMMON ERROR Messages and Diagnostics
——————————————————
Test address address is not unique; disabling probe based failure detection on interface_name

Description:
For in.mpathd to perform probe-based failure detection, each test address in the group must be unique. Since the IPv6 test address is a link-local address derived from the MAC address, each IP interface in the group must have a unique MAC address.

——-
NIC interface_name of group group_name is not plumbed for IPv[4|6] and may affect failover capability

Description:
All NICs in a multipathing group must be homogeneously plumbed. For example, if a NIC is plumbed for IPv4, then all NICs in the group must be plumbed for IPv4. The streams modules pushed on all NICs must be identical.

——-
No test address configured on interface interface_name disabling probe-based failure detection on it

Description:
In order for in.mpathd to perform probe-based failure detection on a NIC, it must be configured with a test address: IPv4, IPv6, or both.

——-
The link has come up on interface_name more than 2 times in the last minute; disabling failback until it stabilizes.

Description:
In order to prevent interfaces with intermittent hardware, such as a bad cable, from causing repeated failovers and failbacks, in.mpathd does not failback to interfaces with frequently fluctuating link states.
——-

Invalid failure detection time assuming default 10000

Description:
An invalid value was encountered for FAILURE_DETECTION_TIME in the /etc/default/mpathd file.

——-
Too small failure detection time of time assuming minimum 100

Description:
The minimum value that can be specified for FAILURE_DETECTION_TIME is currently 100 milliseconds.
——-
Invalid value for FAILBACK value

Description:
Valid values for the boolean variable FAILBACK are yes or no.

——-
Invalid value for TRACK_INTERFACES_ONLY_WITH_GROUPS value

Description:
Valid values for the boolean variable TRACK_INTERFACES_ONLY_WITH_GROUPS are yes or no.
——-

Cannot meet requested failure detection time of time ms on (inet[6] interface_name) new failure detection time for group group_name is time ms

Description:
The round trip time for ICMP probes is higher than necessary to maintain the current failure detection time. The network is probably congested or the probe targets are loaded. in.mpathd automatically increases the failure detection time to whatever it can achieve under these conditions.
——-

Improved failure detection time time ms on (inet[6] interface_name) for group group_name

Description:
The round trip time for ICMP probes has now decreased and in.mpathd has lowered the failure detection time correspondingly.
——-

NIC failure detected on interface_name

Description:
in.mpathd has detected NIC failure on interface_name, and has set the IFF_FAILED flag on NIC interface_name.
——-

Successfully failed over from NIC interface_name1 to NIC interface_name2

Description:
in.mpathd has caused the network traffic to failover from NIC interface_name1 to NIC interface_name2, which is part of the multipathing group.
——-
NIC repair detected on interface_name

Description:

in.mpathd has detected that NIC interface_name is repaired and operational. If the IFF_FAILED flag on the NIC was previously set, it will be reset.

——-
Successfully failed back to NIC interface_name

Description:
in.mpathd has restored network traffic back to NIC interface_name, which is now repaired and operational.

——-
The link has gone down on interface_name

Description:
in.mpathd has detected that the IFF_RUNNING flag for NIC interface_name has been cleared, indicating the link has gone down.

——-
The link has come up on interface_name

Description:
in.mpathd has detected that the IFF_RUNNING flag for NIC interface_name has been set, indicating the link has come up.