Target bindings – HP ISCSI SR2122 User Manual
Page 43
Serving Storage to the iSCSI Initiators from the SR2122 over IP
43
iSCSI SR2122 Storage Router: Getting Started Guide
Under /dev/iscsi, there will be a directory tree containing subdirectories for each iSCSI bus
number, each target id number on the bus, and each logical unit number for each target. For
example, the whole disk device for bus 0, target id 0, LUN 0 would be
/dev/iscsi/bus0/target0/lun0/disk
In each logical unit directory there will be a symbolic link for each SCSI device node that may
be connected to that particular logical unit. These symbolic links are modeled after the Linux
devfs naming convention.
The symbolic link 'disk' will map to the whole-disk SCSI device node
(e.g. /dev/sda, /dev/sdb, etc).
The symbolic links 'part1' through 'part15' will map to each partition of that SCSI disk (e.g.
/dev/sda1, dev/sda15, etc). Note that these links will exists regardless of the number of disk
partitions. Opening the partition devices will result in an error if the partition does not actually
exist on the disk.
The symbolic link 'mt' will map to the auto-rewind SCSI tape device node for this LUN (e.g.
/dev/st0), if any. Additional links for 'mtl', 'mtm', and 'mta' will map to the other auto-rewind
devices (e.g. /dev/st0l, /dev/st0m, /dev/st0a), regardless of whether these device nodes actually
exist or could be opened.
The symbolic link 'mtn' will map to the no-rewind SCSI tape device node for this LUN (e.g.
/dev/nst0), if any. Additional links for 'mtln', 'mtmn', and 'mtan' will map to the other
no-rewind devices (e.g. /dev/nst0l, /dev/nst0m, /dev/nst0a), regardless of whether those device
nodes actually exist or could be opened.
The symbolic link 'cd' will map to the SCSI cdrom device node for this LUN
(e.g. /dev/scd0), if any.
The symbolic link 'generic' will map to the SCSI generic device node for this LUN
(e.g. /dev/sg0), if any.
Because the symlink creation process must open all of the SCSI device nodes in /dev in order
to determine which nodes map to iSCSI devices, you may see many modprobe messages
logged to syslog indicating that modprobe could not find a driver for a particular combination
of major and minor numbers. This is harmless, and can be ignored. The messages occur when
Linux is unable to find a driver to associate with a SCSI device node that the iSCSI daemon is
opening as part of it's symlink creation process. To prevent these messages, the SCSI device
nodes with no associated high-level SCSI driver can be removed.
Target Bindings
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, even when the driver is repeatedly 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 cannot 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.