iSCSI Target in Ubuntu 16.04LTS with multipath as datastore for VMware

Create disk:

mkdir /iscsi_disks
dd if=/dev/zero of=/iscsi_disks/disk01.img count=0 bs=1 seek=1.8T

configure 2 network interfaces for multipath

nano /etc/network/interfaces

auto ens10f0
iface ens10f0 inet static
        address 10.17.0.10
        netmask 255.255.0.0
        network 10.17.0.0
        broadcast 10.17.255.255
        gateway 10.17.255.254
        dns-nameservers 8.8.8.8

auto ens10f1
iface ens10f1 inet static
        address 10.17.0.20
        netmask 255.255.0.0
        network 10.17.0.0
        broadcast 10.17.255.255
        gateway 10.17.255.254
        dns-nameservers 8.8.8.8

Set the reverse path in loose mode:
nano /etc/sysctl.conf

        net.ipv4.conf.default.rp_filter=2
        net.ipv4.conf.all.rp_filter=2

Enable iscsitarget

nano /etc/iscsitarget

        ISCSITARGET_ENABLE=true

Define Lun:
 
nano /etc/iet/ietd.conf

        Target iqn.1017-07.spsk2-szczecin.szpital.dl370:disk01
        Lun 0 Path=/iscsi_disks/hp-dl370-disk01.img,Type=fileio
        Alias LUN1

nano /etc/iet/initiators.allow

        ALL ALL

nano /etc/iet/targets.allow

        ALL ALL

systemctl restart iscsitarget
service iscsitarget status
should be no errors here

ietadm --op show --tid=1

should be:

        Wthreads=8
        Type=0
        QueuedCommands=32
        NOPInterval=0
        NOPTimeout=0

Komentarze

Popularne posty z tego bloga

PROXMOX & GlusterFS - HA Cluster with shared redundant storage

Site 2 Site tunnel with multiple identical subnets on remote sites - without virtual hosts ( Route Based VPN )

DRBD 8.4 on Debian Jessie