Setup iSCSI On CentOS7
Setup iSCSI On CentOS7
Setup iSCSI On CentOS7
Server: 10.1.2.192
#####Attach new disk and create LVM ########
+-------------------------------------------------------------------------------
pvcreate /dev/xvdb
mkfs.ext4 /dev/VG01/lv01
-------------------------------------------------------------------------------------------+
+------------------------------------------------------------------------------------------+
/> cd backstores/block
#### Create TPG (Target Portal Group) was created along with the default portal (a pair
consisting of an IP address and a port which is the way initiators can reach the target) listening
on port 3260 of all IP addresses.
+------------------------------------------------------------------------------------------+
/backstores/block> cd /iscsi
+------------------------------------------------------------------------------------------+
####If you want to bind your portal to a specific IP (the Target’s main IP, for example), delete
the default portal and create a new one as follows (otherwise, skip the following targetcli
commands. ####3
## OPTIONAL ##
+------------------------------------------------------------------------------------------+
/> cd /iscsi/iqn.2019-01.192.2.1.10:disk2/tpg1/portals/
RC-TOG-03
+------------------------------------------------------------------------------------------+
### LUN is a logical unit of storage. It is a volume that is accessed as a block device ####
+------------------------------------------------------------------------------------------+
# Create LUN
/> cd /iscsi/iqn.2019-01.192.2.1.10:disk2/tpg1/
/iscsi/iqn.2019-01.192.2.1.10:disk2/tpg1/> luns/ create /backstores/block/iscsi-disk
+------------------------------------------------------------------------------------------+
/iscsi/iqn.2019-01.192.2.1.10:disk2/tpg1/> cd /
/> saveconfig
/> exit
## Add ACL rule here which you define in previous steps while configuring server ###
Create New Simple Volume and then click Next Next Next to create Partition
RC-TOG-03
## Add ACL rule here which you define in previous steps while configuring server ###
[root@vps ~]# vi /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.2019-01.192.2.1.10:client
[792198.990964] sd 4:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
[792199.005153] sda: sda1
[792199.007068] sd 4:0:0:0: [sda] Attached SCSI disk