There are three parts to the open-iscsi subsystem: the iscsiadm command, the iscsid daemon, and the kernel.
The user-space parts (i.e. iscsiadm and iscsid) keep two databases, of sorts. I say of sorts because the "database" is files and directories, not a real DB.
There is a discovery DB, and there is a target DB.
When you run iscsiadm -m discovery -t st -P IPADDR
, you populate the discovery DB, which keeps track of the settings for this target, and you populate the node DB with records from the target(s) discovered.
After this step, you can run iscsiadm -m node
to see the nodes discovered.
When you run iscsiadm -m node -t TGT_NAME -P IPADDR -l
, you tell iscsiadm/iscsid that you want to find the node that has target name TGT_NAME and portal IP address of IPADDR, and login to it.
You can do both steps, by the way, by running something like:
iscsiadm -m discovery -t st -p IPADDR -l
Or, after discovery, you could run:
iscsiadm -m node -l
to login to all nodes.
I don't have CentOS 7, but I suspect there are at least two iscsi services. If you run systemctl list-unit-files | fgrep iscsi
, you may see more than "iscsi.service".
On openSUSE, there are three unit files: iscsid.socket, iscsid.service, and iscsi.service.
The iscsid.socket and iscsid.service files go together to make iscsid socket-activated. The iscsid.service is basically the iscsid daemon.
The iscsi.service file is layered on top of iscsid.service. This service just logs into targets that are marked with a flag that says you want to login at startup time.
Here's a link to how to set up your targets for automatic boot, but this is a SUSE document, so YMMV.
There is also an open-iscsi mailing list you can join: [email protected]