Question: We have to set up a static configuration for an iSCSI device. It was added as dynamic but the specification calls for a static configuration. How to change iSCSI SendTargets Discovery to Static Discovery?
1. Halt the Solaris zones (if applicable).
2. Export the zfs pool:
# zpool export {pool name}
3. Disable sendtargets discovery:
# iscsiadm modify discovery --sendtargets disable
4. Enable static discovery:
# iscsiadm modify discovery --static enable
5. Verify only static discovery is enabled:
# iscsiadm list discovery Discovery: Static: enabled Send Targets: disabled iSNS: disabled
6. Get the iqn name of a target and its IP address then we can also specify Port number, target portal number. But if not passing those arguments, the initiator will use default port 3260 and whatever tpgt the target is in, it will connect to that tpgt.
# iscsiadm add static-config iqn.1986-03.com.sun:02:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxx.xx,10.30.16.169
7. Import the zfs pool:
# zpool import {pool name}
8. Restart the Solaris zones (if applicable).