
 *****************************************************************************
 Installation and Design Notes for iSCSI Driver Version 4.0.2 for Linux
 *****************************************************************************

 Maintained by linux-iscsi-devel@lists.sourceforge.net

 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 2 of the License, or (at
 your option) any later version. Please see the "GPL License" section
 for more information on this.

 This program is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 General Public License for more details.

 See the file COPYING included with this distribution for more
 details.


===============================================================================
CONTENTS
===============================================================================
  
  Product Overview
  Product Features
  Before Installing The Driver
  Installing And Removing The Driver
  Configuring And Using The Driver
  GPL License


===============================================================================
PRODUCT OVERVIEW
===============================================================================

  The iSCSI Driver provides a host with the ability to access storage
  through an IP network. The driver uses the iSCSI protocol to transport SCSI
  requests and responses over an IP network between the host and an iSCSI target
  device. The iSCSI protocol is an IETF-defined protocol for IP storage. For
  more information about the IETF standards, refer to http://www.ietf.org. 
  For more information about the iSCSI protocol, refer to the RFC 3720 at
  http://www.ietf.org/rfc/rfc3720.txt

  Architecturally, the iSCSI driver combines with the host's TCP/IP stack,
  network drivers, and Network Interface Card (NIC) to provide the same
  functions as a SCSI or a Fibre Channel (FC) adapter driver with a Host Bus
  Adapter (HBA) (see Figure 1).

  Figure 1 - iSCSI Driver Architecture 

       iSCSI Access To Storage     |  SCSI or FC Access to Storage
  ====================================================================
                                   |
        Host applications          |         Host applications
                                   |
  =======|===========|===============================|================
         |           |             |                 |
         |    +------------+       |                 |
         |    |    SCSI    |       |                 |
         |    |   driver   |       |                 |
         |    +------------+       |           +-----------+
         |    |   iSCSI    |       |           |           |
         |    |   driver   |       |           |   SCSI    |
    +---------+------------+       |           |   or FC   |
    |        TCP/IP        |       |           |  adapter  |
    +----------------------+       |           |  driver   |
    |   Network drivers    |       |           |           |
    +----------------------+       |           +-----------+
               |                   |                 |
  =============|=====================================|================
               |                   |                 |
         +-----------+             |           +-----------+
         |    NIC    |             |           |    HBA    |
         +-----------+             |           +-----------+
               |                   |                 |
  =============|=====================================|================
              _|_                  |                _|_               
            _(   )_                |              _(   )_             
          _(  IP   )_              |            _(  FC   )_           
         (_ network _)             |           (_ or SCSI _)          
           (_     _)               |             (_     _)            
             (_ _)                 |               (_ _)              
               |                   |                 |

      +------------------+         |                 |
      |  Storage Router  |         |                 |
      |    or Gateway    |         |                 |
      +------------------+         |                 |
               |                   |                 |
      +------------------+         |       +------------------+
      |     Storage      |         |       |      Storage     |
      +------------------+         |       +------------------+
      | (___)(___)(___)  |         |       | (___)(___)(___)  |
      | (___)(___)(___)  |         |       | (___)(___)(___)  |
      | (___)(___)(___)  |         |       | (___)(___)(___)  |
      | (___)(___)(___)  |         |       | (___)(___)(___)  |
      +------------------+         |       +------------------+
                                   |
  ====================================================================

  The iSCSI driver provides a transport for SCSI requests and responses to 
  storage devices via an IP network instead of using a direct attached SCSI bus
  channel or an FC connection. The Storage Router, in turn, transports these
  SCSI requests and responses received via the IP network between it and the
  storage devices attached to it.

  Once the iSCSI driver is installed, the host will proceed with a
  discovery process for storage devices as follows:

   1. The iSCSI driver requests available targets through SLP or SendTargets
      discovery mechanism as configured in the /etc/iscsi.conf configuration
      file.

   2. Each iSCSI target sends available iSCSI target names to the iSCSI driver.

   3. The iSCSI target accepts the login and sends target identifiers.

   4. The iSCSI driver queries the targets for device information.

   5. The targets respond with the device information.

   6. The iSCSI driver creates a table of available target devices.

  Once the table is completed, the iSCSI targets are available for use by the
  host using the same commands and utilities as a direct attached (e.g., via
  a SCSI bus) storage device.


===============================================================================
PRODUCT FEATURES
===============================================================================

  A list of the major features supported by the iSCSI driver are shown below.
  A more detailed description of each of these features is described in later
  sections of this document and with the associated man pages.

 1. Header and data digest support
 2. Two way CHAP authentication
 3. R2T flow control support with a target
 4. Third party multi-path support
 5. Sendtargets and SLP discovery mechanisms
 6. Dynamic target discovery
 7. Async event notifications for portal and target changes
 8. Immediate Data Support
 9. Error recovery level 0
10. iSCSI network boot support
11. Dynamic driver reconfiguration
12. Auto-mounting for iSCSI filesystems after a reboot


The following features are planned for future releases:

 1. Multiple connections per session
 2. Error recovery level 1 support in addition to level 0
 3. SNMP MIB support
 4. IPv6 support


===============================================================================
BEFORE INSTALLING THE DRIVER
===============================================================================

  The iSCSI driver, README file, and example configuration files are
  available on the Linux-iSCSI project homepage at:

    http://linux-iscsi.sourceforge.net

  In addition, at the website you can get information about the availability
  of new drivers, updated drivers, driver compatibility, and other relevant
  information.


===============================================================================
INSTALLING AND REMOVING THE DRIVER
===============================================================================

  This section describes the procedures for installing and removing the 
  iSCSI Driver covering the following topics:

    System Requirements
    Tested Hardware and Software
    Installation Procedure
    Removal Procedure
    Driver Upgrade Procedure
    Kernel Upgrade Procedure


