1

I'm trying to set up an ISCSI box for shared storage to connect to my xenserver environment. I am using Centos 7 as iSCSI storage. I am using targetcli for iSCSI configuration.

I can set up everything just fine, the xenserver machine will connect and format the volume. I can set up VMS on it and all works fine until I reboot.

At this point the xenserver box will no longer connect and mapped LUN is shown as disconnected. Looking at the storage box a little further, I see that the LUN is not there anymore. But when I run "gdisk /dev/sda"; I do see the partition. Its only not visible in targetcli anymore. If I try to re-attach/create the LUN in targetcli then it tells me that the disk is in use.

/backstores/block> create xenhq_vl01 /dev/sda5 Cannot configure StorageObject because device /dev/sda5 is already in use

There is one another LUN mapped to a windows box which is not part of xen and it is working perfectly alright.

Below image is taken right after the LUN got disappeared. I also tried to re-create the same LUN but it gave an error.

Output of targetcli

After rebooting the Xen box; messages file in Centos reported following:

Jun 27 07:27:44 STGHQ01 target: Could not create StorageObject xenhq_vl01: Cannot configure StorageObject because device /dev/sda5 is already in use, skipped

Jun 27 07:27:44 STGHQ01 target: Could not find matching StorageObject for LUN 0, skipped

Jun 27 07:27:44 STGHQ01 target: Could not find matching TPG LUN 0 for MappedLUN 0, skipped

Any recommendations/suggestions? What am I missing here? Thanks.

0

Well I even tried using filters and global filters in /etc/lvm/lvm.conf but nothing worked out. So instead of using 'block' device; I ended up using "fileio" in targetcli. Everything works perfectly alright now.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.