Difference between revisions of "ISCSI initiator (简体中文)"

From ArchWiki
Jump to navigation Jump to search
(Created page with "Category:Storage Category:Networking {{Related articles start}} {{Related|iSCSI Target (简体中文)}} {{Related|iSCSI Boot}} {{Related articles end}} en:iSCSI init...")
Line 6: Line 6:
{{Related articles end}}
{{Related articles end}}
[[en:iSCSI initiator]]
[[en:iSCSI initiator]]
{{TranslationStatus (简体中文)|ISCSI_Initiator|2015-05-10|332214}}
{{Translateme (简体中文)}}
With [[Wikipedia:iSCSI]] you can access storage over an IP-based network.
With [[Wikipedia:iSCSI]] you can access storage over an IP-based network.

Revision as of 06:36, 10 May 2015

翻译状态: 本文是英文页面 ISCSI_Initiator翻译,最后翻译时间:2015-05-10,点击这里可以查看翻译后英文页面的改动。


附注: please use the first argument of the template to provide more detailed indications.

With Wikipedia:iSCSI you can access storage over an IP-based network.

The exported storage entity is the target and the importing entity is the initiator.

This article describes how to access an iSCSI target with the Open-iSCSI initiator.


Install the open-iscsi package from the official repositories.

Note: An older initiator, Linux-iSCSI, was merged with Open-iSCSI in April 2005. This should not be confused with linux-iscsi.org, the website for the LIO target.


The following diagram shows how the Components work together. A more detailed version can be found here: Open-iSCSI modules

 | Targets & Sessions configuration Database (DBM based) |             
 +--------------------------+     +----------------------------------+ 
 | iscsiadm                 |     | iscsid: iSCSI daemon             | 
 |                          |     |                                  | 
 |  * Command line tool     |<--->|  * Implements Session management | 
 |  * Manages database of   |     |  * Communicates with iscsiadm    | 
 |    sessions and targets  |     |    and iscsi kernel modules      | 
 +--------------------------+     +---------------+------------------+ 
 User space                                       |                    
- - - - - - - - - - - - - - - - - - - - - - - - - | - - - - - - - - - -
 Kernel                                           v                    
         | kernel modules: scsi_transport_iscsi, iscsi_tcp, libiscsi | 

From the Open-iSCSI README:

Persistent configuration is implemented as a DBM database, which contains two tables:

  • Discovery table (/etc/iscsi/send_targets)
  • Node table (/etc/iscsi/nodes)



iscsid is managed by a systemd Unit.

Start open-iscsi.service using systemd.

Tango-view-refresh-red.pngThis article or section is out of date.Tango-view-refresh-red.png

Reason: The following advice about /etc/conf.d/open-iscsi might be out of date, see discussion page (Discuss in Talk:ISCSI initiator (简体中文)#)

You only have to include the IP of the target as SERVER in /etc/conf.d/open-iscsi at the client.


# iscsiadm -m discovery -t sendtargets -p <portalip>


# iscsiadm -m discovery -p <portalip> -o delete


# iscsiadm -m node -L all

or login to specific target

# iscsiadm -m node --targetname=<targetname> --login


# iscsiadm -m node -U all


For running session

# iscsiadm -m session -P 3

The last line of the above command will show the name of the attached dev e.g

Attached scsi disk sdd State: running

For the known nodes

# iscsiadm -m node


If the iscsi blockdevice contains a partitiontable, you will not be able to do an online resize. In this case you have to unmount the filesystem and alter the size of the affected partition.

  1. Rescan active nodes in current session
    # iscsiadm -m node -R
  2. If you use multipath, you also have to rescan multipath volume information.
    # multipathd -k"resize map sdx"
  3. Finally resize the filesystem.
    # resize2fs /dev/sdx


You can also check where the attached iSCSI devices are located in the /dev tree with ls -lh /dev/disk/by-path/* .

At the server (target) you might need to include the client iqn from /etc/iscsi/initiatorname.iscsi in the acl configuration.

Many of the iscsiadm operations require that the iSCSI daemon iscsid is running. To verify that this is the case, check the status of the open-iscsi.service.


  • iSCSI Boot Booting Arch Linux with / on an iSCSI target.