Problems with iSCSI, see no luns when I want to create a LVM group

mobit4711

New Member
Jan 14, 2010
7
0
1
Hello,

first: Proxmox VE is a really great!!

but i have a problem with iscsi. I add an iscsi target an tried to add an LVM-Group on that like discriped in
http://pve.proxmox.com/wiki/Storage_Model#Use_iSCSI_LUN_for_LVM_base
but i see no Luns in "Base Volume".

here my ietd.conf:

Code:
 Example iscsi target configuration
#
# Everything until the first target definition belongs
# to the global configuration.
# Right now this is only the user configuration used
# during discovery sessions. "IncomingUser" specifies credentials the
# initiator has to provide - several of these are supported. If mutual
# CHAP shall be employed, "OutgoingUser" specifies the user/pass
# combination the target will provide - only one is supported.
# Leave them alone (keep them commented out) if you don't want to use
# authentication for discovery sessions.

#iSNSServer 192.168.1.16
#iSNSAccessControl No

#IncomingUser joe secret
#OutgoingUser jack 12charsecret

# Targets definitions start with "Target" and the target name.
# The target name must be a globally unique name, the iSCSI
# standard defines the "iSCSI Qualified Name" as follows:
#
# iqn.yyyy-mm.<reversed domain name>[:identifier]
#
# "yyyy-mm" is the date at which the domain is valid and the identifier
# is freely selectable. For further details please check the iSCSI spec.

Target iqn.2002-05.de.xplace:storage.iscsi1.vm1
    # Users, who can access this target. The same rules as for discovery
    # users apply here.
    # Leave them alone if you don't want to use authentication.
    #IncomingUser joe secret
    #OutgoingUser jim 12charpasswd
    # Logical Unit definition
    # You must define one logical unit at least.
    # Block devices, regular files, LVM, and RAID can be offered
    # to the initiators as a block device.
    Lun 1 Path=/dev/sdb,Type=blockio
    # Alias name for this target
     Alias Test
    # various iSCSI parameters
    # (not all are used right now, see also iSCSI spec for details)
    #MaxConnections        1
    #InitialR2T        Yes
    #ImmediateData        No
    #MaxRecvDataSegmentLength 8192
    #MaxXmitDataSegmentLength 8192
    #MaxBurstLength        262144
    #FirstBurstLength    65536
    #DefaultTime2Wait    2
    #DefaultTime2Retain    20
    #MaxOutstandingR2T    8
    #DataPDUInOrder        Yes
    #DataSequenceInOrder    Yes
    #ErrorRecoveryLevel    0
    #HeaderDigest        CRC32C,None
    #DataDigest        CRC32C,None
    # various target parameters
    #Wthreads        8
everything else i configured with proxmox ve
 
are you sure you're really connected to the target

try :
Code:
# iscsiadm -m node
You should see the target you've defined
Code:
neptune2:/etc# iscsiadm -m node
10.10.0.1:3260,1 iqn.2000-08.com.datacore:andromede1-applications

With
Code:
# iscsiadm -m session

If you're logged in you should see something like
Code:
neptune2:/etc# iscsiadm -m session 
tcp: [1] 10.10.0.1:3260,1 iqn.2000-08.com.datacore:andromede1-applications
If you see nothing try :
Code:
# iscsiadm -m node -L all
You can list your disks via the lsscsi command
If you don't have it :
# aptitude intall lsscsi

or with dmesg
 
here is the output:

Code:
proxmox-1:~# iscsiadm -m node
172.18.1.200:3260,1 iqn.2002-05.de.xplace:storage.iscsi1.vm1

proxmox-1:~# iscsiadm -m session
tcp: [1] 172.18.1.200:3260,1 iqn.2002-05.de.xplace:storage.iscsi1.vm1

proxmox-1:~# iscsiadm -m node -L all
Logging in to [iface: default, target: iqn.2002-05.de.xplace:storage.iscsi1.vm1, portal: 172.18.1.200,3260]
iscsiadm: Could not login to [iface: default, target: iqn.2002-05.de.xplace:storage.iscsi1.vm1, portal: 172.18.1.200,3260]: 
iscsiadm: initiator reported error (15 - already exists)
iscsiadm: Could not log into all portals. Err 15.

