User Tools

Site Tools


nndocs:iscsi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
nndocs:iscsi [2024/02/12 16:25] – created naptasticnndocs:iscsi [2025/01/03 02:32] (current) – [Initiator] naptastic
Line 1: Line 1:
-TODO: Make all the initiator and target names match please +TODO: Explain why don't have iSCSI boot working yet, please
-TODO: Find out if the :blah section is actually needed for the IQN or if can drop it+
  
 =====Target===== =====Target=====
Line 16: Line 15:
     > portals/ create 172.19.12.1 3260     > portals/ create 172.19.12.1 3260
     > portals/172.19.12.1:3260 enable_iser boolean=true     > portals/172.19.12.1:3260 enable_iser boolean=true
- 
-TODO: enable_iser doesn't work on shark. Any ideas why yet? Or is it just time to nuke and re-pave? 
  
 =====Initiator===== =====Initiator=====
Line 25: Line 22:
  
 ===Login. Must use a node record id found by the discovery=== ===Login. Must use a node record id found by the discovery===
-    iscsiadm --mode node --targetname iqn.2001-05.com.doe:test --portal 172.20.64.11:3260 --login+    iscsiadm --mode node --targetname iqn.2014-08.rocks.narf.southpark --portal 172.20.64.11:3260 --login
  
 [[https://www.thegeekdiary.com/iscsi-connection-command-examples-cheat-sheet/]] [[https://www.thegeekdiary.com/iscsi-connection-command-examples-cheat-sheet/]]
Line 32: Line 29:
  
     # iscsiadm -m session     # iscsiadm -m session
-    tcp: [1] 172.21.0.80:3260,1 iqn.2003-01.org.linux-iscsi.happy.x8664:sn.9eb52ac74563 (non-flash)+    tcp: [1] 172.20.0.80:3260,1 iqn.2014-08.rocks.narf.southpark (non-flash)
  
 The session number (sid) is the 1 in brackets. The session number (sid) is the 1 in brackets.
 +
 +===Use iSER instead of TCP (initiator side)===
 +If performance is poor, the initiator may have logged in using TCP instead of iSER. In my testing, to a ramdisk over IB, TCP got ~520 MiB/s, where with iSER I have gotten 3.2 GB/s.
 +
 +You know you got TCP if dmesg describes your LUN like this:
 +
 +    [123.45678] scsi host1: iSCSI Initiator over TCP/IP
 +    [123.45678] scsi 1:0:0:0: Direct-Access     LIO-ORG  volume       4.0  PQ: 0 ANSI: 6
 +
 +It should say iSER instead of TCP/IP. Log out of that session, then run this command. It also logs in, which makes me wonder if the initiator name argument above is necessary.
 +
 +    iscsi_discovery 172.20.64.13 -t iser -l
 +
 +Now dmesg should show something more like this:
 +
 +    [123.45678] scsi host1: iSCSI Initiator over iSER
 +    [123.45678] scsi 1:0:0:0: Direct-Access     LIO-ORG  volume       4.0  PQ: 0 ANSI: 6
  
 ===Rescan after the target adds a LUN=== ===Rescan after the target adds a LUN===
  
     # iscsiadm -m session --sid=1 --rescan     # iscsiadm -m session --sid=1 --rescan
-    Rescanning session [sid: 1, target: iqn.2003-01.org.linux-iscsi.happy.x8664:sn.9eb52ac74563, portal: 172.21.0.80,3260]+    Rescanning session [sid: 1, target: iqn.2014-08.rocks.narf.southpark, portal: 172.20.0.80,3260]
  
 ===Log out when you're done (very, very carefully)=== ===Log out when you're done (very, very carefully)===
nndocs/iscsi.1707755114.txt.gz · Last modified: 2024/02/12 16:25 by naptastic