Configuring Proxmox VE 4 as an iSCSI target

TechMonkey

Renowned Member
Nov 12, 2015
1
0
66
Hello all, first post here, so if I'm missing a key piece of documentation or post that I missed, I'll be happy to read it. (I'm just using it on a single host for a test/learning at home, and as a chance to jump into ZFS as well. )

Proxmox VE 4 latest (4.2.2-1-pve), using ZFS for local.

I was trying to present one of the ZFS Volumes as an iSCSI target for another client to access, but that part is probably irrelevant at the moment. (To be clear, I'm NOT using iSCSI initiator on the proxmox host, I'm trying to install/configure the iSCSI target on the host.) Right now just trying to share a simple folder. (e.g. /storage/DirIWantToShare)

For Proxmox specifically, one thread* is the only thing I found that seems relevant. I've found several various threads for issues w/ the "iscsitarget" package on Debian, but nothing I can quite make work.

I've managed to get the iSCSI dkms part installed (by adding the No-Sub repo), I've tried using tgt instead, and I've tried compiling scst as well.) Anyone been able to get any of these working? If someone wants to work with me on this, I'll be happy to get to a clean state and give more details.

*I don't have link posting privs yet, thread is serverfault.com/questions/557013/basic-iscsi-target-setup-on-proxmox-ve-debian-7-not-working
 
Hello all, first post here, so if I'm missing a key piece of documentation or post that I missed, I'll be happy to read it. (I'm just using it on a single host for a test/learning at home, and as a chance to jump into ZFS as well. )

Proxmox VE 4 latest (4.2.2-1-pve), using ZFS for local.

I was trying to present one of the ZFS Volumes as an iSCSI target for another client to access, but that part is probably irrelevant at the moment. (To be clear, I'm NOT using iSCSI initiator on the proxmox host, I'm trying to install/configure the iSCSI target on the host.) Right now just trying to share a simple folder. (e.g. /storage/DirIWantToShare)

For Proxmox specifically, one thread* is the only thing I found that seems relevant. I've found several various threads for issues w/ the "iscsitarget" package on Debian, but nothing I can quite make work.

I've managed to get the iSCSI dkms part installed (by adding the No-Sub repo), I've tried using tgt instead, and I've tried compiling scst as well.) Anyone been able to get any of these working? If someone wants to work with me on this, I'll be happy to get to a clean state and give more details.

*I don't have link posting privs yet, thread is serverfault.com/questions/557013/basic-iscsi-target-setup-on-proxmox-ve-debian-7-not-working
i actually have success compile scst on pve and my gold is using srpt... but I believe iscsi is easier than srpt.... I used an order svn version of scst 6187 (current is 66xx) due to later version uses ofed 3.0 whereas intree kernel uses 2.4 only.

Sent from my Nexus 6 using Tapatalk
 
Is there any solution to get iscsitarget-dkms get working with an actual kernel (4.2.8)

I would like to have the same same solution as the initial poster.
 
On this (SCST) page i saw that proxmox has some sort of connection for the framework so i was hoping to apt-get install it.

To compile it yourself you need a subscription on proxmox?

Would be nice to see this in the default distribution-set (with those FC binaries)
 
I've installed tgt and it works like a charm.
My VMs have iSCSI targets as harddiscs and it works.

No iscsitarget, just tgt.


Solved for me
 
My personal favorite is LIO via targetcli. You can clone configshell, rtslib, and targetcli from https://github.com/Datera/ and run `# touch debian/changelog && make deb && dpkg -i dist/*.deb` in them then use the targetcli tool.
 
Maybe, I haven't compared them in such detail myself directly. But with the information from this thread & the wiki people should be able to test them both and decide for themselves :)
 
Hi guys, wanna raise the topic.
Recently we've bought a server for testing and backup purposes, it was planned to use it as storage only, but after reviewing hw specs we decided to install PM on it and use as a emergency node in the cluster.
Sure we wanted HA enabled and use ZFS as a primary fs we thought of using iscsi, but default iscsitarget is not compiling on pve kernel I built scst deb's and successfully installed them.
That was a story, now a question:
on iSCSI target i have:
NAME USED AVAIL REFER MOUNTPOINT
VMDATA/iscsi 2.06T 20.1T 146K -
HANDLER vdisk_blockio {
DEVICE disk1 {
filename /dev/zvol/VMDATA/iscsi
nv_cache 1
}
}

TARGET_DRIVER iscsi {
enabled 1
TARGET iqn.2017-06.au.net.test:tgt1 {
LUN 0 disk1
enabled 1
}
}
# lsscsi
[8:0:0:0] disk SCST_BIO disk1 311 /dev/sdc

Target: iqn.2017-06.au.net.test:tgt1 (non-flash)
Current Portal: 192.168.153.6:3260,1
Persistent Portal: 192.168.153.6:3260,1
**********
Interface:
**********
Iface Name: default
Iface Transport: tcp
Iface Initiatorname: iqn.1993-08.org.debian:01:e8132c63
Iface IPaddress: 192.168.153.100
Iface HWaddress: <empty>
Iface Netdev: <empty>
SID: 1
iSCSI Connection State: LOGGED IN
iSCSI Session State: LOGGED_IN
Internal iscsid Session State: NO CHANGE
# pvesm status - shows my iscsi zvol
ZoI zfs 1 23770759263 2215121152 21555638111 9.82%

But I can't do anything with it, web interface shows "communication failure (0)"
and logs give:
Jun 13 19:47:54 backup-bne2 kernel: [ 808.246144] scsi host11: iSCSI Initiator over TCP/IP
Jun 13 19:47:54 backup-bne2 kernel: [ 808.258340] scst: Using security group "iqn.2017-06.au.net.test:tgt1" for initiator "iqn.1993-08.org.debian:01:70331f3f109f" (target iqn.2017-06.au.net.test:tgt1)
Jun 13 19:47:54 backup-bne2 kernel: [ 808.258797] iscsi-scst: Negotiated parameters: InitialR2T No, ImmediateData Yes, MaxConnections 1, MaxRecvDataSegmentLength 1048576, MaxXmitDataSegmentLength 262144,
Jun 13 19:47:54 backup-bne2 kernel: [ 808.258803] iscsi-scst: MaxBurstLength 1048576, FirstBurstLength 65536, DefaultTime2Wait 0, DefaultTime2Retain 0,
Jun 13 19:47:54 backup-bne2 kernel: [ 808.258806] iscsi-scst: MaxOutstandingR2T 1, DataPDUInOrder Yes, DataSequenceInOrder Yes, ErrorRecoveryLevel 0,
Jun 13 19:47:54 backup-bne2 kernel: [ 808.258809] iscsi-scst: HeaderDigest None, DataDigest None, OFMarker No, IFMarker No, OFMarkInt 2048, IFMarkInt 2048, RDMAExtensions No
Jun 13 19:47:54 backup-bne2 kernel: [ 808.258812] iscsi-scst: Target parameters set for session 40000043d0200: QueuedCommands 32, Response timeout 90, Nop-In interval 30, Nop-In timeout 30
Jun 13 19:47:54 backup-bne2 kernel: [ 808.510909] scsi 11:0:0:0: Direct-Access SCST_BIO disk1 311 PQ: 0 ANSI: 6
Jun 13 19:47:54 backup-bne2 kernel: [ 808.512187] sd 11:0:0:0: Attached scsi generic sg15 type 0
Jun 13 19:47:54 backup-bne2 kernel: [ 808.512203] scst: Attached to scsi11, channel 0, id 0, lun 0, type 0
Jun 13 19:47:54 backup-bne2 kernel: [ 808.513018] sd 11:0:0:0: [sdo] 4294967296 512-byte logical blocks: (2.20 TB/2.00 TiB)
Jun 13 19:47:54 backup-bne2 kernel: [ 808.513022] sd 11:0:0:0: [sdo] 8192-byte physical blocks
Jun 13 19:47:54 backup-bne2 kernel: [ 808.514226] sd 11:0:0:0: [sdo] Write Protect is off
Jun 13 19:47:54 backup-bne2 kernel: [ 808.514496] sd 11:0:0:0: [sdo] Write cache: disabled, read cache: enabled, supports DPO and FUA
Jun 13 19:47:54 backup-bne2 kernel: [ 808.517939] sd 11:0:0:0: [sdo] Attached SCSI disk

Please give me a hint, maybe I missed so me step.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!