EXIT STATUS
On success 0 is returned. On error one of the return codes below will be returned.
Commands that operation on multiple objects (sessions, records, etc), iscsiadm/iscsistart will return the first error that is encountered. iscsi-adm/iscsistart will attempt to execute the operation on the objects it can. If no objects are found ISCSI_ERR_NO_OBJS_FOUND is returned.
0 ISCSI_SUCCESS - command executed successfully.
1 ISCSI_ERR - generic error code.
2 ISCSI_ERR_SESS_NOT_FOUND - session could not be found.
3 ISCSI_ERR_NOMEM - could not allocate resource for operation.
4 ISCSI_ERR_TRANS - connect problem caused operation to fail.
5 ISCSI_ERR_LOGIN - generic iSCSI login failure.
6 ISCSI_ERR_IDBM - error accessing/managing iSCSI DB.
7 ISCSI_ERR_INVAL - invalid argument.
8 ISCSI_ERR_TRANS_TIMEOUT - connection timer exired while trying to connect.
9 ISCSI_ERR_INTERNAL - generic internal iscsid/kernel failure.
10 ISCSI_ERR_LOGOUT - iSCSI logout failed.
11 ISCSI_ERR_PDU_TIMEOUT - iSCSI PDU timedout.
12 ISCSI_ERR_TRANS_NOT_FOUND - iSCSI transport module not loaded in kernel or iscsid.
13 ISCSI_ERR_ACCESS - did not have proper OS permissions to access iscsid or execute iscsiadm command.
14 ISCSI_ERR_TRANS_CAPS - transport module did not support operation.
15 ISCSI_ERR_SESS_EXISTS - session is logged in.
16 ISCSI_ERR_INVALID_MGMT_REQ - invalid IPC MGMT request.
17 ISCSI_ERR_ISNS_UNAVAILABLE - iSNS service is not supported.
18 ISCSI_ERR_ISCSID_COMM_ERR - a read/write to iscsid failed.
19 ISCSI_ERR_FATAL_LOGIN - fatal iSCSI login error.
20 ISCSI_ERR_ISCSID_NOTCONN - could ont connect to iscsid.
21 ISCSI_ERR_NO_OBJS_FOUND - no records/targets/sessions/portals found to execute operation on.
22 ISCSI_ERR_SYSFS_LOOKUP - could not lookup object in sysfs.
23 ISCSI_ERR_HOST_NOT_FOUND - could not lookup host.
24 ISCSI_ERR_LOGIN_AUTH_FAILED - login failed due to authorization failure.
25 ISCSI_ERR_ISNS_QUERY - iSNS query failure.
26 ISCSI_ERR_ISNS_REG_FAILED - iSNS registration/deregistration failed.