-------------------
SYSTEM REQUIREMENTS
-------------------

  The 4.0.2 iSCSI Driver for Linux requires a host running the Linux 
  operating system with a kernel version of 2.6.10. Compilation will require
  the kernel header files matching the kernel version you wish to run the 
  driver on.

  If you are running a kernel binary compiled for you by a Linux vendor,
  the iSCSI driver must be compiled against the source code distributed
  by the Linux vendor, without any modifications. The process of compiling
  a custom kernel from source makes modifications to the files in the
  kernel source tree, and an iSCSI driver compiled against a modified
  kernel source tree may not run on a kernel binary distributed by your
  Linux vendor.  If you have already made changes to the kernel source
  tree and you wish to run the iSCSI driver on one of the vendor's kernel
  binaries, you will need to reinstall the kernel source code provided
  by your Linux vendor.

  The iSCSI driver requires support in the 2.6 Linux kernel for the following
  modules.

    1. CONFIG_SCSI
    2. CONFIG_CRYPTO
    3. CONFIG_CRYPTO_MD5
    4. CONFIG_CRYPTO_CRC32C

  The driver also requires the iscsi_transport_class.ko module. For 2.6.10,
  this module is included with this package (it can also be found in 2.6.11
  and above kernel source tree). The module is installed to the same location
  the iscsi_sfnet driver is.

  The iSCSI driver requires udev to be installed on the system for creation
  of iSCSI control device. The package can be downloaded from the
  following URL:

    http://kernel.org/pub/linux/utils/kernel/hotplug/udev-021.tar.gz
     
  The hotplug program is a pre-requisite for udev. The current version of
  the iSCSI driver is compiled and tested with hotplug package
  'hotplug-2003_08_05.tar.gz'. If this hotplug package is currently
  not installed, it can be obtained from the linux-hotplug project on
  sourceforge at:

    http://linux-hotplug.sourceforge.net

  The iSCSI driver requires sysfsutils package to be installed on the system.
  The current version of the iSCSI driver is compiled and tested with the
  sysfsutils package 'sysfsutils-1.2.0.tar.gz'. If the sysfsutils package is
  not currently installed, it can be obtained from the following URL:

    http://sourceforge.net/projects/linux-diag/

  There are some issues with the 2.6 Linux kernel code that can cause
  problems when using SCSI devices. Those know issues are:

   - Linux kernels have a known bug in the buffer and page cache design.
     When any writes to a buffered block device fail, it is possible
     for the unwritten data to be discarded from the caches, even though
     the data was never written to disk. Any future reads will get the
     prior contents of the disk, and it is possible for applications to
     get no errors reported.

     This occurs because block I/O write failures from the buffer
     cache simply mark the buffer invalid when the write fails. This
     leaves the buffer marked clean and invalid, and it may be
     discarded from the cache at any time.  Any future read either
     finds no existing buffer or finds the invalid buffer, so the
     read will fetch old data from disk and place it in the cache.

     If the fsync(2) function initiated the write, an error may be
     returned.  If memory pressure on the cache initiated the write,
     the unwritten buffer may be discarded before fsync(2) is ever
     called, and in that case fsync will be unaware of the data loss,
     and will incorrectly report success.

     There is currently no reliable way for an application to ensure
     that data written to buffered block devices has actually been
     written to disk.  Buffered data may be lost whenever a buffered
     block I/O device fails a write.

   - All Linux 2.6 kernels may trigger TCP retransmits from
     the iSCSI target system even though no packets were lost,
     mis-ordered or duplicated by the connecting network.
     Setting the sysctl variable net.ipv4.tcp_low_latency (if it
     exists) to 1 may reduce or eliminate the TCP retransmits.
 
  - RealTek ethernet controller RTL-8029 may encounter transmission
    problems under heavy load which may cause a system panic.

  - Intel ethernet controller Ethernet Pro 100 has two drivers eepro and
    e100. When the former is used, the network card may cease to function
    under heavy load conditions. It is recommended that you use e100.

  - The linux-2.6.10 has a bug in the SCSI middle layer. This bug can
    cause an oops on the system. The details of reproducing the bug and
    the fix can be found at Sourceforge:
    [ 1115345 ] Segmentation fault on stopping the driver
    http://sourceforge.net/tracker/index.php?func=detail&aid=1115345&group_id=26396&atid=387023
    This bug is fixed in linux-2.6.11.

----------------------------
TESTED HARDWARE AND SOFTWARE
----------------------------

  The 4.0.2 version of iSCSI driver has been tested successfully using the
  software and equipment listed below. The driver should also work with other
  software and hardware configurations not listed below, assuming they are
  consistent with the System Requirements described earlier in this document.
  The test programs used were a variety of commercial applications and custom
  scripts that generated various types of traffic loads including raw and
  filesystem I/O, with and without errors being injected.

  1. Distributions:
       - None, since no 2.6 distributions were available when the driver was
         tested

  2. Machines:
       - Datanet Eclipse Server - 1 CPU
       - IBM Netfinity 8656 - 1 CPU
       - Compaq Evo Workstation - 1 CPU
       - Eclipse Server - 2 CPUs
       - Compaq Proliant DL360 - 2 CPUs

  3. Filesystems:
       - ext2
       - ext3


