
*************************************************************************
Feature:

1) Supports draft 20
2) Supports multiple sessions, multiple connections
3) Supports multiple devices
4) Supports multiple listening sockets
5) Supports header digest, data digest
6) Supports ErrorRecoveryLevel 1


*************************************************************************
How to compile UNH iSCSI reference implementation Target:

Before compiling the UNH iSCSI target module, you need to define the
IP addresses, port numbers and target portal group tags the
target will use to listen for connections from initiators.  This is
done by filling in the table in the file iscsi_portal_group.c.
Instructions and examples are given in comments in that file.
As distributed, the target will listen on the iscsi WKP (3260) on
all IP addresses defined by the host OS, and these addresses will
be considered target portal group 1.

Before compiling the UNH iSCSI target module, you need to set options in the
scsi_target.h file. The two most often used options are FILEIO and DISKIO.
To set these options, you need to uncomment the one you want and comment 
all other options in the scsi_target.h file, as following:
-----------------------------------------------------------------
//# define MEMORYIO	/* for performance studies */
# define DISKIO		/* to a real disk */
//# define FILEIO	/* to a file on the system */
//# define GENERICIO	/* when the scsi_do_req is not working */
-----------------------------------------------------------------

When installing the target in DISKIO option, the target will search all 
available scsi disks (or tapes if defined TAPE_DEVICE) on your machine 
and assign a target name to each of these disks. The initiator can get
the target names by discovery. Note: Be sure to unmount all the scsi 
disks which will be used by the initiators, from the target system,
to avoid crashing the file systems on the disks.

When installing the target in FILEIO option, the target will create eight 
files in the same directory as the installation command. Each file will 
represent one lun of the emulated scsi disk.


*************************************************************************
How to install UNH iSCSI reference implementation Target:

1) insert scsi_target module
2) insert iscsi_target module
3) use manage tool to set keys
4) done and wait for login

Alternative, you can edit iscsi_target_install script, and run it to do 
all those jobs by one command.


*************************************************************************
How to use the scsi disk on the target side by iscsi connection:

1) Run iscsi initiator to make connection to the target
2) Once the connection is made and iSCSI has logged in success (check the
   /var/log/messages file), the initiator sees another disk on its system. 
   If it is the only scsi device on the system, it will be given the name 
   /dev/sda, otherwise, it will be /dev/sdb or /dev/sdc etc.
3) You can run the normal Linux utility programs (/sbin/fdisk, /sbin/mke2fs, 
   /sbin/e2fsck, etc) ON THE INITIATOR to create new partition tables, file 
   systems, etc. on the disk. The OS on the initiator just thinks it has a 
   new scsi disk, and everything that you can do to a real scsi disk on the 
   initiator you can do to the one you are connected to via iscsi. Once you 
   are connected, you NEVER do anything on the target machine -- you always 
   access everything form the initiator. The target machine is used only of 
   rstorage. In fact, all access to the disk MUST come only form the 
   initiator side -- this is because the OS on the initiator knows nothing 
   about the OS on the target (and vice versa), so it thinks it has complete 
   control over the disk, and it uses this control to allocate blocks, 
   maintain inodes, etc. If both the initiator and the target OS try to do 
   this at the same time, they will surely mess up the disk (and probably 
   crash the systems), since they are not coordinating their updates with 
   each other.
4) Once the file system is made on the disk, you can mount it just like you 
   would mount any other (hard) scsi disk. The partitions will be called 
   /dev/sda1, /dev/sda2, etc. Once it is mounted, you access it on the 
   initiator just like you would access any other file system on the initiator 
   -- you can cd to directories on it, you can make new directories on it 
   using mkdir, you can copy files to it using cp, etc., etc., etc.

*************************************************************************
How to remove the Target:

1) remove iscsi_target module
2) remove scsi_target module

or run iscsi_target_uninstall script.


*************************************************************************
How to get log messages of the target:

view the log file at /var/log/messages.

