Open-iSCSI Commands

Discover, Login & Mount Drives

Display all iSCSI targets on give ip-address.

iscsiadm --mode discovery --type sendtargets --portal 192.168.1.250

Connect to a give target.  

iscsiadm --mode node --targetname iqn.1994-04.org.netbsd.iscsi-target:target0 --portal 192.168.1.250:3260 --login

Close connection to a iSCSI target.

iscsiadm --mode node --targetname iqn.1994-04.org.netbsd.iscsi-target:target0 --portal 192.168.1.250:3260 --logout

Mount a iSCSI disk with lable ISCSI-0 on directory ‘/mnt/iscsi-0’.

mount /dev/disk/by-label/ISCSI-0 /mnt/iscsi-0

 

Node records

Display node records.

iscsiadm --mode node
iscsiadm --mode node --targetname iqn.1994-04.org.netbsd.iscsi-target:target0 --portal 192.168.1.250:3260