<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Install and Configure iSCSI Initiator Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/install-and-configure-iscsi-initiator/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 21 Jun 2018 20:42:31 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Install  and Configure iSCSI Initiator</title>
		<link>https://www.osradar.com/install-and-configure-iscsi-initiator/</link>
					<comments>https://www.osradar.com/install-and-configure-iscsi-initiator/#comments</comments>
		
		<dc:creator><![CDATA[Mel]]></dc:creator>
		<pubDate>Thu, 03 May 2018 12:59:36 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Install and Configure iSCSI Initiator]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=2869</guid>

					<description><![CDATA[<p>After installing  the Target  Iscsci disk on the server A, we need to use it from Server B . Please  note :this installation  was  executed on my own test lap  based on Vmware machines . Now we will explain how to add the target disk to our local server. &#160; You can consult this line  to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-and-configure-iscsi-initiator/">Install  and Configure iSCSI Initiator</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>After installing  the Target  Iscsci disk on the server A, we need to use it from Server B .</p>
<p>Please  note :this installation  was  executed on my own test lap  based on Vmware machines . Now we will explain how to add the target disk to our local server.</p>
<p>&nbsp;</p>
<p>You can consult this line  to see how we  did the installation of  target iSCSI server</p>
<h1 class="entry-title"><a href="https://www.osradar.com/how-to-configure-storage-server-with-iscsi-in-redhat-and-centos-7/">How to Configure Storage Server with iSCSI in Redhat and Centos 7</a></h1>
<p>&nbsp;</p>
<p>Info  :</p>
<p>Target  ISCSI Server   =   centos7a</p>
<p>The Actual Server       =  centos7b</p>
<p>Before  to  start  Please  install   the  iscsi initiator utils</p>
<pre class="color1">yum -y install iscsi-initiator-utils</pre>
<p>Enable  and  start  Iscsid services</p>
<pre>systemctl  enable iscsid
systemctl start iscsid</pre>
<p>Show My  disks</p>
<pre>[root@centos7b ~]# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000bfc92
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 2099199 1048576 83 Linux
/dev/sda2 2099200 41943039 19921920 8e Linux LVM
Disk /dev/mapper/centos-root: 18.2 GB, 18249416704 bytes, 35643392 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes</pre>
<p>&nbsp;</p>
<p>the  Status  on the Target Server  :</p>
<p><img loading="lazy" class="alignnone size-full wp-image-2871" src="https://www.osradar.com/wp-content/uploads/2018/05/targetiscsi.png" alt="" width="1167" height="551" srcset="https://www.osradar.com/wp-content/uploads/2018/05/targetiscsi.png 1167w, https://www.osradar.com/wp-content/uploads/2018/05/targetiscsi-300x142.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/targetiscsi-768x363.png 768w, https://www.osradar.com/wp-content/uploads/2018/05/targetiscsi-1024x483.png 1024w, https://www.osradar.com/wp-content/uploads/2018/05/targetiscsi-696x329.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/targetiscsi-1068x504.png 1068w, https://www.osradar.com/wp-content/uploads/2018/05/targetiscsi-890x420.png 890w" sizes="(max-width: 1167px) 100vw, 1167px" /></p>
<p>We have to use the ACL rule to be able to  login and use the disk on target  server</p>
<p>Please  add the ACL  initiator name  to /etc/iscsi/initiatorname.iscsi  .</p>
<pre class="block">[root@centos7b ~]# vi /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.2018-04.org.osradar.com.centos7.share</pre>
<div> Check  if the  Port is opened on Target Server</div>
<pre>[root@centos7b ~]# telnet centos7a 3260
Trying 192.168.65.131...
Connected to centos7a.
Escape character is '^]'.</pre>
<div><strong> Discover the target</strong></div>
<div></div>
<pre>[root@centos7b ~]# iscsiadm --mode discoverydb --type sendtargets --portal centos7a --discover
192.168.65.131:3260,1 iqn.2016-02.osradar.com
[root@centos7b ~]#</pre>
<div>Please  remember the iqn name</div>
<div></div>
<div><strong> Login to the Target.</strong></div>
<div><img loading="lazy" class="alignnone size-full wp-image-2878" src="https://www.osradar.com/wp-content/uploads/2018/05/target2.png" alt="" width="1107" height="148" srcset="https://www.osradar.com/wp-content/uploads/2018/05/target2.png 1107w, https://www.osradar.com/wp-content/uploads/2018/05/target2-300x40.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/target2-768x103.png 768w, https://www.osradar.com/wp-content/uploads/2018/05/target2-1024x137.png 1024w, https://www.osradar.com/wp-content/uploads/2018/05/target2-696x93.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/target2-1068x143.png 1068w" sizes="(max-width: 1107px) 100vw, 1107px" /></div>
<div> We are logged in..  nice!</div>
<div></div>
<div><strong>Show  my disks   Now  </strong></div>
<div></div>
<div> <img loading="lazy" class="alignnone size-full wp-image-2881" src="https://www.osradar.com/wp-content/uploads/2018/05/disk2.png" alt="" width="943" height="751" srcset="https://www.osradar.com/wp-content/uploads/2018/05/disk2.png 943w, https://www.osradar.com/wp-content/uploads/2018/05/disk2-300x239.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/disk2-768x612.png 768w, https://www.osradar.com/wp-content/uploads/2018/05/disk2-696x554.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/disk2-527x420.png 527w" sizes="(max-width: 943px) 100vw, 943px" /></div>
<div><strong> you  can format the disk and use it for mount partition  /data  </strong></div>
<div></div>
<div>fdisk /dev/sdb and create primary partition  /dev/sdb1</div>
<div></div>
<div>
<pre>[root@centos7b ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).

Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.

Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x087d615e.

Command (m for help): n
Partition type:
 p primary (0 primary, 0 extended, 4 free)
 e extended
Select (default p): p
Partition number (1-4, default 1): 
First sector (8192-8388607, default 8192): 
Using default value 8192
Last sector, +sectors or +size{K,M,G} (8192-8388607, default 8388607): 
Using default value 8388607
Partition 1 of type Linux and of size 4 GiB is set

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
[root@centos7b ~]#</pre>
<p>new device has  been created</p>
<p><img loading="lazy" class="alignnone size-full wp-image-2883" src="https://www.osradar.com/wp-content/uploads/2018/05/diskb.png" alt="" width="744" height="219" srcset="https://www.osradar.com/wp-content/uploads/2018/05/diskb.png 744w, https://www.osradar.com/wp-content/uploads/2018/05/diskb-300x88.png 300w, https://www.osradar.com/wp-content/uploads/2018/05/diskb-696x205.png 696w, https://www.osradar.com/wp-content/uploads/2018/05/diskb-741x219.png 741w" sizes="(max-width: 744px) 100vw, 744px" /></p>
<p>Format the Disk and create ext4 disk</p>
<pre>[root@centos7b ~]# mkfs.ext4 /dev/sdb1 
mke2fs 1.42.9 (28-Dec-2013)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=1024 blocks
262144 inodes, 1047552 blocks
52377 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1073741824
32 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
 32768, 98304, 163840, 229376, 294912, 819200, 884736

Allocating group tables: done 
Writing inode tables: done 
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

[root@centos7b ~]#</pre>
<p><strong>Create directory /data  and mount  the disk to  this folder</strong></p>
<pre>[root@centos7b ~]# mkdir /data 
[root@centos7b ~]# mount /dev/sdb1 /data
[root@centos7b ~]# df -h 
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 17G 5.5G 12G 33% /
devtmpfs 477M 0 477M 0% /dev
tmpfs 488M 0 488M 0% /dev/shm
tmpfs 488M 6.8M 481M 2% /run
tmpfs 488M 0 488M 0% /sys/fs/cgroup
/dev/sda1 1014M 153M 862M 16% /boot
192.168.65.131:/nfs 17G 5.9G 12G 35% /nfsshare
tmpfs 98M 0 98M 0% /run/user/0
/dev/sdb1 3.9G 16M 3.7G 1% /data
[root@centos7b ~]#</pre>
</div>
<p>&nbsp;</p>
<p>To Mount this disk permanently please add this  line to  /etc/fstab</p>
<pre>/dev/sdb1 /data ext4 _netdev,defaults 0 0</pre>
<div> Reboot your System and Check  if the disk is mounted  automatically.</div>
<div>Enjoy</div>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-and-configure-iscsi-initiator/">Install  and Configure iSCSI Initiator</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-and-configure-iscsi-initiator/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
