iSCSI LUN from Centos mapped to xenserver is keep on disappearing

Issues related to applications and software problems
Post Reply
suhailkhalid
Posts: 2
Joined: 2019/06/28 06:20:34

iSCSI LUN from Centos mapped to xenserver is keep on disappearing

Post by suhailkhalid » 2019/06/28 06:24:25

Hello,

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.

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.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: iSCSI LUN from Centos mapped to xenserver is keep on disappearing

Post by TrevorH » 2019/06/28 12:02:44

It sounds to me like you have the host activating an LVM PV on the "disk" on the host. Perhaps you need to adjust the filter line in lvm.conf on the host to stop it trying to use it.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: iSCSI LUN from Centos mapped to xenserver is keep on disappearing

Post by hunter86_bg » 2019/06/28 20:23:31

That's possible ... Set a global filter for your iscsi block device , so it won't be checked and used upon reboot of the CentOS 7 system.

If LVM is locking the block device - then target.service can't use it (as its busy).

suhailkhalid
Posts: 2
Joined: 2019/06/28 06:20:34

Re: iSCSI LUN from Centos mapped to xenserver is keep on disappearing

Post by suhailkhalid » 2019/07/07 06:20:11

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.

Post Reply