<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="fr">
	<id>http://mediawiki.monptisite.fr/index.php?action=history&amp;feed=atom&amp;title=DOCS%2FUNIX%2FRHEL%2FISCSI%2FConfig_iSCSI_Initiator</id>
	<title>DOCS/UNIX/RHEL/ISCSI/Config iSCSI Initiator - Historique des versions</title>
	<link rel="self" type="application/atom+xml" href="http://mediawiki.monptisite.fr/index.php?action=history&amp;feed=atom&amp;title=DOCS%2FUNIX%2FRHEL%2FISCSI%2FConfig_iSCSI_Initiator"/>
	<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator&amp;action=history"/>
	<updated>2026-11-02T11:57:51Z</updated>
	<subtitle>Historique des révisions pour cette page sur le wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator&amp;diff=470&amp;oldid=prev</id>
		<title>Admin : /* Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9 systems */</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator&amp;diff=470&amp;oldid=prev"/>
		<updated>2022-08-31T08:33:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9 systems&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;fr&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Version précédente&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Version du 31 août 2022 à 08:33&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l108&quot; &gt;Ligne 108 :&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Ligne 108 :&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  253        0   29143040 dm-0&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  253        0   29143040 dm-0&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  253        1    3358720 dm-1&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  253        1    3358720 dm-1&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;8       16    5242880 sdb&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;''&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    8       16    5242880 sdb&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    8       32   33554432 sdc&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;    8       32   33554432 sdc&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
	<entry>
		<id>http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator&amp;diff=469&amp;oldid=prev</id>
		<title>Admin : Page créée avec « {{MediaWiki}} {{FOND_BLEU|QEMU - '''Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9'''}}  = Sites Références =  Cet article est une transposition sous MediaWiki… »</title>
		<link rel="alternate" type="text/html" href="http://mediawiki.monptisite.fr/index.php?title=DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Initiator&amp;diff=469&amp;oldid=prev"/>
		<updated>2022-08-31T08:32:37Z</updated>

		<summary type="html">&lt;p&gt;Page créée avec « {{MediaWiki}} {{FOND_BLEU|QEMU - &amp;#039;&amp;#039;&amp;#039;Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9&amp;#039;&amp;#039;&amp;#039;}}  = Sites Références =  Cet article est une transposition sous MediaWiki… »&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nouvelle page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{MediaWiki}}&lt;br /&gt;
{{FOND_BLEU|QEMU - '''Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9'''}}&lt;br /&gt;
&lt;br /&gt;
= Sites Références =&lt;br /&gt;
&lt;br /&gt;
Cet article est une transposition sous MediaWiki de ces 2 adresses :&lt;br /&gt;
* [https://technixleo.com/configure-iscsi-target-on-centos-alma-rhel/ Configure iSCSI Target on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
* [https://technixleo.com/iscsi-initiator-centos-alma-rhel/ Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9]&lt;br /&gt;
&lt;br /&gt;
iSCSI is an acronym that stands for Internet Small Computer Systems Interface. It is a Storage Area Network (SAN) Protocol that enables block-level SCSI data transport from Storage arrays to client computers that are not directly connected to them. iSCSI SAN consists of iSCSI Initiators which are the clients and iSCSI targets which are the servers on Storage Array controllers. They are connected by an iSCSI protocol and represented by a unique string known as iSCSI Qualified Name (iQN).&lt;br /&gt;
&lt;br /&gt;
In iSCSI technology, the iSCSI initiator or commonly known as the iSCSI client needs to be installed on your system. It is then added to an initiator group or what is also known as the Client definition. These groups help identify which clients are allowed to connect with the storage server (the iSCSI targets). Logical Unit Numbers (LUNs) are created and assigned to a group or client definition. LUNs are representations of devices that are part of the physical iSCSI target. If the Client and server are on the same IP network, The initiator can automatically discover the target. Once connected, the LUN is available for use.&lt;br /&gt;
&lt;br /&gt;
=iSCSI Initiator=&lt;br /&gt;
&lt;br /&gt;
=Setup pre-reqs=&lt;br /&gt;
An IP of the Target needs to be known. I will use the iSCSI target from the  [[DOCS/UNIX/RHEL/ISCSI/Config_iSCSI_Target|Configure iSCSI target]] guide. You can also follow the steps in that guide to create a target.&lt;br /&gt;
&lt;br /&gt;
=Configure iSCSI Initiator on CentOS 9|AlmaLinux 9|RHEL 9 systems=&lt;br /&gt;
- Update your system packages.&lt;br /&gt;
 sudo yum update -y&lt;br /&gt;
or &lt;br /&gt;
 sudo dnf update -y&lt;br /&gt;
&lt;br /&gt;
- Install iSCSI initiator utilities with the following command.&lt;br /&gt;
 sudo dnf -y install iscsi-initiator-utils&lt;br /&gt;
&lt;br /&gt;
- Check the initiator name using the following command&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cat /etc/iscsi/initiatorname.iscsi&lt;br /&gt;
InitiatorName=iqn.1994-05.com.redhat:4e8ff68af729&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you changed the name while setting up iSCSI target ACLs. You will have to configure the initiator file to the new name.&lt;br /&gt;
 sudo vi /etc/iscsi/initiatorname.iscsi&lt;br /&gt;
&lt;br /&gt;
- Change the initiator’s name to match the one set on the target server.&lt;br /&gt;
 InitiatorName=iqn.1994-05.com.redhat:4e8ff68af729&lt;br /&gt;
&lt;br /&gt;
- Save and exit the file.&lt;br /&gt;
- [OPTIONAL] Edit the iSCSI configuration file to add the authentication details.&lt;br /&gt;
 sudo vi /etc/iscsi/iscsid.conf&lt;br /&gt;
- Uncomment the following lines and edit as shown.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
node.session.auth.authmethod = CHAP&lt;br /&gt;
node.session.auth.username = technix&lt;br /&gt;
node.session.auth.password = technix_passwd&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Save and exit the file, then start the iSCSI daemon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo systemctl start iscsid.service&lt;br /&gt;
sudo systemctl enable iscsid.service&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Discover the target by using the target’s IP address as shown below. The response will be the target’s IP address and iQN address.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m discovery -t st -p 192.168.200.40&lt;br /&gt;
192.168.200.40:3260,1 iqn.2022-06.com.redhat:technixleo&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Confirm its status after discovery.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m node -o show&lt;br /&gt;
&lt;br /&gt;
##Sample Outpout ##&lt;br /&gt;
# BEGIN RECORD 2.1.4&lt;br /&gt;
node.name = iqn.2022-06.com.redhat:technixleo&lt;br /&gt;
node.tpgt = 1&lt;br /&gt;
node.startup = automatic&lt;br /&gt;
node.leading_login = No&lt;br /&gt;
iface.iscsi_ifacename = default&lt;br /&gt;
.....&lt;br /&gt;
.....&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- You can log in to the server using the iQN&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m node -T iqn.2022-06.com.redhat:technixleo -l&lt;br /&gt;
Logging in to [iface: default, target: iqn.2022-06.com.redhat:technixleo, portal: 192.168.200.40,3260]&lt;br /&gt;
Login to [iface: default, target: iqn.2022-06.com.redhat:technixleo, portal: 192.168.200.40,3260] successful.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Confirm the established session.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m session -o show&lt;br /&gt;
tcp: [2] 192.168.200.40:3260,1 iqn.2022-06.com.redhat:technixleo (non-flash)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Confirm the partitions with the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ cat /proc/partitions&lt;br /&gt;
&lt;br /&gt;
major minor  #blocks  name&lt;br /&gt;
&lt;br /&gt;
   8        0   33554432 sda&lt;br /&gt;
   8        1    1048576 sda1&lt;br /&gt;
   8        2   32504832 sda2&lt;br /&gt;
  11        0    8519680 sr0&lt;br /&gt;
 253        0   29143040 dm-0&lt;br /&gt;
 253        1    3358720 dm-1&lt;br /&gt;
   ''8       16    5242880 sdb''&lt;br /&gt;
   8       32   33554432 sdc&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The new partition ‘sdb‘ of size 5GB has been added from the target server.&lt;br /&gt;
To find the iSCSI disk name you can also use the following command.&lt;br /&gt;
&lt;br /&gt;
 $ sudo grep &amp;quot;Attached SCSI&amp;quot; /var/log/messages&lt;br /&gt;
 Jul 30 10:30:02 cent9 kernel: sd 3:0:0:0: [sdb] Attached SCSI disk&lt;br /&gt;
&lt;br /&gt;
Next, we are going to create a file on that disk.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo mkfs.ext4 /dev/sdb&lt;br /&gt;
Creating filesystem with 1310720 4k blocks and 327680 inodes&lt;br /&gt;
Filesystem UUID: b0acbfbc-106d-41aa-9446-b26182841ac8&lt;br /&gt;
Superblock backups stored on blocks: &lt;br /&gt;
	32768, 98304, 163840, 229376, 294912, 819200, 884736&lt;br /&gt;
&lt;br /&gt;
Allocating group tables: done                            &lt;br /&gt;
Writing inode tables: done                            &lt;br /&gt;
Creating journal (16384 blocks): done&lt;br /&gt;
Writing superblocks and filesystem accounting information: done&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Mount the file system. This is done by first creating a directory to mount the file and then mounting the file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
sudo mkdir /mnt/iscsi&lt;br /&gt;
sudo mount /dev/sdb /mnt/iscsi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Verify the file system has been mounted:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ df -hT&lt;br /&gt;
Filesystem          Type      Size  Used Avail Use% Mounted on&lt;br /&gt;
devtmpfs            devtmpfs  4.0M     0  4.0M   0% /dev&lt;br /&gt;
tmpfs               tmpfs     3.8G     0  3.8G   0% /dev/shm&lt;br /&gt;
tmpfs               tmpfs     1.6G  9.2M  1.5G   1% /run&lt;br /&gt;
/dev/mapper/cs-root xfs        28G  4.6G   24G  17% /&lt;br /&gt;
/dev/sda1           xfs      1014M  466M  549M  46% /boot&lt;br /&gt;
tmpfs               tmpfs     769M   96K  768M   1% /run/user/1000&lt;br /&gt;
/dev/sr0            iso9660   8.2G  8.2G     0 100% /run/media/technixleo/CentOS-Stream-9-BaseOS-x86_64&lt;br /&gt;
/dev/sdb            ext4      4.9G   24K  4.6G   1% /mnt/iscsi&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Automount ISCSI storage=&lt;br /&gt;
&lt;br /&gt;
To make the file persistent even on boot, edit the fstab file. But first Identify the UUID of the ISCSI disk.&lt;br /&gt;
 $ sudo blkid /dev/sdb&lt;br /&gt;
 /dev/sdb: UUID=&amp;quot;b0acbfbc-106d-41aa-9446-b26182841ac8&amp;quot; BLOCK_SIZE=&amp;quot;4096&amp;quot; TYPE=&amp;quot;ext4&amp;quot;&lt;br /&gt;
&lt;br /&gt;
- Open the fstab file and add the UUID of the ISCSI disk.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo vi /etc/fstab&lt;br /&gt;
UUID=b0acbfbc-106d-41aa-9446-b26182841ac8 /mnt/iscsi      ext4         _netdev                      0 0&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
- Save and exit the file.&lt;br /&gt;
&lt;br /&gt;
You can verify the disk has been mounted.&lt;br /&gt;
 $ mount&lt;br /&gt;
 ....&lt;br /&gt;
 /dev/sdb on /mnt/iscsi type ext4 (rw,relatime,seclabel,stripe=2048)&lt;br /&gt;
&lt;br /&gt;
To unmount a disk&lt;br /&gt;
&lt;br /&gt;
 sudo umount /mnt/iscsi&lt;br /&gt;
&lt;br /&gt;
To log out of a session, use the following command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;shell&amp;quot;&amp;gt;&lt;br /&gt;
$ sudo iscsiadm -m node -T  iqn.2022-06.com.redhat:technixleo -u&lt;br /&gt;
Logging out of session [sid: 1, target: iqn.2022-06.com.redhat:technixleo, portal: 192.168.200.40,3260]&lt;br /&gt;
Logout of [sid: 1, target: iqn.2022-06.com.redhat:technixleo, portal: 192.168.200.40,3260] successful.&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
		
	</entry>
</feed>