Assigning device names, Target bindings, Assigning device names target bindings – HP MPX200 Multifunction Router User Manual
Page 78
![background image](/manuals/397853/78/background.png)
Assigning device names
Linux assigns SCSI device nodes dynamically when it detects a SCSI logical unit; therefore, the
mapping from device nodes (such as /dev/sda and /dev/sdb) to iSCSI targets and logical units
may vary.
Variations in process scheduling and network delay can result in iSCSI targets being mapped to
different SCSI device nodes each time the driver is started. Therefore, configuring applications or
operating system utilities to use the standard SCSI device nodes to access iSCSI devices can result
in SCSI commands being sent to the wrong target or logical unit.
To ensure consistent naming, the iSCSI driver scans the system to determine the mapping from
SCSI device nodes to iSCSI targets. The iSCSI driver creates a tree of directories and symbolic
links under /dev/iscsi to facilitate access to a logical unit of an iSCSI target.
The directory tree under /dev/iscsi contains subdirectories for each iSCSI bus number, each
target ID number on the bus, and each LUN for each target. For example, the disk device for bus
0, target ID 0, and LUN 0 would be /dev/iscsi/bus0/target0/LUN0/disk.
Each logical unit directory contains a symbolic link for each SCSI device node that can connect
to that logical unit. The symbolic links are named using the Linux devfs naming convention.
•
The symbolic link disk maps to the whole-disk SCSI device node (for example, /dev/sda
or /dev/sdb).
•
The symbolic links, part1 through part15, map to each partition of the SCSI disk. For
example, a symbolic link can map to partitions /dev/sda1 and dev/sda15, or to as many
partitions as necessary.
NOTE:
The symbolic links exist regardless of the number of disk partitions. Accessing a
partition name results in an error if the partition does not exist on the disk.
•
The symbolic link mt maps to the auto-rewind SCSI tape device node for the LUN (for example,
/dev/st0
). Additional links for mtl, mtm, and mta map to the other auto-rewind devices
(for example,/dev/st0l, /dev/st0m, /dev/st0a), regardless of whether those device
nodes exist or can be opened.
•
The symbolic link mtn maps to the no-rewind SCSI tape device node, if any. (For example,
this LUN maps to /dev/nst0.) Additional links (formtln, mtmn, and mtan) map to the
other no-rewind devices (for example, /dev/nst0l, /dev/nst0m, /dev/nst0a),
regardless of whether those device nodes exist or can be opened.
•
The symbolic link cd maps to the SCSI CD-ROM device node, if any, for the LUN (for example,
/dev/scd0
).
•
The symbolic link generic maps to the SCSI generic device node, if any, for the LUN (for
example, /dev/sg0).
The symlink creation process must open all SCSI device nodes in /dev to determine which nodes
map to iSCSI devices. Therefore, several modprobe messages may be logged to syslog indicating
that modprobe could not find a driver for a particular combination of major and minor numbers.
You can ignore these messages, which 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 the symlink creation
process. To prevent these messages from occurring, remove the SCSI device nodes that do not
contain an associated high-level SCSI driver.
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 with a particular iSCSI TargetName, even if the driver is restarted repeatedly.
78
MPX200 iSCSI configuration rules and guidelines