Bug 625888 - Can't use LVM on iSCSI LUN
Summary: Can't use LVM on iSCSI LUN
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: iscsi-initiator-utils
Version: 5.7
Hardware: All
OS: Linux
low
high
Target Milestone: rc
: ---
Assignee: Chris Leech
QA Contact: Red Hat Kernel QE team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-20 17:36 UTC by Amadeus
Modified: 2014-06-30 11:49 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-02 13:16:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Amadeus 2010-08-20 17:36:38 UTC
Description of problem:
An iSCSI target can't be used as an LVM storage pool in libvirt/virt-manager.

How reproducible:
Everytime.

Steps to Reproduce:
1. Create iSCSI target in a SAN
2. Create a LUN on the target
3. Connect the LUN and set it to automatic connect at boot up, and put an LVM partition in it with a Volume Group and a Logical Volume.
4. Select Add "LVM storage pool" in virt-manager and hit ok.
5. Reboot.
  
Actual results:
It can't add the LVM as LVM storge pool, and after reboot the Volume Group is not available. Have to do "vgchange -ya "vg name".

Expected results:
RHEL should boot up, and libvirt should be able to an LVM partition as storage poll even if it is in an iSCSI target.

Additional info:
The problem is the boot order
S02lvm2-monitor -> ../init.d/lvm2-monitor*
S07iscsid -> ../init.d/iscsid*
S13iscsi -> ../init.d/iscsi*
S97libvirtd -> ../init.d/libvirtd*

LVM is initialised before iscsi.

Red Hat support suggests using netfs in fstab or putting "vgchange -ya vg_name" and "lvchange -ya lv_name" in rc.local, but both of these suggests won't work for KVM guests, as they may not be mounted from the host.

Either it is a bug, or it should be written in the manual that LVM in iSCSI is not supported in virt-manager/libvirt.

Comment 1 Cole Robinson 2010-08-21 18:33:13 UTC
This doesn't sound specific to virt-manager/libvirt since you point out that LVM is initialized before iSCSI. Not really sure what the fix is, so reassigning to iscsi

Comment 3 Mathieu Chouquet-Stringer 2010-10-29 13:18:27 UTC
I have the same issue on RHEL 5.5.

I have vgs and lvs used by KVM hosts and VGs are not enabled by vgchange in /etc/rc.d/rc.sysinit so when libvirtd and all start, it fails because LVs used by KVM are not up...  I think the issue is more of a lvm thing than a iSCSI vs libvirt thing...

Comment 5 Amadeus 2010-10-29 20:46:50 UTC
A very dirty workaround is to:

* create an LVM Physical Volume on the iscsi targets LUN.
pvcreate /dev/disk/by-id/device_name_here

* create an LVM Volume Group on the iscsi targets LUN.
vgcreate vg00 device_name_here

* create an LVM Logical Volume 
lvcreate --name dontdelete --size 1G vg00

* format the LV
mkfs.ext3 /dev/vg00/dontdelete
mkdir /mnt/dontdelete

* mount dontdelete on boot with netfs
/dev/vg00/dontdelete    /mnt/dontdelete         ext3    defaults,_netdev 0 0


This courses iscsi to be started up before LVM.

Tested on RHEL 5.5 and it works on reboot with KVM guests running using LV's on the iscsi target.

Comment 6 Mathieu Chouquet-Stringer 2010-10-30 17:40:43 UTC
Well in my case, the issue was a multipath configuration problem.  I thought about creating a fake volume but adding a simple entry in /etc/fstab like the following did the trick too:
none none nfs _netdev 0 0

This triggers netfs to do another vgchange.  Nfs because the script does a mount -a -t nonfs...

Comment 7 Peter Rajnoha 2012-10-22 10:36:16 UTC
See also bug #474833 comment #15.

Comment 8 RHEL Program Management 2014-03-07 12:47:06 UTC
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.

Comment 9 RHEL Program Management 2014-06-02 13:16:57 UTC
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).


Note You need to log in before you can comment on or make changes to this bug.