----------------------
INSTALLATION PROCEDURE
----------------------

  There are two ways of installing the iSCSI driver, viz.,

      1. Install iSCSI driver as a part of linux kernel.
      2. Install iSCSI driver as an external module.

  From linux-iscsi-4.0.1.2 onwards, release consists of following three 
  files:

    1. linux-iscsi-kernel-<ver>.patch - iSCSI kernel patch for linux 
       kernel

    2. linux-iscsi-user-<ver>.tgz - Contains iSCSI daemon and utilities.

    3. linux-iscsi-<ver>.tgz - Complete tar-ball containing kernel and 
       user code.

  Use files 1 and 2 for installing iSCSI driver as part of kernel.
  Use file 3 for installing iSCSI driver as an external kernel module.


  Installing iSCSI Driver as part of kernel
  ----------------------------------------

  1. Download linux-iscsi-kernel-<ver>.patch file to a working 
     directory (e.g., /usr/src/iscsi) where <ver> is the driver version 
     (e.g., 4.0.1.2).

  2. Apply the patch by executing the following command:

	patch -p0 < linux-iscsi-kernel-<ver>.patch

     Now change to kernel source top level directory (e.g. /usr/src/linux) and
     verify that under drivers/scsi, a directory named "iscsi-sfnet" has been
     created.

  3. Under kernel source top level directory (e.g. /usr/src/linux), execute
     make menuconfig and select iSCSI driver support
	
     To make iscsi driver built-in the kernel:

	Device Drivers  --->	
		SCSI device support  --->	
			SCSI low-level drivers  ---> 
				iSCSI Driver support  --->	
					<*> Provides ability to access 
						storage using iSCSI protocol

     To make iscsi as an internel kernel module:
   
	Device Drivers  --->	
		SCSI device support  --->	
			SCSI low-level drivers  ---> 
				iSCSI Driver support  --->	
					<M> Provides ability to access 
						storage using iSCSI protocol

  4. Compile the iSCSI driver as shown:

	make (Needed only if you have selected iSCSI driver an kernel builtin)
	make modules
	make modules_install

  5. Reboot the system, with kernel image generated in step 4, if you have 
     selected iSCSI driver as kernel builtin.

  6. Download "linux-iscsi-user-<ver>.tgz" file to a  working directory
     (e.g., /usr/src/iscsi)

  7. Change to the working directory created in step 6 and use tar(1) to
     uncompress the source archive. The archive will contain a subdirectory
     named linux-iscsi-<ver>. For example:

        cd /usr/src/iscsi
        tar xvzf linux-iscsi-user-4.0.1.tgz 
        cd linux-iscsi-4.0.1

  8. Your working directory (/usr/src/iscsi in the example above) now contains
     source files related to iSCSI daemon and utilities.

  9. Compile the iSCSI daemon and utilities sources by entering:
	   
         make

  10. As root, install the iSCSI daemon and utilities by entering:

         make install

  11. You may need to verify the order of the boot script because the iSCSI
      daemon tries to get a TCP connection to each configured iSCSI target
      and if the network interface has not started by the time the boot
      script runs, the connection(s) will not occur. Also, if you are using a
      non-RedHat Linux distribution you may need to edit your boot scripts to
      properly run the iSCSI setup script. You may also need to verify the order
      of the shutdown script.

  12. Edit /etc/iscsi.conf to setup the correct IP addresses and other required
      driver parameters. Refer to the Editing The iscsi.conf File section of
      this document for more information on the settings used in this file.

  13. Start the driver by entering the following command.

        /etc/init.d/iscsi start

      This should configure devices and cause the iSCSI driver to be loaded.

      Normal disk commands like mkfs and fsck will work on the iSCSI devices
      just like they work on a local hard drive.


  Installing iSCSI driver as an externel module
  ---------------------------------------------

  1.  Download the linux-iscsi-<ver>.tgz file to a working directory (e.g.,
      /usr/src/iscsi) where <ver> is the driver version (e.g., 4.0.1). If the
      directory already exists, remove any files from a previous installation.

  2.  Change to the working directory created in step 1 and use tar(1) to
      uncompress the source archive. The archive will contain a subdirectory
      corresponding to the archive name. For example:

         cd /usr/src/iscsi
         tar xvzf linux-iscsi-4.0.1.tgz
         cd linux-iscsi-4.0.1

      Your working directory (/usr/src/iscsi in the example above) now contains
      the iSCSI package. The package contains the driver and associated files.

  3.  Compile the iSCSI driver. If your kernel sources are not in the usual
      place, add 'TOPDIR=/path/to/kernel' or edit the definition of TOPDIR in
      the makefile. If your kernel configuration file is not in the usual
      place, add 'KERNEL_CONFIG=/path/to/.config' or edit the definition of
      KERNEL_CONFIG in the makefile. Compile the driver by entering:

         make

  4.  As root, install the driver by entering:

         make install

  5.  You may need to verify the order of the boot script because the iSCSI
      daemon tries to get a TCP connection to each configured iSCSI target
      and if the network interface has not started by the time the boot
      script runs, the connection(s) will not occur. Also, if you are using a
      non-RedHat Linux distribution you may need to edit your boot scripts to
      properly run the iSCSI setup script. You may also need to verify the order
      of the shutdown script.

  6.  Edit /etc/iscsi.conf to setup the correct IP addresses and other required
      driver parameters. Refer to the Editing The iscsi.conf File section of
      this document for more information on the settings used in this file.

  7.  Start the driver by entering the following command.

        /etc/init.d/iscsi start

      This should configure devices and cause the iSCSI driver to be loaded. 

      Normal disk commands like mkfs and fsck will work on the iSCSI devices
      just like they work on a local hard drive.

*******************************************************************************
NOTE: Before you begin, make sure that your iSCSI target is connected to your
      network. If another version of the Linux driver is currently installed
      (it may have been included with your Linux distribution), you will need to
      remove it before installing a newer driver version. See the installed
      driver's documentation for detailed procedures on removing the driver.
*******************************************************************************

-----------------
REMOVAL PROCEDURE
-----------------

  1. While logged in as root, stop the driver by entering:

        /etc/init.d/iscsi stop

  2. De-install the iSCSI driver package by entering:

        make remove

     This will delete the appropriate files from /lib/modules and
     /sbin.  The configuration files in /etc are not deleted, since
     they will be needed if another driver version is installed later.

  3. Go to the directory (e.g., /usr/src/iscsi) where iSCSI sources are
     present and remove the sources as shown:

     cd /usr/src/iscsi
     rm -rf linux-iscsi-<ver>		(in case of external kernel module)
     rm -rf linux-iscsi-user-<ver>	(in case iSCSI is part of kernel)

  4. If iSCSI driver is compiled as part of kernel, then change to
     kernel source directory, execute make menuconfig and un-select 
     the iSCSI driver support:

	Device Drivers  --->	
		SCSI device support  --->	
			SCSI low-level drivers  --->
				iSCSI Driver support  --->	
					<> Provides ability to access 
						storage using iSCSI protocol

     1. If iscsi driver was built-in kernel, then
       
         make 
         make modules
         make modules_install

        Reboot the system with new kernel image.   

     2. If iscsi driver was compiled as an internel kernel module, then

         make modules
	 make modules_install


------------------------
DRIVER UPGRADE PROCEDURE
------------------------

  To upgrade the iSCSI driver to the latest version, first deinstall the 
  existing package following the steps given in the Removal Procedure section
  of the README for the driver you currently have installed.

  Upon successful deinstallation, install the latest driver as described in the
  Installation Procedure section of the README for the new driver.


