Install Iscsi target on proxmox?

MaxP

New Member
Aug 31, 2010
21
0
1
Hello:

We have a recently installed proxmox cluster. The master has a 6 TB Raid 5 volume and I wish to share this volume trought iSCSI among the nodes, Is possible to install iscsi target in the master?, i mean, proxmox install custom kernel and the iscsi package and moldules (iscsi_trgt) are not copatible.

thanks in advance
best regards.
 
We have a recently installed proxmox cluster. The master has a 6 TB Raid 5 volume and I wish to share this volume trought iSCSI among the nodes, Is possible to install iscsi target in the master?, i mean, proxmox install custom kernel and the iscsi package and moldules (iscsi_trgt) are not copatible.

Really? What kernel do you use? Anyways, we usually use the SCST iSCSI target (which also support tapes) - packages 'scstadmin'
 
Hello.

the kernel 2.6.32-3-pve. how can i add a target LUN? we recently add 6TB in raid 5 and we want to create a iSCSI target for this /dev/cciss/c0d1: 6001.0 GB, 6001072168960 bytes

any ideas?

thanks in advance.
best regards
 
if iscsitarget couldnl't be easily installed,
i also need to know how to accomplish this with scstadmin.
 
@Tom
Sorry, please don't be irritated.
i'm just in a hurry to test all this before installing production servers.
 
I have built and installed the debian packages for the iscsitarget package. Below are the commands I used. I have not finished setting it up so can't confirm that it is operating correctly.

Code:
sudo -s

apt-get install devscripts quilt pve-headers-`uname -r`

mkdir -p ~/src/dkms
cd ~/src/dkms
dget http://backports.debian.org/debian-backports/pool/main/d/dkms/dkms_2.1.1.2-2~bpo50+1.dsc
dpkg-source -x dkms*.dsc
cd dkms*
dpkg-buildpackage -rfakeroot
dpkg -i ../*.deb
apt-get install -f

mkdir -p ~/src/iscsitarget
cd ~/src/iscsitarget
dget http://ftp.us.debian.org/debian/pool/main/i/iscsitarget/iscsitarget_1.4.20.2-1.dsc
dpkg-source -x iscsitarget*.dsc
cd iscsitarget*
dpkg-buildpackage -rfakeroot
dpkg -i ../*.deb
apt-get install -f
 
kimnzl, thank you for the reply!
i already tried to do this with iscsi-scst (scst is already installed) with success!:

Code:
# apt-get install iscsi-scst scstadmin
Then edit the SCST configuration file /etc/scst.conf to export a volume as a lun:

Code:
# Automatically generated by SCST Configurator v1.0.6.

[HANDLER tape_perf]
#DEVICE <H:C:I:L>

[HANDLER disk]
#DEVICE <H:C:I:L>

[HANDLER vdisk]
#DEVICE <vdisk name>,<device path>,<options>,<block size>
DEVICE volume1,/dev/LvmVolumeGroupName/LvmLogicalVolume1,NV_CACHE,512

[HANDLER vcdrom]
#DEVICE <vdisk name>,<device path>

[HANDLER disk_perf]
#DEVICE <H:C:I:L>

[HANDLER tape]
#DEVICE <H:C:I:L>

[GROUP Default]
#USER <user wwn>

[ASSIGNMENT Default]
#DEVICE <device name>,<lun>
#Allways begin with lun 0
DEVICE volume1,0

[TARGETS enable]
#HOST <wwn identifier>

[TARGETS disable]
#HOST <wwn identifier>
notice the [HANDLER vdisk] and [ASSIGNMENT Default] sections!

also edit /etc/initiators.allow to allow a client or network to connect to the target.
(see /etc/iscsi-scstd.conf for targetname)

after that just reload the new config:
Code:
/etc/init.d/scst reload
or
Code:
/etc/init.d/scst force-reload
check the DEVICEs with:
Code:
cat /proc/scsi_tgt/scsi_tgt
i just have one issue on all this; after a resize (lvresize) of the exported DEVICE you have to notify scst the new size:

Code:
# echo "resync_size NAME_OF_YOUR_DEVICE" >/proc/scsi_tgt/vdisk/vdisk
but it couln't write to it and just hang till i aborted it with ctrl-c.
eventually i just rebooted the server and the new size is then applied.

Alvin.
 
Hi Alvin,

could you give me an example how to do this with a device like /dev/sda ?!

thank you in advance

kind regards,
 
Hi Alvin,

could you give me an example how to do this with a device like /dev/sda ?!

thank you in advance

kind regards,

just replace "/dev/LvmVolumeGroupName/LvmLogicalVolume1" with "/dev/sda" or whatever unused disk/partition
 
oh i see,

i thought have to put this under

[HANDLER disk]
#DEVICE <H:C:I:L>


But if it is that easy, even better. Thank you very much.
 
I think i need some more help here :)

My scsi_tgt gives me the following

/etc/acpi# cat /proc/scsi_tgt/scsi_tgt | grep disk
0:0:0:0 dev_disk
1:0:0:0 dev_disk
2:0:0:0 dev_disk
3:0:0:0 dev_disk
6:0:0:0 dev_disk

my /etc/scst.conf looks like that

[HANDLER disk]
#DEVICE <H:C:I:L>
#DEVICE 0:0:0:0
DEVICE 1:0:0:0
#DEVICE 2:0:0:0
#DEVICE 3:0:0:0

[ASSIGNMENT Default]
#DEVICE <device name>,<lun>
#DEVICE 0:0:0:0,0
DEVICE 1:0:0:0,0
#DEVICE 2:0:0:0,0
#DEVICE 3:0:0:0,0

When i reload /etc/init.d/scst everything fine with the config beeing as it is above. I can then connect to the iscsi device and get one of the hdd.

My problem is, when i uncomment only one of the other DEVICES in the scst.conf i get the following error

/etc/init.d/scst force-reload
Reloading SCST configurationStopping the mid-level SCSI target SCSTERROR: Module scst is in use by iscsi_scst
FAILED failed!
Loading and configuring the mid-level SCSI target SCST failed!


Could someone tell me what i am doing wrong? Plus what i would like to know is, how can i find out which of the

0:0:0:0 dev_disk
1:0:0:0 dev_disk
2:0:0:0 dev_disk
3:0:0:0 dev_disk
6:0:0:0 dev_disk

is sda,sdb,sdc ect.

edit: btw 1:0:0:0 is sdb1 on the prox host

Thank you very much in adcance for any assistance.

Kind regards,

Robert
 
Last edited:
does someone can help me out with my question above?

thanks in advance

kind regards,

Robert
 

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!