proxmox-1:~# lsscsi
[0:0:0:0]    disk    ATA      ST3160815AS      4.AD  /dev/sda
[0:0:1:0]    cd/dvd  HL-DT-ST DVD-ROM DH20N    A102  /dev/sr0
[1:0:0:0]    disk    ATA      ST3160815AS      4.AD  /dev/sdb
[2:0:0:0]    disk    IET      VIRTUAL-DISK     0     /dev/sdc
[2:0:0:1]    disk    IET      VIRTUAL-DISK     0     /dev/sdd

proxmox-1:~# lsscsi -l
[0:0:0:0]    disk    ATA      ST3160815AS      4.AD  /dev/sda
  state=running queue_depth=1 scsi_level=6 type=0 device_blocked=0 timeout=30
[0:0:1:0]    cd/dvd  HL-DT-ST DVD-ROM DH20N    A102  /dev/sr0
  state=running queue_depth=1 scsi_level=6 type=5 device_blocked=0 timeout=30
[1:0:0:0]    disk    ATA      ST3160815AS      4.AD  /dev/sdb
  state=running queue_depth=1 scsi_level=6 type=0 device_blocked=0 timeout=30
[2:0:0:0]    disk    IET      VIRTUAL-DISK     0     /dev/sdc
  state=running queue_depth=32 scsi_level=5 type=0 device_blocked=0 timeout=30
[2:0:0:1]    disk    IET      VIRTUAL-DISK     0     /dev/sdd
  state=running queue_depth=32 scsi_level=5 type=0 device_blocked=0 timeout=30
proxmox-1:~#

@dietmar: i have change LUN1 to LUN0 but that change nothing
 
Last edited:
ok you're connected and the disk is seen..

if you go in Storage List ?
do you see the LUN?
 
Code:
proxmox-1:~# iscsiadm -m node -L all
Logging in to [iface: default, target: iqn.2002-05.de.xplace:storage.iscsi1.vm1, portal: 172.18.1.200,3260]
iscsiadm: Could not login to [iface: default, target: iqn.2002-ng

seems there is still a problem.
 
because he was already connected ;)

Code:
proxmox-1:~# iscsiadm -m session
tcp: [1] 172.18.1.200:3260,1 iqn.2002-05.de.xplace:storage.iscsi1.vm1
 
i have installed a clean debian lenny with all updates and then:


pve-headers-2.6.32-1-pve
proxmox-ve-2.6.32_1.5-2_all.deb
pve-manager
pve-qemu-kvm
open-iscsi


but when i clicked on storage -> an then select the iscsi i see no entries under volume-id
what have i done wrong?
 
but when i clicked on storage -> an then select the iscsi i see no entries under volume-id
what have i done wrong?

For iSCSI, you need to create the LUNs on your storage server.

If you want to manage the iSCSI from the web interface, you need to create LVM Storage which uses the iSCSI storage as base.

- Dietmar
 
pvesm list -a
local:101/vm-101-disk-1.qcow2 101 qcow2 33554432

Which function in Storage.pm is needed to detect the LUNs?
 
proxmox-1:/sys/bus/scsi/devices/9:0:0:0/block# ls
sdc


SOLVED:

/usr/share/perl5/PVE/Storage.pm

-1198:
my (undef, $bdev) = dir_glob_regex ("/sys/bus/scsi/devices/$tmp/block", 'block:(\S+)');

+1198:
my (undef, $bdev) = dir_glob_regex ("/sys/bus/scsi/devices/$tmp/block", '([A-Za-z]+)');
 
proxmox-1:/sys/bus/scsi/devices/9:0:0:0/block# ls
sdc


SOLVED:

/usr/share/perl5/PVE/Storage.pm

-1198:
my (undef, $bdev) = dir_glob_regex ("/sys/bus/scsi/devices/$tmp/block", 'block:(\S+)');

+1198:
my (undef, $bdev) = dir_glob_regex ("/sys/bus/scsi/devices/$tmp/block", '([A-Za-z]+)');

What kernel is that exactly?
 
OK, fixed - please update, restart the pvedaemon and test.
(/etc/init.t/pvedaemon restart)
 
Last edited by a moderator:

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!