User Manual
Driver FeaturesRev 2.1-1.0.6
Mellanox Technologies
52
• To discover SRP Targets reachable from the HCA device <InfiniBand HCA name> and
the port <port num>, (and to generate output suitable for 'echo',) you may execute:
host1# srp_daemon -c -a -o -i <InfiniBand HCA name> -p <port number>
• To both discover the SRP Targets and establish connections with them, just add the -e
option to the above command.
• Executing srp_daemon over a port without the -a option will only display the reachable
tar
gets via the port and to which the initiator is not connected. If executing with the -e
option it is better to omit -a.
• It is recommended to use the -n option. This option adds the initiator_ext to the connecting
string. (See Section 4.1.2.5 for more details).
• srp_daemon has a configuration file that can be set, where the default is /etc/
srp_daemon.conf. Use the -f to supply a dif
ferent configuration file that configures the tar-
gets srp_daemon is allowed to connect to. The configuration file can also be used to set
values for additional parameters (e.g., max_cmd_per_lun, max_sect).
• A continuous background (daemon) operation, providing an automatic ongoing detection
and connection capability
. See Section 4.1.2.4.
4.1.2.4 Automatic Discovery and Connection to Targets
• Make sure that the ib_srp module is loaded, the SRP Initiator can reach an SRP Target,
and that an SM is running.
•
To connect to all the existing Targets in the fabric, run “
srp_daemon -e -o”. This util-
ity will scan the fabric once, connect to every Target it detects, and then exit.
• To connect to all the existing Targets in the fabric and to connect to new targets that will
join the fabric, execute srp_daemon -e. This utility continues to execute until it is either
killed by the user or encounters connection errors (such as no SM in the fabric).
• To execute SRP daemon as a daemon on all the ports:
•
srp_daemon.sh (found under /usr/sbin/). srp_daemon.sh sends its log to /var/log/
srp_daemon.log
.
• Start the srpd service script, run
service srpd start
• It is possible to configure this script to execute automatically when the InfiniBand
driver starts by changing the value of SRP_DAEMON_ENABLE in /etc/infiniband/
openib.conf to “yes”. However, this option also enables SRP High Availability that has
some more features – see Section 4.1.2.6).
To obtain the list of InfiniBand HCA device names, you can either use the ibstat tool or
run ‘ls /sys/class/infiniband’.
srp_daemon will follow the configuration it finds in /etc/srp_daemon.conf. Thus, it
will ignore a target that is disallowed in the configuration file.