------------------------
KERNEL UPGRADE PROCEDURE
------------------------

  Because the iSCSI driver contains a Linux kernel module, the driver must
  be rebuilt and reinstalled if you make any changes to your Linux
  kernel. To remove, rebuild, and reinstall the driver, enter the following
  commands while logged in as root:

      make remove
      make clean
      make
      make install

  Because some Linux distributions include versions of this driver in their
  kernel source tree, recompiling your kernel source tree may create an
  older version of the iSCSI kernel module. The driver will fail to operate
  correctly if there is a version mismatch between the iSCSI daemon and the
  iSCSI kernel module.

  If your kernel source tree already contains a version of this driver
  different from the one you have installed, you must disable the iSCSI
  driver in your kernel configuration before recompiling a new kernel from
  source. Leaving the iSCSI driver enabled in the kernel configuration
  during a kernel rebuild may result in a newer iSCSI kernel module being
  replaced by an older version from the kernel source tree.


===============================================================================
CONFIGURING AND USING THE DRIVER
===============================================================================

  This section describes a number of topics related to configuring and using 
  the iSCSI Driver for Linux. The topics covered include:

    Starting and Stopping the iSCSI driver
    Rebooting Linux
    Device Names
    Auto-Mounting Filesystems
    Log Messages
    Dynamic Driver Reconfiguration
    Async Event Notification
    iSCSI HBA Status
    Using Multipath I/O Software
    Making Storage Configuration Changes
    Target and LUN Discovery Limits
    Service Location Protocol (SLP)
    Target Authentication
    Editing The iscsi.conf File
    Tuning iSCSI Timeout Parameters
    iSCSI Commands and Utilities
    Driver File Listing


--------------------------------------
STARTING AND STOPPING THE iSCSI DRIVER
--------------------------------------

  To manually start the iSCSI driver enter:

          /etc/init.d/iscsi start

  The iSCSI initialization will report information on each detected
  device to the console or in dmesg(8) output. For example:
  
  ********************************************************************
  Vendor: SEAGATE   Model: ST39103FC         Rev: 0002
  Type:   Direct-Access                      ANSI SCSI revision: 02
  Detected scsi disk sda at scsi0, channel 0, id 0, lun 0
  SCSI device sda: hdwr sector= 512 bytes.
                               Sectors= 17783240 [8683 MB] [8.7 GB]
  sda: sda1
  ********************************************************************

  To see the iscsi devices currently available on this system, use the
  utility:

    /sbin/iscsi-ls -l

  If there are problems loading the iSCSI kernel module, diagnostic
  information will be placed in /var/log/iscsi.log.

  To manually stop the iSCSI driver enter:

     /etc/init.d/iscsi stop

  When the driver is stopped, the init.d script will attempt to kill all
  processes using iSCSI devices by first sending them "SIGTERM" and then
  by sending any remaining processes "SIGKILL". The init.d script will 
  then unmount all iSCSI devices in /etc/fstab.iscsi and kill the iSCSI
  daemon terminating all connections to iSCSI devices. It is important to
  note that the init.d script may not be able to successfully unmount
  filesystems if they are in use by processes that can't be killed. It is
  recommended that you manually stop all applications using the filesystem
  on iSCSI devices before stopping the driver. 

  It is very important to unmount all filesystems on iSCSI devices before
  stopping the iSCSI driver. If the iSCSI driver is stopped while iSCSI
  devices are mounted, buffered writes may not be committed to disk and file
  system corruption may occur.


---------------
REBOOTING LINUX
---------------

  To safely reboot a Linux system, enter the following command:

      reboot
        OR
     /sbin/shutdown -r now 

  All iSCSI devices should be unmounted prior to a system shutdown or reboot.
  See the Starting And Stopping The Driver section of this document for a more
  detailed description of the unmounting process.


------------
DEVICE NAMES
------------

  iSCSI driver uses the default kernel names for iSCSI device. This
  is inline with other SCSI devices and transports like FC/SATA.

  Since Linux assigns SCSI device nodes dynamically whenever a
  SCSI logical unit is detected, the mapping from device nodes
  (e.g., /dev/sda or /dev/sdb) to iSCSI targets and logical units may
  vary.

  Variations in process scheduling and network delay may result in
  iSCSI targets being mapped to different SCSI device nodes every time
  the driver is started.  Because of this variability, configuring
  applications or operating system utilities to use the standard
  SCSI device nodes to access iSCSI devices may result in SCSI
  commands being sent to the wrong target or logical unit.

  The above issues justify the need for persistent device naming for
  iSCSI devices. If you intend to have persistent names for iSCSI devices,
  you can make use of one or more schemes available for 2.6 kernel users.
 
  a) Udev - udev can be used to provide persistent names for all types of
  devices. scsi_id program which provides serial number for a given block
  device is integrated with udev and can be made use for persistency.

  b) Devlabel - This is another user application which can be configured
  to provide persistent naming. It ensures the devices get the same name
  by mapping the device serial number with desired device name in a
  database.

  c) UUID & LABEL based mouting - Filesystems provide facility to mount
  devices by UUID or LABEL and hence ensure persistency across reboots.


-------------------------
AUTO-MOUNTING FILESYSTEMS
-------------------------

  Filesystems installed on iSCSI devices cannot be automatically mounted at
  system reboot due to the fact that the IP network is not yet configured at
  mount time. However, the driver provides a method to auto-mount these
  filesystems as soon as the iSCSI devices become available (i.e., after the IP
  network is configured).

  To auto-mount a filesystem installed on an iSCSI device, follow these steps:

   1. List the iSCSI partitions to be automatically mounted in
      /etc/fstab.iscsi which has the same format as /etc/fstab. The
      /etc/fstab.iscsi file will not be overwritten when the driver is
      installed nor will removing the current version of the driver delete
      /etc/fstab.iscsi. It is left untouched during an install.

   2. For each filesystem on each iscsi device(s), enter the logical volume on
      which the filesystem resides. The mount points must exist for the 
      filesystems to be mounted. For example, the following /etc/fstab.iscsi
      entries will mount the two iSCSI devices specified (sda and sdb);

      *************************************************************************
      #device                   mount      FS      mount      backup      fsck 
      #to mount                 point      type    options    frequency    pass
      /dev/sda                 /mnt/t0    ext2    defaults      0          0
      /dev/sdb                 /mnt/t1    ext2    defaults      0          0
      *************************************************************************

   3. Upon a system restart, the iSCSI startup script invokes the
      iscsi-mountall script will try to mount iSCSI devices listed in
      /etc/fstab.iscsi file. iscsi-mountall tries to mount the iSCSI devices
      for "NUM_RETRIES" (default value 10) number of times, at an interval of
      "SLEEP_INTERVAL" seconds (default value 1) between each attempt, giving
      the driver the time to establish a connection with an iSCSI target.
      The value of these parameters can be changed in the iscsi-mountall script
      if the devices are not getting configured in the system within the
      default time periods.

  Due to variable network delays, targets may not always become available in the
  same order from one boot to the next. Thus, the order in which iSCSI devices
  are mounted may vary and may not match the order the devices are listed in
  /etc/fstab.iscsi You should not assume mounts of iSCSI devices will occur in
  any particular order.

  Because of the variability of the mapping between SCSI device nodes
  and iSCSI targets, it is always recommended to either mount the iSCSI
  device nodes which have persistent device names, mount filesystem UUIDs
  or labels (see man pages for mke2fs, mount, and fstab), or use logical
  volume management (see Linux LVM) to avoid mounting the wrong device due
  to device name changes resulting from iSCSI target configuration changes
  or network delays.


