I am trying to add a storage domain on oVirt with iSCSI as storage type, first i need to know whether i am doing this correctly.My understanding is there must be a storage server (target) and Initiator (for the case of oVirt this is oVirt Engine). So i set up an iSCSI target this is the output of targetcli ls on target server
# targetcli ls
o- / ......................................................................................................................... [...]
o- backstores .............................................................................................................. [...]
| o- block .................................................................................................. [Storage Objects: 1]
| | o- bamboo_disk .................................................... [/dev/mapper/cl-bamboo_lv (300.0GiB) write-thru activated]
| o- fileio ................................................................................................. [Storage Objects: 0]
| o- pscsi .................................................................................................. [Storage Objects: 0]
| o- ramdisk ................................................................................................ [Storage Objects: 0]
o- iscsi ............................................................................................................ [Targets: 1]
| o- iqn.2017-01.ovirt.bamboo:bamboo ................................................................................... [TPGs: 1]
| o- tpg1 ............................................................................................... [no-gen-acls, no-auth]
| o- acls .......................................................................................................... [ACLs: 1]
| | o- iqn.2017-01.ovirt.bamboo:ovirt ....................................................................... [Mapped LUNs: 1]
| | o- mapped_lun0 ........................................................................... [lun0 block/bamboo_disk (rw)]
| o- luns .......................................................................................................... [LUNs: 1]
| | o- lun0 ................................................................... [block/bamboo_disk (/dev/mapper/cl-bamboo_lv)]
| o- portals .................................................................................................... [Portals: 1]
| o- 0.0.0.0:3260 ..................................................................................................... [OK]
o- loopback ......................................................................................................... [Targets: 0]
then i edited /etc/iscsi/initiatorname.iscsi file and added this line
InitiatorName=iqn.2017-01.ovirt.bamboo:ovirt
Now on oVirt Administration portal when i try to add a data domain with iSCSI as storage type, the targer is discovered but when i try to login i end up with this error message
Error while executing action: Failed to login to iSCSI node due to authorization failure
Surprisingly i can login into the target from the machine that running oVirt Engine and the disk sda is added
[root@ovirt ~]# iscsiadm -m node -T iqn.2017-01.ovirt.bamboo:bamboo -p 10.1.10.3:3260 -l
Logging in to [iface: default, target: iqn.2017-01.ovirt.bamboo:bamboo, portal: 10.1.10.3,3260] (multiple)
Login to [iface: default, target: iqn.2017-01.ovirt.bamboo:bamboo, portal: 10.1.10.3,3260] successful.
[root@ovirt ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 300G 0 disk
sr0 11:0 1 1024M 0 rom
vda 252:0 0 600G 0 disk
├─vda1 252:1 0 1G 0 part /boot
└──vda2 252:2 0 199G 0 part
├─cl_ovirt-root 253:0 0 100G 0 lvm /
├─cl_ovirt-swap 253:1 0 3.9G 0 lvm [SWAP]
└─cl_ovirt-home 253:2 0 2G 0 lvm /home
My questions, how comes i can login into the target and the disk is created but when i do it on Ovirt Engine Administration portal i end up with errors? does oVirt Engine use a different Initiator Name from the one in the /etc/iscsi/initiatorname.iscsi file? is there somewhere i can configure oVirt Engine to use a particular Initiator Name? what am i doing wrong? is the whole approach incorrect?