Configure iSCSI Target on Centos 7 & Initiator on Windows Server 2016

Configure iSCSI Target on Centos 7 & Initiator on Windows Server 2016

in this post i configure iSCSI target on CentOS 7 and iSCSI initiator on Windows Server 2016, both are VMs on VMware vSphere 6.7 in my demolab, config:

Environment

iSCSI target

  • Centos 7 minimal
  • 2 vCPU
  • 2 GB RAM
  • 20 GB HDD0 – OS
  • 500 GB HDD1 – DATA (used for iSCSI target)
  • 2 NIC
    • 1 x VMXNET3 – mng – ens192 – 192.168.168.111
    • 1 x VMXNET3 – iSCSI network – ens224 – 192.168.168.130

iSCSI client

  • Windows Server 2016
  • 4 vCPU
  • 8 GB RAM
  • 60 GB HHD0 – OS
  • 2 NIC
    • 1 x VMXNET3 – mng – 192.168.168.112
    • 1 x VMXNET3 – iSCSI network – 192.168.168.131

Configure storage 

you can see that my system has a 500 GB disk (/dev/sdb), i will create a 480 GB partition with LVM

use fdisk for create a new partition

  • n – new partititon
  • p – primary
  • 1 – partition number
  • +450G – create 450 GB partition
  • t – select partition
  • 8e – change it as LVM label
  • w – save

create a LVM – in my case /dev/sdb1

Configure iSCSI target

first of all install targetcli package

i use my existing logical volume /dev/vg_iscsi/lv_iscsi for storage object iscsi_disk1 as a block-type backing store

create a target, in default config the target listening on all IPs… 0.0.0.0:3260, but i have separated network 192.168.130.x.

delete 0.0.0.0 3260 target and create 192.168.130.130 target

create ACL for my client machine (WS2016) with IQN: „iqn.1991-05.com.microsoft:vm-udp

create a LUN under target and map it on my client

verify the target server configuration

save config and exit targetcli console

enable & restart target.service

config firewall for iSCSI traffic

Configure iSCSI client (WS2016)

on WS2016 run iSCSI configuration and as target use ip of iSCSI target – 192.168.168.130 and click to quick connect.

Sucessfully connected.

(Visited 88 times, 1 visits today)

Napsat komentář

Vaše emailová adresa nebude zveřejněna. Vyžadované informace jsou označeny *