------------
LOG MESSAGES
------------

  The iSCSI driver contains components in the kernel and user level.
  The log messages from these components are sent to syslog. Based on the
  syslogd configuration on the Linux host, the messages will be sent to the
  appropriate destination. For example, if /etc/syslog.conf has the following
  entry:
  
     *.info /var/log/messages

  then all log messages of level 'info' or higher will be sent to
  /var/log/messages.
  
  If /etc/syslog.conf has the following entry:

    *.info;kern.none  /var/log/messages

  then all log messages (except kernel messages) of level info or higher
  will be sent to /var/log/messages.

  If /etc/syslog.conf has the following entry:

    kern.* /dev/console

  then all kernel messages will be sent to the console.

  All messages from the iSCSI driver when loading the iSCSI kernel 
  module will be placed in /var/log/iscsi.log.

  The user can also use dmesg(8) to view the log messages.


------------------------------
DYNAMIC DRIVER RECONFIGURATION
------------------------------

  Configuration changes can be made to the iSCSI driver without having to stop
  it or reboot the host system. To dynamically change the configuration of the
  driver, follow the steps below:

   1. Edit /etc/iscsi.conf with the desired configuration changes.

   2. Enter the following command:

         /etc/init.d/iscsi reload 

      This will cause the iSCSI daemon to re-read /etc/iscsi.conf file and to
      create any new DiscoveryAddress connections it finds. Those discovery
      sessions will then discover targets and create new target connections.

  Note that any configuration changes will not affect existing target sessions.
  For example, removal of a DiscoveryAddress entry from /etc/iscsi.conf
  will not cause the removal of sessions to targets discovered through this 
  DiscoveryAddress, but it will cause the removal of the discovery session 
  corresponding to the deleted DiscoveryAddress.


------------------------
ASYNC EVENT NOTIFICATION
------------------------

  Changes occuring at the iSCSI target need to be communicated to the initiator
  as asynchronous messages after negotiating the key "SendAsyncText". The async
  events will be notified to the initiator in the following scenario.
  These events are sent over the discovery session.

  1. PortalOnline - Indicates that a portal (IP Address and TCP port) has been
     added, so target sessions can be established on this portal.

  2. PortalOffline - Indicates the initiator that a portal (IP Address and TCP
     port) has been removed, hence if the initiator loses connectivity to this
     address and port, it should not be retried.

  3. TargetOnline - Notifies the initiator that a new target may be
     available for use and the initiator can try to establish connection to
     this target.

  4. TargetOffline - Notifies the initiator that a target has become
     unavailable. If the initiator loses target connectivity, it should not
     retry connection if any further connection attempt is denied.

----------------
iSCSI HBA STATUS
----------------

  The directory '/sys/class/scsi_host/' contains all registered SCSI HBA
  entries and corresponding sysfs files to read/write any host specific
  attributes. All iSCSI host entries will be present in any of hostX
  directory, where X can be (0 to 2^32 - 1) number of allowable host ids.

  The proc_name attribute can be used to identify the iSCSI host under
  sysfs.
  # more /sys/class/scsi_host/hostX/proc_name
  iscsi-sfnet

  The following file can be used to request shutdown of an iscsi session.

  shutdown - stop the iSCSI driver.
  # echo "shutdown" > /sys/class/scsi_host/hostX/shutdown


----------------------------
USING MULTIPATH I/O SOFTWARE
----------------------------
  Some iSCSI target devices have multiple Ethernet ports. Those systems may be
  configured to allow iSCSI target access via multiple paths. When the iSCSI
  driver discovers targets through a multi-port device, it also discovers all
  the IP addresses that can be used to reach each of those targets. 
  It establishes a session using each of the IP addresses through which the
  target can be reached. It exports all the available paths to the user.

  Multipath drivers exploit this feature to provide better performance
  (due to load sharing) and high availability (failover of I/O if one of the
  path goes bad).

  It may be necessary to modify the configuration of the driver to allow 
  the multi-pathing software to operate more efficiently. If you are using
  a multipath I/O application, you may need to set the "ConnFailTimeout" 
  parameter of the iSCSI driver to a smaller value so that SCSI commands will
  fail more quickly when an iSCSI network connection drops allowing the
  multipath application to try a different path for access to the storage
  device.

  Device mapper, a multipath software can be obtained from the 
  following URL:
  http://sources.redhat.com/dm/

