iscsiadm

Overview

Some useful commands for iscsiadm.

Removing a target

This command is useful when you have a bootup that is hanging at "starting iscsi". This often occurs because there is a defunct or unavailable target that iscsiadm is trying to access that times out and takes several minutes for timeout. The reference for these next two commands is here.

You can remove the target using a command like the one shown below.

iscsiadm -m node -o delete -T iqn.2016-07.com.orabuntu-lxc:storage.tgt.lxc.oracle.asm

If the target is temporarily unavailable, but is expected to be brought back on line later, you can just disable a target temporarily using a command like the one shown below.

iscsiadm --m node -T iqn.2007-06.com.test.cluster1:storage.cluster1 --portal 172.16.48.175:3260 -u

Logging into a target on bootup

To login to a target on bootup use a command like the one shown below.