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.
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
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...
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.
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...
See also bug #474833 comment #15.
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.
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).