------------------------------------
MAKING STORAGE CONFIGURATION CHANGES
------------------------------------

  Making changes to your storage configuration, including adding or
  removing targets or LUNs, remapping targets, or modifying target
  access, may change how the devices are presented to the host operating
  system. This may require corresponding changes in the iSCSI driver
  configuration and /etc/fstab.iscsi file.

  It is important to understand the ramifications of SCSI routing
  service configuration changes on the hosts accessing the associated
  storage devices. For example, changing the instance configuration
  may change the device presentation to the host's iSCSI driver,
  effectively changing the name or number assigned to the device
  by the host operating system. Certain configuration changes,
  such as adding or deleting targets, adding or deleting LUNs
  within a particular target, or adding or deleting entire instances
  may change the order of the devices presented to the host.
  Even if the host is only associated with one SCSI routing
  service instance, the device order could make a difference.

  Typically, the host operating system assigns drive identifications
  in the order they are received based on certain criteria. Changing
  the order of the storage device discovery may result in a changed
  drive identification. Applications running on the host may require
  modifications to appropriately access the current drives.

  If an entire SCSI routing service instance is removed, or there
  are no targets available for the host, the host's iSCSI driver
  configuration file must be updated to remove the appropriate
  reference before restarting the iSCSI driver. If a host's iSCSI
  configuration file contains an IP address of a SCSI routing
  service instance that does not exist, or has no targets available
  for the host, the iSCSI driver will not complete a login and
  will keep on trying to discover targets associated with this SCSI
  routing service instance.


  In general, the following steps are normally required when reconfiguring
  iSCSI storage:

   1. Unmount any filesystems and stop any applications using iSCSI
      devices.

   2. Stop the iSCSI driver by entering:

        /etc/init.d/iscsi stop

   3. Make the appropriate changes to the iSCSI driver
      configuration file. Remove any references to iSCSI
      DiscoveryAddresses that have been removed, or that
      no longer have valid targets for this host.

   4. Modify /etc/fstab.iscsi and application configurations as
      appropriate.

   5. Restart the iSCSI driver by entering:

        /etc/init.d/iscsi start 

  Failure to appropriately update the iSCSI configuration using 
  the above procedure may result in a situation that prevents 
  the host from accessing iSCSI storage resources.


-------------------------------
TARGET AND LUN DISCOVERY LIMITS
-------------------------------

  The bus ID and target ID are always zero in the new one hba per transport
  model since every target will have one hba instance. The host ID is unique
  for every target and changes across reboots. Totally 0 to 2^23 -1 hosts can
  be allocated on a linux system. The lun ID is assigned by the iSCSI target,
  the iSCSI intiator driver currently supports 256 LUNs per target.
  If a LUN ID > 256 it will be ignored by the driver and will not be
  configured in the system.


-------------------------------
SERVICE LOCATION PROTOCOL (SLP)
-------------------------------

  Target discovery through SLP is supported by the driver and can be used
  in addition to or in place of the DiscoveryAddress mechanism.
  Two types of entries in the /etc/iscsi.conf file determine how the SLP
  queries will be made by the driver to discover iSCSI targets:

   - "SLPUnicast=<IP Address>" entries /etc/iscsi.conf specify the driver to
      unicast a SLP query to discover iSCSI targets using TCP/IP to the
      specified <IP Address> (assuming this IP Address corresponds to that of a
      SLP Service Agent(SA) or a SLP Directory Agent(DA)).

   - "SLPMulticast=<comma separated list of host system IP addresses or
     "none" or "all"> entries in /etc/iscsi.conf specify the list of host
     system network IP addresses corresponding to the networks over which SLP
     queries will be multicast.

  Both these types of entries can occur multiple times in /etc/iscsi.conf
  with each entry defining a separate SLP query to be done. The driver uses the
  union of the discovery information from all discovery sources when deciding
  which target sessions to establish. For more information about the SLP
  protocol, refer to the IETF standards at http://www.ietf.org.

  *****************************************************************************
  NOTE: openslp release 1.1.4 and onwards is required for discovering iSCSI
	  targets using SLP discovery mechanism. Uncomment the following line
	  in Makefile to enable SLP:
		#ENABLE_SLP:= 1
  *****************************************************************************


------------------
iSCSI NETWORK BOOT 
------------------

 The Linux iSCSI driver has been designed to support various network boot
 applications. iSCSI network boot allows a user to boot a computer without a
 directly attached disk and instead, use a networked iSCSI disk drive. As with
 any iSCSI disk, even though it is not directly attached to the computer
 accessing it, the disk appears to the computer as if it were directly attached
 via the IP network connection.

 Shown below are two iSCSI network boot programs that are available today:

  1. Cisco's Network Boot program (iNBP) available from:

       http://www.cisco.com/en/US/products/hw/ps4159/ps2160/products_
              installation_and_configuration_guides_list.html

  2. PXELINUX which is a derivative of SYSLINUX available from:

       http://www.kernel.org/pub/linux/utils/boot/syslinux/

  The Cisco Network Boot program has been tested and works with this version of
  the Linux iSCSI driver. The PXELINUX program has not been tested.

  Detailed instructions for installing and configuring the network boot programs
  listed above can be found in the documentation supplied on their websites. In
  addition, an open source replication utility used for cloning a complete image
  from one disk to another disk (usually an iSCSI disk or LUN) can be found at:

       http://sourceforge.net/projects/linux-iscsi


---------------------
TARGET AUTHENTICATION
---------------------

  The CHAP authentication mechanism provides for two way authentication between
  the target and the initiator. The CHAP authentication capability must also be
  available on the iSCSI target device for this feature to work.

  The username and password for both the initiator and the target needs to be
  added to the /etc/iscsi.conf file. The username and password can be specified
  as global values or can be made specific to each target address. Please refer
  to the Editing The iscsi.conf File section of this document for a more
  detailed description of these parameters.


