You can configure iscsid to discover the iSCSI target and
to log in to the iSCSI target automatically.
About this task
When iscsid starts, it checks the SendTarget discovery
records. The steps are as follows:
Procedure
- For the iSCSI initd script startup,
set a session to "automatic" in /etc/iscsi/iscsid.conf:
node.startup = automatic
By default
node.startup is
set to:
automatic in Red Hat Enterprise Linux
manual in SUSE Linux Enterprise Server
- Create the
SendTargets record:# iscsiadm --mode node --target <IQN> --portal 192.0.2.*:3260 -o new
- Set the
use_discoveryd setting for SendTargets record:
#iscsiadm --mode node --target <IQN> --portal 192.0.2.*:3260
-n discovery.sendtargets.use_discoveryd -v Yes
- Set the polling interval:
#iscsiadm --mode node --target IQN --portal 192.0.2.*:3260
-n discovery.sendtargets.discoveryd_poll_inval -v 30
- To make the new settings take effect, restart the iscsi service.
Now SCSI devices appear automatically after subsequent reboots.