Section: Maintenance Commands (8)
Updated: $Date: 2003/02/14 21:53:55 $
Index Return to Main Contents


iscsid - establish iSCSI connections  


iscsid [ -b bindingfile ] [ -d ] [ -f configfile ] [ -l basedir ] [ -m mode ] [ -n ]



iscsid establishes connections with iSCSI targets defined in /etc/iscsi.conf.

Once the Linux iSCSI driver is activated, a discovery process for iSCSI storage devices will proceed as follows:

The iSCSI daemon requests available iSCSI targets from the iSCSI target, and passes the information discovered to the iSCSI kernel module.
The iSCSI kernel module establishes connections to the targets.
Linux queries targets for device information.
Linux creates a mapping from SCSI device nodes to iSCSI targets.

iscsid should be started after networking is configured and stopped after all iSCSI devices have been unmounted.

Warning: Data corruption can occur if you do not unmount iSCSI devices before disabling network interfaces!



Because Linux assigns SCSI device nodes dynamically whenever a SCSI logical unit is detected, the mapping from device nodes (e.g /dev/sda, /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.

To provide a more reliable namespace, the iSCSI driver will scan the system to determine the mapping from SCSI device nodes to iSCSI targets, and then create a tree of directories and symbolic links under /dev/iscsi to make it easier to use a particular iSCSI target's logical units.



The iSCSI driver automatically maintains a bindings file /var/iscsi/bindings. This file contains persistent bindings to ensure that the same iSCSI bus and target id number are used for every iSCSI session to a particular iSCSI TargetName, no matter how many times the driver is restarted.

This feature ensures that the SCSI numbers in the device symlinks described above will always map to the same iSCSI target.

Note that because of the way Linux dynamically allocates SCSI device nodes as SCSI devices are found, the driver does not and can not ensure that any particular SCSI device node (e.g. /dev/sda) will always map to the same iSCSI TargetName. The symlinks described in the section on Device Names are intended to provide a persistent device mapping for use by applications and fstab files, and should be used instead of direct references to particular SCSI device nodes.

If the bindings file grows too large, lines for targets that no longer exist may be manually removed by editing the file. Manual editing should not normally be needed, since the driver can maintain up to 65535 different bindings.  


-b bindingfile
Specify an alternative bindings file instead of /var/iscsi/bindings, which is the default.
Turns on debug mode. Each occurence of -d will increment the debug level by one. The default is zero (off).
-f configfile
Specify an alternative configuration file instead of /etc/iscsi.conf, which is the default.
-l basedir
Specify the base directory under which to build a tree of directories containing symlinks to SCSI device nodes, in a manner similar to the devfs Linux kernel option. Using these symlinks hides variations in the mapping from SCSI device nodes to SCSI device id numbers.
-m mode
Specify the directory permission mode (in octal) to use when creating directories.
Avoid auto-backgrounding.
Print version and exit.



iscsid reacts to a set of signals. You may easily send a signal to iscsid using the following:
kill -SIGNAL `cat /var/run/`

The daemon and all of it's children will die.
sent to the main daemon process will restart all discovery processes and reprobe LUNs on all targets. iscsid and all of it's children will die after shutting down all of the kernel's iSCSI sessions.
Wait for children.



The number of iSCSI targets and LUNs that can be used depends on the number of SCSI device nodes supported by your kernel. Each iSCSI target will be probed for up to 256 LUNs, until the Linux kernel's limit of SCSI devices has been reached.

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


target address and LUN configuration
persistent iSCSI InitiatorName
the process id of the running daemon
persistent bus and target id bindings for iSCSI TargetNames
information about iSCSI devices
a directory tree containing symlinks to iSCSI device nodes.






This document was created by man2html, using the manual pages.
Time: 05:43:48 GMT, June 16, 2003