---------------------------
EDITING THE ISCSI.CONF FILE
---------------------------

  The /etc/iscsi.conf file is used to control the operation of the iSCSI driver
  by allowing the user to configure the values for a number of programmable
  parameters. These parameters can be setup to apply to specific configuration
  types or they can be setup to apply globally. The configuration types that are
  supported are:

    - DiscoveryAddress = SCSI routing instance IP address with format a.d.c.d
                         or a.b.c.d:n or hostname.
    - TargetName = Target name in 'iqn' or 'eui' format
                   e.g.: TargetName = iqn.1987-05.com.cisco:00.0d1d898e8d66.t0
    - Subnet = Network portal IP address with format a.b.c.d/n or a.b.c.d&hex

  The complete list of parameters that can be applied either globally or to the
  configuration types listed above are shown below. Not all parameters are
  applicable to all configuration types. Some of the parameters are actual
  iSCSI login keys, and others are just configuration options for the 
  initiator.

  ___________________________________________________________________________

          KEYS                      DESCRIPTION              DEFAULT VALUE
  ___________________________________________________________________________

   OutgoingUsername      CHAP username used for initiator           -
                         authentication by the target.

   OutgoingPassword      CHAP password used for initiator           -
                         authentication by the target.

   IncomingUsername      CHAP username for target                   -
                         authentication by the initiator.

   IncomingPassword      CHAP password for target                   -
                         authentication by the initiator.

   HeaderDigest          Type of header digest support the         prefer-off
                         initiator is requesting of the target.

   DataDigest            Type of data digest support the           prefer-off
                         initiator is requesting of the target.

   SLPUnicast            Single IP address of the SLP service       -
                         or directory agent.

   SLPMulticast          Multicast IP addresses used to discover    -
                         SLP service or directory agents.

   PollInterval          Time interval between successive SLP      5 min
                         queries sent out.

   LoginTimeout          Time interval to wait for a response      15 sec
                         to a login request to be received from
                         a target before failing a connection
                         attempt.

   AuthTimeout           Time interval to wait for a response      45 sec
                         to a login request containing
                         authemtication information to be
                         received from a target before failing
                         a connection attempt.

   IdleTimeout           Time interval to wait for on a            60 sec
                         connection before sending a ping when
                         there are no active tasks in the
                         session.

   ActiveTimeout         Time interval to wait for on a             5 sec
                         connection before sending a ping when
                         there are active tasks in the session.

   PingTimeout           Time interval to wait for a ping          5 sec
                         response after a ping is sent before
                         failing a connection.

   ConnFailTimeout       Time interval to wait before failing      0 sec
                         SCSI commands back to an application
                         for unsuccessful commands.

   AbortTimeout          Time interval to wait for a abort         10 sec
                         command to complete before declaring
                         the abort command failed.

   ResetTimeout          Time interval to wait for a reset         30 sec
                         command to complete before declaring
                         the reset command failed.

   Enabled               Enable/Disable a target or list of        yes
                         targets.

   InitialR2T            Enabling/disabling of R2T flow control    no
                         with the target.

   ImmediateData         Enabling/disabling the sending of         yes
                         unsolicited data burst with the iSCSI
                         command PDU.

   MaxRecvDataSegment    Maximum number of bytes that the          128K
   Length                initiator can receive in an iSCSI PDU.

   FirstBurstLength      Maximum number of bytes of unsolicited    256K
                         data the initiator is allowed to send.

   MaxBurstLength        Maximum number of bytes for the SCSI      16M
                         payload negotiated by initiator.

   TCPWindowSize         Maximum number of bytes that can be       256K
                         sent over a TCP connection by the
                         initiator before receiving an
                         acknowledgement from the target.

   Continuous            Enabling/disabling the discovery          yes
                         session to be kept alive. If 
                         Continuous = "yes" and a "Reject(0x3f)" 
                         message is received from the target in 
                         response to the ping (NOP_OUT) message 
                         sent by the initiator, the Continuous
                         parameter will be set to "no" and no 
                         further ping messages will be sent by
                         the initiator.

   SendAsyncText         Enable/disable sending "X" keys related to  	yes
                         Async events; Cisco target only.

  A detailed description for each of these parameters is included in both the
  man page and the included sample iscsi.conf file. Please consult these sources
  for examples and more detailed programming instructions.


-------------------------------
TUNING iSCSI TIMEOUT PARAMETERS
-------------------------------

  - ConnFailTimeout (Default = 0)

  Set this value to fail commands when there is network problem. Default
  value of 0 means that commands will not be failed. You might want to
  change ConnFailTimeout under following scenario:

  If the network is down for sufficiently long time, the application
  doing I/Os to iSCSI device will seem to hang. At this point, you
  might want to fail the I/Os by setting ConnFailTimeout to a reasonably
  low value. This will fail the I/Os to the application and the
  application will resume.

 *****************************************************************************
 NOTE: The above timeout can usually be changed dynamically by following the 
       instructions under Dynamic Driver Reconfiguration section. The above 
       procedure fails to propogate the changes when network connection is 
       down. Use the following command to change ConnFailTimeout value when
       the network connection is down.
     
       echo "<Timeout>" > /sys/class/scsi_host/hostX/connfailtimeout
       X - host number of iSCSI HBA.

       Specify timeout to change the value across all existing sessions.

       ConnFailTimeout is set to 30 in rc.iscsi during stop of the driver.
       This is done so as to prevent a hang that can be caused because of
       unresponsive targets. You can change this value by setting
       CONNFAILTIMEOUT in the rc.iscsi file.
 *****************************************************************************


----------------------------
iSCSI COMMANDS AND UTILITIES
----------------------------

  This section gives a description of all the commands and utilities available
  with the iSCSI driver.

  - "iscsi-ls" lists information about the iSCSI devices available to the
    driver. Please refer to the man page for more information.


-------------------
DRIVER FILE LISTING
-------------------

  The following files are present on the system after the successful
  installation of iSCSI driver:

     /etc/init.d/iscsi
     /etc/iscsi.conf
     /etc/initiatorname.iscsi
     /sbin/iscsi-mountall
     /sbin/iscsid
     /sbin/iscsi-device
     /sbin/iscsi-iname
     /sbin/iscsi-ls
     /sbin/iscsi-umountall
     /man/man5/iscsi.conf.5
     /man/man1/iscsi-ls.1
     /man/man8/iscsid.8
     /lib/modules/<uname -r>/misc/iscsi_sfnet.ko
     /lib/modules/<uname -r>/misc/scsi_transport_iscsi.ko


===============================================================================
GPL LICENSE
===============================================================================
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991 

Copyright (C) 1989, 1991 Free Software Foundation, Inc.  
59 Temple Place - Suite 330, Boston, MA  02111-1307, USA

Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.

Preamble
The licenses for most software are designed to take away your freedom to
share and change it. By contrast, the GNU General Public License is intended
to guarantee your freedom to share and change free software--to make sure
the software is free for all its users. This General Public License applies
to most of the Free Software Foundation's software and to any other program
whose authors commit to using it. (Some other Free Software Foundation
software is covered by the GNU Library General Public License instead.) You
can apply it to your programs, too. 

When we speak of free software, we are referring to freedom, not price. Our
General Public Licenses are designed to make sure that you have the freedom
to distribute copies of free software (and charge for this service if you
wish), that you receive source code or can get it if you want it, that you
can change the software or use pieces of it in new free programs; and that
you know you can do these things. 

