In computing, ISCSI  is an acronym for Internet Small Computer Systems Interface, an Internet Protocol (IP)-based storage networking standard for linking data storage facilities. It provides block-level access to storage devices by carrying SCSI commands over a TCP/IP network.

What is iSCSI Target and LUN?

In SCSI terminology, A LUN (logical unit number) represents an individually addressable (logical) SCSI device that is part of a physical SCSI device (called “Target”). An iSCSI environment emulates the connection to a SCSI hard disk. An iSCSI Target is like a connection interface, and LUNs are essentially numbered disk drives. When an iSCSI Target is connected by an iSCSI initiator (a client), all the LUNs mapped to the iSCSI Target are virtually attached to the client’s operation system. Therefore, Initiators can establish and manage file systems on iSCSI LUNs, as they would a raw SCSI or IDE hard drive.

Setup ISCSI:

Question Paper


  • Configure system1 to provide an iscsi disk device name iqn.2015-
    09.com.example:serverX.iscsi
  • The iscsi service uses port 3260
  • This target usasge 3G backing logical volume name myvol mylv
  • The target is only available to system2.groupx.example.com only

ON Server Side

  • YUM CMD use kar Target Package Install kar lena hai aur Service Restart karna hai.
# yum -y install target*
# systemctl restart target
# systemctl enable target
# firewall-cmd --permanent --add-port=3260/tcp
# firewall-cmd --complete-reload
  • Ab ek Partition Create karna hai 4GB ka type LVM karna hai.
# fdisk /dev/vdb
n---------------for NEW
p---------------for Primary
First sector ------------Enter karna hai
Last Sector--------------+4G------------Enter
Press't'and type '8e'
then press 'w'
# partprobe /dev/vdb
# pvcreate /dev/vdb1
# vgcreate myvol /dev/vdb1
# lvcreate -L 3G -n mylv myvol
# targetcli
  • Then run the command (scripts) of iscsi.
/> backstores/block create server0.iscsi /dev/myvol/mylv
/> iscsi create iqn.2015-09.com.example:server0.iscsi
/> iscsi/iqn.2015-09.com.example:server0.iscsi/tpg1/acls create iqn.2015-09.com.example:desktop0.iscsi
/> iscsi/iqn.2015-09.com.example:server0.iscsi/tpg1/luns create /backstores/block/server0.iscsi
/> iscsi/iqn.2015-09.com.example:server0.iscsi/tpg1/portals create 172.25.0.11
/> ls
/> saveconfig
/> exit
  • Ab Service Restart karna hai.
# systemctl restart target
# systemctl enable target
Setup ISCSI initiator.

Question Paper


  • Configure system2 so that it connects to the iqn.2015-
    09.com.example:DesktopX.iscsi as follows
  • The iscsi device should automaticaly be available on system boot
  • The iscsi block device contains a 2100MB partition that is
    formated as xfs
  • The partition is mounted to /mnt/data and is automatically
    mounted to this directory

ON Desktop side

  • Package Install kar lena hai.
# yum -y install iscsi-initiator-utils.i686
# vim /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.2015-09.com.example:desktopX.iscsi
  • Restart service .
# systemctl restart iscsid
# systemctl enable iscsid
# iscsiadm -m discovery -t st -p 172.25.0.11:3260
# iscsiadm -m discovery -t st -p 172.25.0.11:3260 -l
  • Create a New partition .
# fdisk /dev/vdb
n-------------new
p-------------primary
First sector -----------Enter
Last Sector--------+2100M-------------Enter
Press 'w'
# partprobe /dev/vdb
# mkfs.xfs /dev/vdb1
# mkdir /mnt/data
# blkid 
Then copy the UUID of newly created partition
# vim /etc/fstab
UUID=xxxxxxxx        /mnt/data       xfs        _netdev         0       0
# mount -a
# df -h
# iscsiadm -m session -u
(if a message of logging out will appears then your work is completed )

Dosto Yha mene apko bataya ki ISCSI kya hota hai aur ise kaise configure karte hai and yha par apko sabhi cmd properly step by step di hai aur agar apko phir bhi ise karne me koi problem aa rhi hai to aap PDF download kar smjh skte hai. PDF download karne ke liye neeche link par click kare.

 

I hope apko ye post pasand ayi hogi. aur agar pasand ayi hai to please apne Friends jo ki RHCE Exam ki preparation kar rhe hai unhe jrur share kare kyunki ye Question unke Jrur kam ayinge.

Thank You

LEAVE A REPLY

Please enter your comment!
Please enter your name here