To protect your rights, we need to make restrictions that forbid anyone to
deny you these rights or to ask you to surrender the rights. These
restrictions translate to certain responsibilities for you if you distribute
copies of the software, or if you modify it. 

For example, if you distribute copies of such a program, whether gratis or
for a fee, you must give the recipients all the rights that you have. You
must make sure that they, too, receive or can get the source code. And you
must show them these terms so they know their rights. 

We protect your rights with two steps: (1) copyright the software, and (2)
offer you this license which gives you legal permission to copy, distribute
and/or modify the software. 

Also, for each author's protection and ours, we want to make certain that
everyone understands that there is no warranty for this free software. If
the software is modified by someone else and passed on, we want its
recipients to know that what they have is not the original, so that any
problems introduced by others will not reflect on the original authors'
reputations. 

Finally, any free program is threatened constantly by software patents. We
wish to avoid the danger that redistributors of a free program will
individually obtain patent licenses, in effect making the program
proprietary. To prevent this, we have made it clear that any patent must be
licensed for everyone's free use or not licensed at all. 

The precise terms and conditions for copying, distribution and modification
follow. 

TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains a notice
placed by the copyright holder saying it may be distributed under the terms
of this General Public License. The "Program", below, refers to any such
program or work, and a "work based on the Program" means either the Program
or any derivative work under copyright law: that is to say, a work containing
the Program or a portion of it, either verbatim or with modifications and/or
translated into another language. (Hereinafter, translation is included
without limitation in the term "modification".) Each licensee is addressed
as "you". 

Activities other than copying, distribution and modification are not covered
by this License; they are outside its scope. The act of running the Program
is not restricted, and the output from the Program is covered only if its
contents constitute a work based on the Program (independent of having been
made by running the Program). Whether that is true depends on what the
Program does. 

1. You may copy and distribute verbatim copies of the Program's source code
as you receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice and
disclaimer of warranty; keep intact all the notices that refer to this
License and to the absence of any warranty; and give any other recipients
of the Program a copy of this License along with the Program. 

You may charge a fee for the physical act of transferring a copy, and you
may at your option offer warranty protection in exchange for a fee. 

2. You may modify your copy or copies of the Program or any portion of it, 
thus forming a work based on the Program, and copy and distribute such
modifications or work under the terms of Section 1 above, provided that you
also meet all of these conditions: 


a) You must cause the modified files to carry prominent notices stating that
you changed the files and the date of any change. 

b) You must cause any work that you distribute or publish, that in whole or
in part contains or is derived from the Program or any part thereof, to be
licensed as a whole at no charge to all third parties under the terms of
this License. 

c) If the modified program normally reads commands interactively when run,
you must cause it, when started running for such interactive use in the most
ordinary way, to print or display an announcement including an appropriate
copyright notice and a notice that there is no warranty (or else, saying that
you provide a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this License.
(Exception: if the Program itself is interactive but does not normally print
such an announcement, your work based on the Program is not required to print
an announcement.) 
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Program, and can be reasonably
considered independent and separate works in themselves, then this License,
and its terms, do not apply to those sections when you distribute them as
separate works. But when you distribute the same sections as part of a whole
which is a work based on the Program, the distribution of the whole must be
on the terms of this License, whose permissions for other licensees extend to
the entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest your
rights to work written entirely by you; rather, the intent is to exercise the
right to control the distribution of derivative or collective works based on
the Program. 

In addition, mere aggregation of another work not based on the Program with
the Program (or with a work based on the Program) on a volume of a storage
or distribution medium does not bring the other work under the scope of this
License. 

3. You may copy and distribute the Program (or a work based on it, under
Section 2) in object code or executable form under the terms of Sections 1
and 2 above provided that you also do one of the following: 

a) Accompany it with the complete corresponding machine-readable source code,
which must be distributed under the terms of Sections 1 and 2 above on a
medium customarily used for software interchange; or, 

b) Accompany it with a written offer, valid for at least three years, to give
any third party, for a charge no more than yourram except as expressly
provided under this License. Any attempt otherwise to copy, modify,
sublicense or distribute the Program is void, and will automatically
terminate your rights under this License. However, parties who have received
copies, or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance. 

5. You are not required to accept this License, since you have not signed it.
However, nothing else grants you permission to modify or distribute the
Program or its derivative works. These actions are prohibited by law if you
do not accept this License. Therefore, by modifying or distributing the
Program (or any work based on the Program), you indicate your acceptance of
this License to do so, and all its terms and conditions for copying,
distributing or modifying the Program or works based on it. 

6. Each time you redistribute the Program (or any work based on the Program),
the recipient automatically receives a license from the originaices. Many
people have made generous contributions to the wide range of software
distributed through that system in reliance on consistent application of
that system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot impose
that choice. 

This section is intended to make thoroughly clear what is believed to be a
consequence of the rest of this License. 

8. If the distribution and/or use of the Program is restricted in certain
countries either by patents or by copyrighted interfaces, the original
copyright holder who places the Program under this License may add an
explicit geographical distribution limitation excluding those countries, so
that distribution is permitted only in or among countries not thus excluded.
In such case, this License incorporates the limitation as if written in the
body of this License. 

9. The Free Software Foundation may publish revised and/or new versions of
the General Public License from time to tgenerally. 

NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR
THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE
STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE
PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE,
YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL
ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE
OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR
DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR
A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH
HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 


END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest possible
use to the public, the best way to achieve this is to make it free software
which everyone can redistribute and change under these terms. 

To do so, attach the following notices to the program. It is safest to
attach them to the start of each source file to most effectively convey
the exclusion of warranty; and each file should have at least the "copyright"
line and a pointer to where the full notice is found. 

one line to give the program's name and an idea of what it does.
Copyright (C) yyyy  name of author

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

Also add information on how to contact you by electronic and paper mail. 

If the program is interactive, make it output a short notice like this when
it starts in an interactive mode: 

Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details
type `show w'.  This is free software, and you are welcome
to redistribute it under certain conditions; type `show c' 
for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may be
called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program. 

You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names: 

Yoyodyne, Inc., hereby disclaims all copyright
interest in the program `Gnomovision'
(which makes passes at compilers) written 
by James Hacker.

signature of Ty Coon, 1 April 1989
Ty Coon, President of Vice

This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General Public
License instead of this License. 
